laureen
Publish static Space from 21023ea
db2d194
Raw History Blame Contribute Delete
354 Bytes
// 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;