WYSIWYG

Events happening in the community are now at Drupal community events on www.drupal.org.
danare's picture

Hi all,
Pretty new to Drupal in general.
I've noticed that none of the WYSIWYG editors I've installed are working properly.
I mean, I can see the actual editor plus the functions and buttons I have configured, and I can also see the changes I'm implementing in the content I am creating, but after publishing it - the changes do not apply anymore.
Does anyone have any suggestions?
Thanks!
Dana.

Comments

Check your input filters

twod's picture

If you disable the editor using the "Disable rich text" link below it, you'll see exactly what will be sent to the server, just as if no editor was active (in fact, this is exactly what happens before the form is submitted).

Drupal will store content in the database exactly as it was input. During rendering, content is passed via check_markup() along with the id of the input format (text format in D7) that was selected. This function runs, one after another, all the input filters which have been activated for this input format. Here's where your formatting is removed from the rendered content.

The predefined input format "Filtered HTML" has the "HTML Filter"-filter active by default, and it has been set to allow very few tags. It also filter out all instances of style="" attributes for security reasons (JavaScript can be injected via URLs etc). The "Full HTML" input format does not have this filter active by default so there you should see your changes come through just fine.

As an alternative to "HTML Filter", I can recommend the filter provided by the WYSIWYG Filter module. It offers a great deal more flexibility than the standard filter and it'll let you allow inline style attributes, but it takes a little longer to set up.

Thanks, but still

danare's picture

I've followed your instructions and added the desired tags, but still there is no change.
I even installed the WYSIWYG Filter module and set up a new input format and that did not make any difference also.
This is so frustrating! Do you have any other suggestions maybe?
Thanks again,
Dana.

PHP filter

joyseeker's picture

I finally got so frustrated with my markup content not showing using the standard filters, that I do all my content using the PHP filter. It holds both HTML markup and PHP code. I'm not sure if there's any security concerns, but it works for me.

Security

twod's picture

Having the PHP filter on when you don't need it could very much be a security issue, especially if you're not the only one editing content and others have acces to entering PHP code.
A simple mistake - like forgetting to escape <?php properly when posting some example code for your readers - could mean your entire site goes down, perhaps also including data loss, (doomsday scenario, but you get the point).

Did you make sure the old HTML Filter was disabled after installing and enabling WYSIWYG Filter? Did you notice you have to explicitly state which tags are allowed to have the style attribute, and exactly which style properties are allowed in that attribute?

I only check in here now and then and spend most of my time in the Wysiwyg issue queue. If this problem persists, please open a support request there.

Wysiwyg

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: