nickornotto
nickornotto

Reputation: 2156

TinyMCE inline option not working?

I have a tinymce 4.7.4 field.

I have applied inline option according to the documentation (https://www.tinymce.com/docs/configure/editor-appearance/) and it returns a js error? So tinymce field breaks.

Could not initialize inline editor on invalid inline target element <textarea id="Description" class="text ui-widget-content ui-corner-all input-sm tinymce" cols="20" name="Description" rows="2">

The snippet:

tinymce.init({
        selector: "textarea",
        inline: true,
        toolbar: "undo redo | bold italic | bullist numlist"
        });

Upvotes: 7

Views: 8132

Answers (1)

Michael Fromin
Michael Fromin

Reputation: 13746

TinyMCE's inline mode does not work on <textarea> elements - it needs to be placed on block elements in the HTML page.

The most common choice would be a <div>. Here is an example:

http://fiddle.tinymce.com/2ggaab

Upvotes: 13

Related Questions