Hello
I would like to bring an issue about WYSIWYG editors ( FCK and yui editors mainly and others ...), in that what you type in the editor as font text, format and size ...etc , does not necessarily displays as you want on the preview. I understand that style.css is the ruler about formatting and text display. but then what the need for WYSIWYG editors if I can't make the text displays as I want on the web.

how to make WYSIWYG editors really WYSIWYG ? for FCK and yui editor

thanks

hicham.

Comments

vm’s picture

editors should probably be viewed as rich text editors who's output is shown after content is saved and run through drupal's input formats.

justageek’s picture

There has been a tremendous clamor on the forums recently concerning "we need a wysiwyg in core, we need a wysiwyg in core". Congratulations, you have just pointed out one of the fundamental flaws in using a wysiwyg editor in your cms.

The fact that the content in the editor rarely reflects the content on the themed page is indeed one of the main reasons that wysiwyg editors don't necessarily become core features of a CMS. One of the primarly purposes of a CMS is to separate, let me say that again, separate design from content. When your designer creates an attractive, consistent design to be applied across the content of your site, the last thing you want is an editor mucking it up using a wysiwyg editor.

It is very painful to try to make your wysiwyg editor content appear as it will on the finished site, I have worked on issues liked this for years.

About the best you can hope for is to allow for fairly 'neutral' formatting, like bold, underline, italics, etc... to be consistent. But letting editors choose font face, font size, colors, etc. is a sure recipe for a site that looks inconsistent and, well, just bad.

A preview feature is your best bet, letting editors preview the finished product prior to publishing.

robert_danob’s picture

However it IS nice to be able to add bold text, align text to the left or right, or add images without lots of rigamarol.

vm’s picture

nice for some. There are some extremely popular sites that don't use editors at all.

mike123106’s picture

It's good to see I am not the only one who has had this problem in the past. I have just learned to use text input over the last few years... no WYSIWYG for me.

FredCK’s picture

With FCKeditor you can use the EditorAreaCSS setting to point the editor to any CSS file to be loaded inside of it:
http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/C...

By default, this setting points to the "editor/css/fck_editorarea.css" file, located in the FCKeditor distribution.

You may point it to "/themes/your_theme/style.css" or any CSS file you use in the main site. But, considering that the editor is there to edit just the contents part of the page, the styles defined for the rest of the page may disturb it (as we don't have the rest of the page inside of the editor). In this case, you may even create a dedicated CSS file to use just for editing, properly designed to better give the WYSIWYG impression.

Hope that helps.