T
T
Teraxis2016-08-22 17:18:02
JavaScript
Teraxis, 2016-08-22 17:18:02

How to pass parameters to Imperavi Redactor via data-* attributes?

I recently noticed that in the Imperavi Redactor WYSIWYG editor, parameters can be set not only in the script itself, but also through the data-* attributes.

<textarea class="form-control margin-top-10" id="wysiwyg" name="ftdesc" data-min-Height="380" ></textarea>

This is how the minHeight parameters are written. Which in javascript would look something like this:
$('textarea[id^="wysiwyg"]').redactor({
                toolbarFixedBox: true,
                minHeight: 400,
                autoresize: true,
                buttonSource: true,
                plugins: ['table'],
                buttons: ['html','formatting','bold','italic','orderedlist','unorderedlist','link','image','table','horizontalrule']
              });

But when I start prescribing the buttons or plugins parameter according to the same principle, nothing works. The developer's site does not say anything about the possibility of passing parameters via data-*. It seems that the function is not yet documented. Has anyone come across and can tell you on what basis the parameters are set via data-*?

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