0
votes

I am building an app which uses TinyMCE to edit contents in TD blocks. Function tinyMCE.execCommand(...) is binded to many custom buttons, these buttons are not built with TinyMCE ControllManager, they are just some DIVs with onClick event, which sends execCommand to tinyMCE.

When editing content with default TinyMCE buttons, they show the current state of the node. E.g. we click in a bold, italic text of ordered list - we can see button "B"," I" and "OL" are active in the controls. I need to do something similar - get attributes of current node, so I can add some class to my custom buttons.

There is handle_node_change_callback , where I should get these attributes. Does TinyMCE have some built-in function that shows current node properties?

What i expect it to be: node.getAllProperties() returns ['Bold', 'Italic', 'OrderedList']

1

1 Answers

0
votes

No, there is no such function in tinymce. I suggest you retrieve a node from the tinymce content and search down the node for subnodes.