import { ModifyContentAction, ModifyContentActionType } from './modify-content-action.abstract';
/**
 * Replace the text node selected content to new text
 *
 * @example selectedNode.apply(new ReplaceSelectedTextAction(insertText))
 */
export class ReplaceSelectedTextAction extends ModifyContentAction {
  constructor(text, currentRange) {
    super();
    this.type = ModifyContentActionType.REPLACE_SELECTED_TEXT;
    this.textToBeInsert = '';
    this.textToBeInsert = text;
    this.currentRange = currentRange;
  }
}
