import { sendTriggerEvent } from "./send-trigger-event";
export const monitorTriggeredText = (doc, activeTrigger, cursorPosition, contentConverter, view) => {
    let newValue = '';
    if (cursorPosition > activeTrigger.position) {
        // Start extracting text after the trigger character
        newValue = doc.textBetween(activeTrigger.position + 1, cursorPosition, '');
    }
    sendTriggerEvent('triggerChange', view, contentConverter, activeTrigger, newValue);
    return newValue;
};
