Firstly, it is important which node you want the identifier from. If you want to get if from the parent node of your choice in TinyMCE, use
tinymce.activeEditor.selection.getNode().id;
EDIT: if you have one node in your editor, you can access this node icon using
tinymce.activeEditor.getBody().firstChild.id;
source
share