Conditonally wrap line in Monaco Editor

Viewed 1721

I want to be able to wrap a line conditionally.

if it matches a regex pattern then it doesn't wrap.

What is the best way to implement this?

1 Answers

I believe you can call editor.updateOptions({ wordWrap: "off" }) to switch between the states after the editor has been created. Depending on your code you could call this function when your condition is true or false

Related