Set Value for ace editor without selecting the whole editor

前端 未结 6 635
臣服心动
臣服心动 2021-02-06 20:04

So you can set value of an ace editor with setValue but after setting the value, the editor will select the whole value of the editor. How do you disable this? This

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-06 20:45

     var prevtext = $("#editor").val();
     prevtext = prevtext + "
    "; $("#editor").val(prevtext).blur();

提交回复
热议问题