D
D
D44k2018-02-12 15:41:07
JavaScript
D44k, 2018-02-12 15:41:07

How to define default settings for TinyMCE?

We can define settings for TinyMCE on initialization:

tinymce.init({
        skin: false,
        selector: 'textarea.tinymce',
        height: 500,
        menubar: false,
        plugins: [
            'advlist autolink lists link image charmap print preview anchor textcolor',
            'searchreplace visualblocks code fullscreen',
            'insertdatetime media table contextmenu paste code help'
        ],
        toolbar: 'insert | undo redo |  formatselect | bold italic backcolor  | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help',
    });

I can’t find how to define the same settings in advance as default ones - by default, something like:
tinymce.defaults({
        skin: false,
        selector: 'textarea.tinymce',
        height: 500,
        menubar: false,
    });

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question