Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试检查光标/选择位于哪个节点。
我想得到
可以使用以下方式访问该节点:
tinyMCE.activeEditor.selection.getNode()
并且有 2 个属性将返回所需的值:nodeName和innerHTML
tinyMCE.activeEditor.selection.getNode().nodeName tinyMCE.activeEditor.selection.getNode().innerHTML