I am in a curious situation where I had no problem in getting what I already had. The following code is a part of an HTML page that is meant to host a TinyMCE rich textbox:
... textarea id = "editing_field" & gt; This text is rich in rich textbox & lt; / Textarea & gt; ...
The first thing you did was to create a rich text box with the attached text. At some point, however, the TinyMCE code decided that the textarea HTML should be changed to:
& lt; Textarea id = "editing_field" style = "display: none;" /> This text should be visible in rich textbox
It presents text below the text box which is not exactly ideal. I do not have any clue that was due to this change, although I am also using jQuery with it if it can have any effect.
I can solve the problem by loading the content into the text box, loading with JavaScript after the page, either by using AJAX or by hiding the text in HTML and just running it, I would like to remove the text directly from PHP. If possible, nobody knows what's going on here and how to fix it?
Update 2: I will bring changes in behavior to improve the situation: At first, I was plain text, however, as the first code snippet Tekstreya, save content After the text will look like this:
& lt; P & gt; This text is about to appear in rich textboxes & lt; / P & gt; p
which is induced to Tinmimii due to the presence of the tag to trigger the transformation between a Tekstai with a Tekstai just a tag (as That is shown above). / P>
Update 1: Added TinyMCE config file:
tinyMCE.init ({// general option mode: "Precise", element: " Editing_field ", topic:" Advanced "skin" O2k7 "Skin_variant:" Black ", plugins:" safari, pagebreak, style, layer, table, save, advhr, advimage, advlink, feelings, Iespell, Inlinepopups, insertdatetime, previews, media, Searchreplace, print, ContextMenu, paste, directionality, fullscreen, Noneditable, Visualchars, Nonbreaking, Xhtmlxtras, template ", save_onsavecallback:" saveContent ", // theme options theme_advanced_buttons1:" save, newdocument, |, Bold, italic, ray Ankn, from strikethrough, |, justifyleft, justifycenter, justifyright, justifyfull ", Visy_agla_btons 2:" Search, Replace, |, Ballist, Numlist, |, Outdent, Indent, blockquote, |, undo, redo, |, ForeColor, Backcolor "Theme_advanced_buttons3:" h, Removeformat, |, sub, sup, |, charmap, feelings, |, drop print, |, fullscreen, linking "/ image / media / template dialogues lists", "Theme", " Cast ", topic_Next_reference: link / image / media / template dialog template_external_list_url for incorrect, // drop lists:" Catalog Issues / template_list.js ", external_link_list_url:" lists / link_list.js ", external_image_list_url:" lists / image_list.js ", media_external_list_url:" lists / media_list.js ", // template plugin VRT template_replace_values: { Username: "Some Users", Employee: "991234"}, Width: "450", Height: "500"});
If you do not call the JavaScript function of TinyMCE, you deal with browser Compatibility problems may occur
If you have a TinyMCE box on the page only, you can just do this:.
tinyMCE.activeEditor.setContent ('& lt; duration & gt; some more & lt; / span & gt;');
You can also set a format such as see the BBCDA documentation.
I would echo the HTML in your PHP code JavaScript function and onload
:
function loadTinyMCE ($ html) {echo "& LT ; script type = "text / javascript" & gt; function loadDefaultTinyMCEContent () {tinyMCE.activeEditor.setContent ( '$ html');} & lt; / script & gt; "; }
then
& amp; Body onload = "loadDefaultTinyMCEContent ()" & gt;
If you page Onlod
event do not want to use, then the init option Tinimse called similar function.
Alternatively, gives you direct access to the IFrame.
Comments
Post a Comment