0

I added a class option in the rich text editor in the content tree. The requirement is to add this class in <h2> tag.

RTE CSS

But it's adding a class in the <span> tag by default:

RTE HTML

The requirement is to add this class in h2 tag. Is there any settings for that ?

1
  • 1
    I think the best option is to create a snippet. Commented Feb 20 at 20:44

1 Answer 1

2

Do you want to add it under the Normal dropdown? enter image description here

If so first check your RTE Profile, which is being used in the template. based on that.

  1. Change the DB to Core
  2. Navigate to path /sitecore/system/Settings/HTML Editor Profiles/<Your Rich Text Profile From template> change the h2 value and add <h2 class="h2>

enter image description here

3
  • I have tried it but it does not include class after adding in RTE, it just picks up html tag
    – Vinesh
    Commented Feb 20 at 13:22
  • @Vinesh , please check your RTE profile , there are 4-5 RTE Profiles , there might be a chance you made a change in the RTE profile which is not being used, I am pretty sure this will work , since I have implemented this
    – Manoj
    Commented Feb 21 at 8:04
  • It worked, previously i was adding in different type of RTE
    – Vinesh
    Commented Feb 22 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.