Hello,
we plan to put interviews in our blog where the questions should have a distinguished style, like "background light green".
What I've seen in CMSes is a way a) to define the styles in a css file, b) have these offered in the wysiwyg editor as possible formats.
So then i would like to mark the question in the text, I'd klick on the "q1" style and get:
<span class="q1">..</span>
rendered in the output.
Is there something like this possible in Serendipity or does a plugin exist? Or have I misunderstood the concept of a blog?
Thanks for hints
// Bernd
Using CSS styles inside an entry
Re: Using CSS styles inside an entry
try to use the italic tag provided by the editor and redefine italic in your css, using certain background color for example. (Italic does not look good rendered on a normal screen)bebr wrote:<span class="q1">..</span>
Re: Using CSS styles inside an entry
R.U. Sirius ?snafu wrote:.. redefine italic in your css ..
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Using CSS styles inside an entry
Hi!
There are three ways to solve your wishes.
1. Use the internal WYSIWYG editor (or any other) and edits its javascript configuration file where the buttons are found/placed. Like if you use the internal editor, you need to patch htmlarea.js for that. If you use external editors like FCKEdtior or so, that might be easier.
2. Use a plugin like the 'serendipity_event_typesetbuttons' which puts a number of buttons on top of the WYSIWYG editor bar. You can edit that plugin file to add your specific output.
3. You can write up a similar plugin like typesetbuttons, or a plugin that uses javascript commands to tell the WYSIWYG editor which config buttnos to add. Most WYSIWYG editors have a custom javascript API that lets you add buttons also after the editor is added, and you could achieve that via a plugin.
I however favor snafu's method to "override" simple HTML buttons like <quote> or <code> to use the CSS you want.
Best regards,
Garvin
There are three ways to solve your wishes.
1. Use the internal WYSIWYG editor (or any other) and edits its javascript configuration file where the buttons are found/placed. Like if you use the internal editor, you need to patch htmlarea.js for that. If you use external editors like FCKEdtior or so, that might be easier.
2. Use a plugin like the 'serendipity_event_typesetbuttons' which puts a number of buttons on top of the WYSIWYG editor bar. You can edit that plugin file to add your specific output.
3. You can write up a similar plugin like typesetbuttons, or a plugin that uses javascript commands to tell the WYSIWYG editor which config buttnos to add. Most WYSIWYG editors have a custom javascript API that lets you add buttons also after the editor is added, and you could achieve that via a plugin.
I however favor snafu's method to "override" simple HTML buttons like <quote> or <code> to use the CSS you want.
Best regards,
Garvin
bebr wrote:R.U. Sirius ?snafu wrote:.. redefine italic in your css ..
# 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/
# 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/
Re: Using CSS styles inside an entry
I chose tinyMCE - and after you opened my eyes for the correct path parameter this seems to be my solution:garvinhicking wrote: 1. ... If you use external editors like FCKEdtior or so, that might be easier.
http://board.s9y.org/viewtopic.php?p=54974#54974
Thanks for your attention on all those creative user's issues