AW: [opencms-dev] How can I do to add my own styles in a toolbar withinthe FCKeditor

Kai Schliemann k.schliemann at comundus.com
Fri Jul 28 18:01:29 CEST 2006


Hi Andres,

I unterstand you but I can not help you. If you don't want the STYLES select
box (not the FORMAT select box) with your styles (which would be - in my
option - easier to use than through an icon which presumably opens a popup
window to select a style) the I can not help you.

Have a look at the wiki page of the FCKEditor. I guess you easier find an
answer there than in the OpenCms mailing list. This is a FCKEditor issue not
an OpenCms one.

If your interested in how my configuration looks like, then have a look at
the screenshot sent with this mail.

Regards

Kai


  -----Ursprüngliche Nachricht-----
  Von: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org]Im Auftrag von ANDRES SAYAGO
  Gesendet: Freitag, 28. Juli 2006 16:42
  An: opencms-dev at opencms.org
  Betreff: [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


  --


        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
        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/20060728/4471f6e0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ATT00133.jpg
Type: image/jpeg
Size: 4154 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060728/4471f6e0/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot_021.jpg
Type: image/jpeg
Size: 45859 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060728/4471f6e0/attachment-0001.jpg>


More information about the opencms-dev mailing list