Page 1 of 1
different styles in the entry body ?
Posted: Mon Dec 19, 2005 8:32 pm
by JWalker
Hi, I am just wondering if it is possible to make an entry with several styles in it, like in MS Word or Open Office. This came in my mind while writing a static page for an instruction in our company. I wished to enter a red colored paragraph with other font with some warning text "Warning: Do this, do not do that..." and the following text to be with the usual entry style.
Yes, I know that I can achieve this with embedding HTML into the text, but this is too silly, it is like to format every paragraph in the word processor. Just wondering is it easy to do this in Serendipity -- to define several styles in my theme style.css that are based on the entry body style and to use them across entries...
Regards
Re: different styles in the entry body ?
Posted: Mon Dec 19, 2005 8:33 pm
by garvinhicking
You can use one of the WYSIWYG editor (like the bundled one) for this!
Or you can use the BBCode markup plugin, I think it also has a \[color] markup tag.
Regards,
Garvin
Posted: Mon Dec 19, 2005 8:43 pm
by JWalker
Yes, I do use them, BBCcode, and mainly WYSIWYG since I began with s9y. And geshi for program code too.
Indeed,I will use WYSIWYG editor and will colorize my paragraphs, but was interested if there is mechanism to define this in the style.css, and whenever decide to change something, par example the color from red to green, this change to have effect on all entries that have paragraphs with this style. I realize that this may be difficult to be done and s9y is not a word processor, but I have already seen what fantastic things can be done in s9y ...

Posted: Mon Dec 19, 2005 8:48 pm
by garvinhicking
It could be done, but then again your HTML doesn'T know what CSS styles you have. Thus you'd need to code your own plugin that uses the styles you've defined.
You could take the emoticonchooser or the typesetbuttons plugin as a starting point, and just write your own buttons that wrap your entries with "<div class='mystyle'>...</div>" blocks...
Regards,
Garvin
Posted: Mon Dec 19, 2005 8:57 pm
by JWalker
Exactly, I began to think in that direction too. There is a drop down list 'Format' in WYSIWYG editor with several 'styles' in it. What do you think, is it possible (with plugin) to embed 'my styles' in this dropdown list ? That would be something like extension to WYSIWYG editor, and if it is possible will be (as I suppose) the cleanest implementation.

Posted: Mon Dec 19, 2005 9:22 pm
by garvinhicking
I think that'S easier possible with TinyMCE, Xinha or other WYSIWYG editors (which we also offer as plugins). HTMLarea isn't flexible in that regard.
I can't offer much more help, since I hate WYSIWYG editors *g*
Regards,
Garvin
Posted: Mon Dec 19, 2005 10:00 pm
by JWalker
Thanks for the help. I'll try to do something and if get positive result will post here.