// manacoEditor 为 实例对象
// 1 获取光标位置
const position = manacoEditor.getPosition()
const insertText = '要插入的内容'
// 2 插入
manacoEditor.executeEdits('', [
{
range: new manaco.Range(position.lineNumber,
position.column,
position.lineNumber,
position.column),
text: insertText
}
])
// 3 设置新的光标位置
manacoEditor.setPosition(position.lineNumber, position.column + insertText.length)
// 4 聚焦
manacoEditor.focus()