[opencms-dev] How can I do to add my own styles in a toolbar withinthe FCKeditor
Jonathan Woods
jonathan.woods at scintillance.com
Sat Jul 29 08:12:48 CEST 2006
Andres -
I think Christian and others did understand you and answer you. Your
question "How can I add my own styles in a toolbar within FCKEditor?" has
the answer "by defining CSS files and XML files in the way described by
Christian and others".
Jon
_____
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of ANDRES SAYAGO
Sent: 28 July 2006 15:42
To: opencms-dev at opencms.org
Subject: [opencms-dev] How can I do to add my own styles in a toolbar
withinthe FCKeditor
Hello again!
I got messages about styles, but they wasn't about my specific problem.
The question is not how can I do to use styles in a HTML page using a CSS
file!!
My specific question is: "How can I do to add my own styles in a toolbar
within the FCKeditor". I need the option to select MY OWN style through an
ICON in the toolbar.
My first idea was to modify the file where I can see the 10 styles
predefined in the FORMAT select list of the FCKEditor.
Can you understand to me? Can you help me?
Please!!!!!!
Christian Steinert escribió:
Dear Andres,
For example, this is something of its content:
---
<Style name="Custom Bold" element="span">
<Attribute name="style" value="font-weight: bold;" />
</Style>
---
this would create the following code, as soon as you assign the style:
<span style="font-weight:bold">SELECTED_TEXT</span>
In this example SELECTED_TEXT is, whatever text you have selected before
selecting the style. Of course using a centralized css file - like you
want to do it - is much better than adding the style properties directly.
But, if I have a normal CSS file, with content like this:
---
.Fecha {
font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;
color: #333333; font-weight: normal; padding-left: 8px;
}
.Titulo_1 {
font-family: Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
font-size: 20px; color:#EA3D46; font-weight: bold; text-decoration: none;
}
---
How can I do to make the sentences with the XML structure?
If you want to point to a style of your stylesheet then of course your
stylesheet must be linked to your JSP template (the name of the CSS file
must be contained in the "template" property).
You also have to point to your CSS file in the <head> section of your
html pages by using something like this:
<link rel="stylesheet" type="text/css" href="/path/to/style.css" />
then you add config entries like this to your style.css_styles.xml:
<Style name="Fecha" element="span">
<Attribute name="class" value=".Fecha" />
</Style>
The HTML code that FCKeditor inserts will then be:
<span class="Fecha">SELECTED_TEXT</span>
________
-OR- if you want to create a block element instead, then you could
you could create a different tag, instead of span:
for example a <div> or a <p>
by using
<Style name="Fecha" element="div"> ...
<Style name="Fecha" element="p"> ...
etc.
PLEASE, HELP ME!!
I hope this does help.
Andrés
Christian
_____
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev
--
WebStudio S.A.
J. Andrés Sáyago P.
Ingeniero de Desarrollo
Calle 93B No 12-48 Of 302
Bogota D.C., Colombia
Tel: (57) (1) 610 6834 ext. 107
Fax: (57) (1) 610 6834 ext. 108
Cel: (57) 300 5528542
asayago at ebstudio.com
Barcelona, España
Paseo de Gracia 2-4, 3,6a
PBX. (34) 911 830 105
<http://www.ebstudio.com> www.ebstudio.com
"Su Aliado en la Red"
AVISO DE CONFIDENCIALIDAD
ESTE MENSAJE, (INCLUYENDO CUALQUIER ANEXO) ESTÁ DIRIGIDO ÚNICAMENTE A LOS
DESTINATARIOS ARRIBA SEÑALADOS. PUEDE CONTENER INFORMACIÓN CONFIDENCIAL O
PRIVILEGIADA Y NO DEBE SER LEÍDO, COPIADO O DE OTRA FORMA UTILIZADO POR
CUALQUIER OTRA PERSONA. SI USTED RECIBE ESTA COMUNICACIÓN POR ERROR, FAVOR
AVISAR AL REMITENTE Y ELIMINAR EL MENSAJE DE SU SISTEMA.
THIS E-MAIL (INCLUDING ANY ATTACHMENTS) IS INTENDED ONLY FOR THE
RECIPIENT(S) NAMED ABOVE. IT MAY CONTAIN CONFIDENTIAL OR PRIVILEGED
INFORMATION AND SHOULD NOT BE READ, COPIED OR OTHERWISE USED BY ANY OTHER
PERSON. IF YOU ARE NOT A NAMED RECIPIENT, PLEASE CONTACT THE SENDER AND
DELETE THE E-MAIL FROM YOUR SYSTEM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060729/76d0bd8b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ATT00076.jpg
Type: image/jpeg
Size: 4154 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060729/76d0bd8b/attachment.jpg>
More information about the opencms-dev
mailing list