different styles in the entry body ?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

different styles in the entry body ?

Post 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
Last edited by JWalker on Mon Dec 19, 2005 8:34 pm, edited 1 time in total.
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: different styles in the entry body ?

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post 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 ... :)
Last edited by JWalker on Mon Dec 19, 2005 8:49 pm, edited 1 time in total.
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post 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. :roll:
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post by JWalker »

Thanks for the help. I'll try to do something and if get positive result will post here.
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
Post Reply