This fails because this throws an error when text is '':
if (!textToReplace.text) {
throw new Error(
`Output "text" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "${currentTrigger}"\n`
);
}
Use case: In my case a custom output is generated outside of the textarea when a selection is made, so I don't want anything to change in the textarea and also remove the trigger character on select.
This fails because this throws an error when text is
''
:Use case: In my case a custom output is generated outside of the textarea when a selection is made, so I don't want anything to change in the textarea and also remove the trigger character on select.