When using TINYMCE as the text editor. The editor loads perfectly (filtered html). But then when I save the node the editor box seems to change to a non rich text box. Once saved the text is not formatted, and shows the formatting tags instead.

Comments

twod’s picture

We have a patch in the making which will prevent the flickering, but tags showing when viewing nodes has nothing to do with wysiwyg.
You need to reconfigure the text format you assigned the editor to and remove the plain text filter. Also add any tags produced by the editor to the tag whitetelist or they will be excluded from rendering. You might want to try http://drupal.org/project/wysiwyg_filter instead of the regular tag filter if you want to keep any style attributes added by the editors.

ohallows’s picture

I have tried all the above. Just to make it a bit clearer what happens. I can type something into the editor and format the font. For example make it bold. Which displays fine in the editor. As soon as press save, I notice that the editor switches to no rich text before actually saving. Hence saving the node in a non rich text version.

twod’s picture

Disabling the editor when submitting the form is currently done by design to easily get rid of circular references between JavaScript objects and DOM nodes, which would otherwise cause memory leaks until the browser is restarted.
Disabling the editor does not switch the content to non rich-text mode. As far as Drupal core is concerned, all data is stored exactly as it was input by the user. Only switching to a text format - which either has the plain-text filter enabled, or other misconfigured filter -using the Format dropdown will determine if markup tags are left as-is, removed, or converted to HTML entities to be viewed as literal characters during rendering.

It does not matter which editor, or if a rich-text editor was used at all, for whether you see plain text or proper markup when viewing rendered content. Wysiwyg module and the editors do not run any code when Drupal fetches contents from the database and put them through filters and themeing.

Is the contents still correctly formatted in the editor when you go back to edit a node? If so, it means they were stored correctly in the database but Drupal removes/changes the markup using a filter configured on the input format selected below the textarea.

EDIT: Btw, be sure not to select the BBCode plugin for TinyMCE. It will override TinyMCE's internals so it produces BBCode markup instead of HTML markup, which Drupal's built in filters will just see as plain text and not care about. If the rendered contents look like [B]something bold[/B] and [IMG]some/image.jpg[/IMG], you've got the BBCode ouput plugin enabled, but no filter that knows how to turn that (back) to HTML markup. Disable that plugin and re-edit the contents to save them as HTML markup.

ohallows’s picture

Status: Active » Fixed

Excellent TwoD, thanks for your reply. I disabled BBCode plugin and all is working as expected. Thank you very much.

Oliver

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.