How to get a link to FloatPanel from an instance of TinyMCE 4.x

I am using the new TinyMCE 4.x editor in the configuration inline. In this mode, the editor will contain FloatPanel, which contains all the menu items and buttons. I am handling an event where I have a link to TinyMCE in a variable ed. Is there any easy way to get a link to FloatPanelthat contains all the menu items and buttons?

I know that I can get a list of matching HTML elements with jquery using $(".mce-container.mce-panel.mce-floatpanel"), but I don't know how to map each panel to each editor if I have several editors on the same page (all these elements divare added to the end of the host document when TinyMCE works in built-in mode). Also, this gives me a list of HTML elements without an easy way to get a handle to a FloatPanel object.

In short, how to get a link to a container object that implements the http://www.tinymce.com/wiki.php/api4:class.tinymce.ui.FloatPanel interface when setting http://www.tinymce.com/wiki. php / api4: class.tinymce.Editor ?

+4
source share
1

, , JS .

ed ( TinyMCE), :

var panel = ed.theme.panel;

, theme.panel http://www.tinymce.com/wiki.php/api4:class.tinymce.Theme.

<div>, :

var paneldiv = window.document.getElementById(panel._id);

, _id . , () . . .

+4

Source: https://habr.com/ru/post/1531321/


All Articles