|
|
@ -92,13 +92,7 @@ export function textWysiwyg({
|
|
|
|
editable.onkeydown = ev => {
|
|
|
|
editable.onkeydown = ev => {
|
|
|
|
if (ev.key === KEYS.ESCAPE) {
|
|
|
|
if (ev.key === KEYS.ESCAPE) {
|
|
|
|
ev.preventDefault();
|
|
|
|
ev.preventDefault();
|
|
|
|
if (initText) {
|
|
|
|
handleSubmit();
|
|
|
|
editable.innerText = initText;
|
|
|
|
|
|
|
|
handleSubmit();
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
cleanup();
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ev.key === KEYS.ENTER && !ev.shiftKey) {
|
|
|
|
if (ev.key === KEYS.ENTER && !ev.shiftKey) {
|
|
|
|
ev.preventDefault();
|
|
|
|
ev.preventDefault();
|
|
|
|