About TinyMCE and other wysiwygs

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

I have used TinyMCE as my wysiwyg editor. I have, however, noticed some downsides:
-every time I hit enter I get p-tags into my html source. Some times I don't want to start a paragraph, I just want to keep line short or something like that.
-when I use layers things look fine in the editor, but the resulting page looks very different; the layers jump all over the place

In addition, I need to publish quite long articles and TinyMCE doesn't feel handy for this purpose. I would need some borders and background colors and stuff like that. Should I just write plain html and style it with css..?

So, I'm wondering is it just me, or could there be another wysiwyg better for my needs?

Comments

This is because tinmymce and

SamRose's picture

This is because tinmymce and fckeditor are not really "fully integrated" into Drupal. So, some of the html they output is either stripped or ignored by Drupal, depending on the input filters you have and the way that you have them configured. Some of the formatting from FCKeditor and Tinymce actually output span and class tags, which are usually ignored by filtered html, for instance.

Probably a special input filter could be written to clean up some of these problems and make all of the options work

Sam Rose
Social Synergy
Open Source Ecology
P2P Foundation

Your custom CSS in phptemplate_tinymce_theme

markus_petrux's picture

With TinyMCE module you can provide your own phptemplate_tinymce_theme(). Here you can set your CSS that will be used by the module to pass it on to TinyMCE settings, and there you can style the editor to suit your needs.

In your phptemplate_tinymce_theme() use something like this:

$init['content_css'] = base_path() .'sites/.../mystyle.css';

In the editor you can press Shift+Enter to insert a single line-break. :-)

CSS setting!

sun's picture

It seems you have missed the configuration option on the settings page. At least in Wysiwyg Editor module, you are able to define multiple stylesheets that will be loaded by TinyMCE.

Quoting Wysiwyg Editor's form field description:

If "Define CSS" has been selected above, enter a path to a CSS file or a list of CSS files seperated by a comma.
Available tokens: %b (base path, f.e.: /), %t (path to theme, f.e.: themes/garland)
Example: css/editor.css,/themes/garland/style.css,%b%t/style.css,http://example.com/external.css

No need to override any theme function.

Daniel F. Kudwien
unleashed mind

Daniel F. Kudwien
netzstrategen

Oops! Forgot about it.

markus_petrux's picture

Reason is I needed to override the theme function because every user of the site can provide their own CSS for their blog. So I was used to that. :-/

Ok, well that shift+enter is

wpanssi's picture

Ok, well that shift+enter is good to know, should have tried that one!
I have to look into those css things, too..

Thanks for the help!

--
http://www.sitemedia.fi

Wysiwyg

Group organizers

Group categories

Group notifications

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