editor.decorations not working as expected
When trying to add decorations after the end of a line. The content is missing. There is a dom element with a class name but no text/content, The same example works in the monaco editor and in other react-monaco editors.
To Reproduce Add onMount handler like this:
function onMount(editor, monaco) {
// it works in monaco, but does not work here :/ the text is missing
editor.deltaDecorations([], [{
range: new monaco.Range(1, 1, 1, 50),
options: {
afterContentClassName: 'clr-monaco-end-of-line-hint',
after: {
content: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - deltaDecoration",
},
}}
]);
}
Expected behavior There showd be a text "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - deltaDecoration" in the first line. And the text is not editable.
Environment (please complete the following information):
Browser: Chrome
Can deltaDecorations be passed as props to the component?
Solved?
not working here. Anyone got a minimal example to highlight ranges?
still nothing?