Add custom css file to RTE at the component level | Community
Skip to main content
Level 2
May 26, 2021 2:27 PM UTC
Solved

Add custom css file to RTE at the component level

I have been trying to add custom css file the should be specifically applied to the RTE component.

 

The main intentions in this requirements are:

1) Custom css code to be applied to RTE at the component level itself.

2) The rendered content of RTE should be automatically applied with the custom css code and rendered of the page.

 

Can this be achieved by adding any specific property to dialog nodes or any other way to integrate the CSS file to the component? Appreciate ur help.

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Asutosh_Jena_
Asutosh_Jena_Accepted solution
New Participant
May 26, 2021 2:43 PM UTC

Hi @parthibanselvam 

 

You can apply the classes to the RTE content and write CSS styles based on the classes that is applied on the RTE content which will be applied to the content on the page while rendering.

 

You can create the styles under the RTE component like below.

 

It will be applied as a <span> tag like below:

 

 

4 replies

Level 2
May 28, 2021 11:12 AM UTC
@asutosh_jena_ , is it possible to make a custom css file get applied to the RTE text inside the dialog box itself, i.e, the styles and other css effects are visible inside the RTE text box itself
Translate
Asutosh_Jena_
Asutosh_Jena_Accepted solution
New Participant
May 26, 2021 2:43 PM UTC

Hi @parthibanselvam 

 

You can apply the classes to the RTE content and write CSS styles based on the classes that is applied on the RTE content which will be applied to the content on the page while rendering.

 

You can create the styles under the RTE component like below.

 

It will be applied as a <span> tag like below:

 

 

Translate
Level 2
May 26, 2021 3:13 PM UTC

Hi @asutosh_jena_ ,

I completely understood ur proposed idea. However we are trying to implement the css as a built-in feature with the component itself.

Rather the styles be applied manually during the RTE component authoring. How can we possibly approach this?

Translate