ace编辑器使光标在选择新行后闪烁



对于熟悉ace的人来说,这可能是一个非常简单的问题,但在我使用将编辑器移到新行之后

editor.gotoLine(row, col);

如何设置光标的动画(使其像手动选择新行时一样闪烁)?

在Ace中,只有当编辑器聚焦时,光标才会闪烁。若要强制模糊编辑器闪烁,可以使用专用渲染器$cursorLayer对象

editor.renderer.$cursorLayer.isVisible=true;
editor.renderer.$cursorLayer.restartTimer();

editor.renderer.$cursorLayer.showCursor()

最新更新