Selecting Class inside ckeditor

Hello there

I have a ckeditor textarea inside it i have a custom html tags

<textarea id="ckeditor">
  <div class="customClass">Custom text</div>

How to select this “customClass” known it’s inside ckeditor another DOM inside the main DOM

What i need to do is there another input on.change i need to change the “customClass” value “text”

My main issue is how to target the customClass inside the ckeditor, I tried the ckeditor Api but i can’t change the text on input change

Can you do that? At least I’ve never seen elements inside of a textarea,
Did it pass the validator?

Yep you can it’s a WYSIWYG editor ! inserting html tags for an ex, email template

That isn’t an element inside the textarea - everything inside the textarea tag is TEXT.

The following text does not contain any HTML tags or attributes as it is text and not HTML so any selection done on it would need to use a regular expression to find whatever you are looking for in the text.

<div class="customClass">Custom text</div>
1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.