CorPao's picture
Joined: 27/02/2015
Posts: 1
<p> tags must always have the inline style

Hi,
we use OpenCms with FCKEditor 2.5.1.

What I would like is that when my colleagues press the Enter key the resulting <p> tag always has an inline style. For example:

<p style="font-family:Arial; font-size:16px">
Lorem Ipsum
</p>

How can I do this?

Second question. I have created a simple configuration xml file:

<?xml version="1.0" encoding="utf-8" ?>
<Styles>
    <Style name="No margin" element="p">
        <Attribute name="style" value="margin:0" />
    </Style>
    <Style name="Main font" element="p">
        <Attribute name="style" value="font-family:Arial; font-size:16px" />
    </Style>
</Styles>

Into the editor if I select the paragraph text and I press "Main font" by Style select nothing happens. Changing Format select value from Normal to H1 and then selecting "Main font" <p> tag now has two <span> inside it the former with font-family, the latter with font size. Where am I wrong?

Thanks in advance,

Corrado