Expand my Community achievements bar.

SOLVED

Change type of bullets in RTE

Avatar

Level 2

Hi All,

 

We have a requirement to change the type of bullets in rte, do we have any plugin for this?

 

for example:

While authoring i can see in dialog preview different bullets indentation 

sagar_verliani_0-1592821431842.png

but after submitting bullets are changed.

 

sagar_verliani_1-1592821466165.png

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

You can add custom styles to override the OOB rte styles and add "cq.authoring.editor" category to the css file.  This will be universal change which will apply in all components.

 

If you want to apply for a single component try using "extraClientlibs" property and add the clientlibs to cq:dialog

 

Screen Shot 2020-06-22 at 9.10.58 AM.png

.cq-RichText-editable ul li:before {
    color: #0072ce;
}
Will display like below
Screen Shot 2020-06-22 at 9.08.24 AM.png

The above change will apply inside the dialog and if you need the same change to reflect on the page, the same styles can be added to your site css.

 

Hope this helps!

View solution in original post

5 Replies

Avatar

Community Advisor

Do you want to change the bullet type in the RTE or displayed on the page ? 

Avatar

Level 2
I have content in word document , when I am copy pasting in rte it is showing correct bullets in dialog preview but in the page it is changing the bullet type. So i need whatever is authored in rte dialog same should reflect in page.

Avatar

Correct answer by
Community Advisor

Hi,

 

You can add custom styles to override the OOB rte styles and add "cq.authoring.editor" category to the css file.  This will be universal change which will apply in all components.

 

If you want to apply for a single component try using "extraClientlibs" property and add the clientlibs to cq:dialog

 

Screen Shot 2020-06-22 at 9.10.58 AM.png

.cq-RichText-editable ul li:before {
    color: #0072ce;
}
Will display like below
Screen Shot 2020-06-22 at 9.08.24 AM.png

The above change will apply inside the dialog and if you need the same change to reflect on the page, the same styles can be added to your site css.

 

Hope this helps!

Avatar

Community Advisor

Please check if this helps :

http://experience-aem.blogspot.com/2017/05/aem-62-touch-ui-extend-rte-list-plugin-for-adding-selecte...

 

Using above plugin you can add a class and based on that you can apply styles to the child HTML elements.

If you have only one list style throughout the site the no need to add a plugin, just add CSS suggested in other responses.

 

The behavior is different because of dialog load a different CSS(OOTB) and site has different CSS.



Arun Patidar

Avatar

Community Advisor

@sagar_verliani Sagar, the bullet styles displayed on your page should be controlled by UI. Please inspect the element by clicking F12 and check what style is appearing right now for your bullet and modify and check what you need . The content and styling on the webpage is completely handled by CSS on the HTML page.

 

Veena ✌