cancel
Showing results for 
Search instead for 
Did you mean: 

how to maintain rich text editor

bvlspadmavathi
Champ in-the-making
Champ in-the-making
using String type as schema definition , we created a rich text editor in alfresco for adding content.  when content is added in rich text editor, internally alfresco is taking <p> tag for the content. how can we manage the class defined in our CSS file with alfresco generated <p> tag?  we are using class defined in our CSS file to manage font style, color… etc.


Thanks in Advance
1 REPLY 1

edgar
Champ in-the-making
Champ in-the-making
Hi Padma! 😉

What exactly are you trying to do? In your template that is associated with the Web Form in which this rich text field (xs:string) is used you should probably render the field inside a <div> element.

Depending on whether the element will appear only once or multiple times on a page you should use an id or a class attribute to be able to address this div element from your CSS. E.g.:

<div id="mainContent"><p>some HTML here</p><p>some more HTML</p></div>

Using id or class selectors you can now address this div in your CSS and you can style all <p> elements inside it. Is that what you want?

regards,

Edgar