// The editor inserts its own text (Enter, Tab, Ctrl+F reindent) through // execCommand. Mark those edits so the assessment journal does not report // them as text inserted by another tool. let ownEdits = 0; export function asOwnEdit(edit) { ownEdits++; try { return edit(); } finally { ownEdits--; } } export const isOwnEdit = () => ownEdits > 0;