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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With