LoginSignup
2
1

More than 3 years have passed since last update.

【monaco-editor】カーソル位置を設定

Last updated at Posted at 2021-03-13

概要

monaco-editor でカーソル位置を設定する

  • ex. 3行目の5文字目に設定する場合

image.png

実装

setPosition で、 lineNumber (行数)column (文字数) を設定する

editor.setPosition({
    lineNumber: 3,
    column: 5,
});

参考文献

関連記事

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1