My text is:
My favourite singer is {Bruce Springsteen} and he was born in New Jersey.
I want to programmatically select the text between the curly braces including them. I cannot find a straightforward way.
My text is:
My favourite singer is {Bruce Springsteen} and he was born in New Jersey.
I want to programmatically select the text between the curly braces including them. I cannot find a straightforward way.
you can do editor.find("{Bruce Springsteen}")
or
var Range = require("ace/range").Range;
editor.selection.setRange(new Range(0, 23, 0, 42));
// use .setRange(.., true) for setting cursor at the beginning of the selection
© 2022 - 2024 — McMap. All rights reserved.