How can I highlight multiple lines with Ace?

后端 未结 1 814

The old method mentioned in similar questions here is the following:

var editor = ace.edit(\"editor\");
var Range = ace.require(\'ace/range\').Range;
editor.         


        
1条回答
  •  一整个雨季
    2021-01-01 01:27

    seems like signature of the addMarker function was changed

    var Range = ace.require('ace/range').Range // get reference to ace/range
    ...
    editor.session.addMarker(
        new Range(1, 0, 15, 0), "ace_active-line", "fullLine"
     );`
    

    works fine, see http://jsbin.com/acotuv/3/edit

    0 讨论(0)
提交回复
热议问题