seesoe
seesoe

Reputation: 402

Tinymce with textarea content inside editor

I have the following markup im trying to initialize.

<textarea id="main">
    Some Text<br>
    <textarea class="foobar">[marker-123]</textarea>
</textarea>

Tinymce is stripping out the [marker-123] text from my sub textarea. I tried to keep it by doing the following but couldn't get it to work. Is there a better way to prevent Tinymce from stripping the contents of the inner textarea?

tinymce.init({
    extended_valid_elements: 'textarea[*]',
    editor_deselector : "foobar",
    ...
});

Upvotes: 1

Views: 75

Answers (1)

Piyush Mishra
Piyush Mishra

Reputation: 326

Selector with CSS class should start with dot(.). That is instead of calling the textarea with foobar you should use .foobar.

Upvotes: 1

Related Questions