MDL-44219 editor_atto: reinvent the event wheel for the atto editor
This commit is contained in:
committed by
Damyon Wiese
parent
86a83e3a9f
commit
67d3fe45bb
@@ -47,8 +47,7 @@ M.atto_subscript = M.atto_subscript || {
|
||||
// Attach an event listner to watch for "changes" in the contenteditable.
|
||||
// This includes cursor changes, we check if the button should be active or not, based
|
||||
// on the text selection.
|
||||
var editable = M.editor_atto.get_editable_node(params.elementid);
|
||||
editable.on('atto:selectionchanged', function(e) {
|
||||
M.editor_atto.on('atto:selectionchanged', function(e) {
|
||||
if (M.editor_atto.selection_filter_matches(e.elementid, SELECTORS.TAGS, e.selectedNodes)) {
|
||||
M.editor_atto.add_widget_highlight(e.elementid, 'sub');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user