src/LiveDevelopment/MultiBrowserImpl/language/HTMLInstrumentation.js
function _markTextFromDOM(editor, dom) {
        var cm = editor._codeMirror;

        // Remove existing marks
        var marks = cm.getAllMarks();
        cm.operation(function () {
            marks.forEach(function (mark) {
                if (mark.hasOwnProperty("tagID")) {
                    mark.clear();
                }
            });
        });

        // Mark
        _markTags(cm, dom);
    }
function _markTextFromDOM(editor, dom) {
        var cm = editor._codeMirror;

        // Remove existing marks
        var marks = cm.getAllMarks();
        cm.operation(function () {
            marks.forEach(function (mark) {
                if (mark.hasOwnProperty("tagID")) {
                    mark.clear();
                }
            });
        });

        // Mark
        _markTags(cm, dom);
    }
function _markTextFromDOM ( editor , dom ) { var cm = editor . _codeMirror ; // Remove existing marks var marks = cm . getAllMarks ( ) ; cm . operation ( function ( ) { marks . forEach ( function ( mark ) { if ( mark . hasOwnProperty ( "tagID" ) ) { mark . clear ( ) ; } } ) ; } ) ; // Mark _markTags ( cm , dom ) ; }
Clears the marks from the document and creates new ones.

@param {Editor} editor Editor object holding this document
@param {Object} dom SimpleDOM root object that contains the parsed structure
Clears the marks from the document and creates new ones .