1
0
Fork 0
mirror of https://github.com/kou029w/quot.git synced 2025-01-18 16:08:03 +00:00

redo and undo

This commit is contained in:
Nebel 2022-09-07 00:47:55 +09:00
parent cc9097d3a3
commit 787f97dcd7
3 changed files with 23 additions and 6 deletions

26
app/package-lock.json generated
View file

@ -10,6 +10,7 @@
"dependencies": {
"@exampledev/new.css": "^1.1.3",
"@fastify/http-proxy": "^8.2.2",
"@lexical/history": "^0.4.1",
"@lexical/plain-text": "^0.4.1",
"esbuild": "^0.15.7",
"esbuild-register": "^3.3.3",
@ -114,6 +115,17 @@
"lexical": "0.4.1"
}
},
"node_modules/@lexical/history": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.4.1.tgz",
"integrity": "sha512-n7KUYqCN0jj+NmMrT0bGjbSwn5x7EyDYhw9eghm69/fgHI/qHSJDQUQXa2ep4/0y4kPzYafVZSMrBDYXBxWqmw==",
"dependencies": {
"@lexical/utils": "0.4.1"
},
"peerDependencies": {
"lexical": "0.4.1"
}
},
"node_modules/@lexical/html": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.4.1.tgz",
@ -130,7 +142,6 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.4.1.tgz",
"integrity": "sha512-dP6i18qm1UhUoG6FvqLMn7hoj4htE0jYcmMPYqFyH+f1ir9Ybvr87pV3aFhqH6hdHjQ5tMyM0kURSL1t89GesQ==",
"peer": true,
"dependencies": {
"@lexical/utils": "0.4.1"
},
@ -162,7 +173,6 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.4.1.tgz",
"integrity": "sha512-1BRLB+cYpqXSk0IHk3uHI1Fa6H4rnQ5pySDm+7HSyShjAzQSMBt0BWoX9B0TW/vXysl3p5+vcnU8mGjGyCA0Lg==",
"peer": true,
"dependencies": {
"@lexical/utils": "0.4.1"
},
@ -174,7 +184,6 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.4.1.tgz",
"integrity": "sha512-OUYS7qpu1oHv9vhUGhL60ow5gbyqLG449XGFZrzaKUGnz1iWU/rXP8nEljoqdtai3rg4t0Ahxcbe9cVIubK3hQ==",
"peer": true,
"dependencies": {
"@lexical/list": "0.4.1",
"@lexical/table": "0.4.1"
@ -1174,6 +1183,14 @@
"@lexical/utils": "0.4.1"
}
},
"@lexical/history": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.4.1.tgz",
"integrity": "sha512-n7KUYqCN0jj+NmMrT0bGjbSwn5x7EyDYhw9eghm69/fgHI/qHSJDQUQXa2ep4/0y4kPzYafVZSMrBDYXBxWqmw==",
"requires": {
"@lexical/utils": "0.4.1"
}
},
"@lexical/html": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.4.1.tgz",
@ -1187,7 +1204,6 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.4.1.tgz",
"integrity": "sha512-dP6i18qm1UhUoG6FvqLMn7hoj4htE0jYcmMPYqFyH+f1ir9Ybvr87pV3aFhqH6hdHjQ5tMyM0kURSL1t89GesQ==",
"peer": true,
"requires": {
"@lexical/utils": "0.4.1"
}
@ -1209,7 +1225,6 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.4.1.tgz",
"integrity": "sha512-1BRLB+cYpqXSk0IHk3uHI1Fa6H4rnQ5pySDm+7HSyShjAzQSMBt0BWoX9B0TW/vXysl3p5+vcnU8mGjGyCA0Lg==",
"peer": true,
"requires": {
"@lexical/utils": "0.4.1"
}
@ -1218,7 +1233,6 @@
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.4.1.tgz",
"integrity": "sha512-OUYS7qpu1oHv9vhUGhL60ow5gbyqLG449XGFZrzaKUGnz1iWU/rXP8nEljoqdtai3rg4t0Ahxcbe9cVIubK3hQ==",
"peer": true,
"requires": {
"@lexical/list": "0.4.1",
"@lexical/table": "0.4.1"

View file

@ -13,6 +13,7 @@
"dependencies": {
"@exampledev/new.css": "^1.1.3",
"@fastify/http-proxy": "^8.2.2",
"@lexical/history": "^0.4.1",
"@lexical/plain-text": "^0.4.1",
"esbuild": "^0.15.7",
"esbuild-register": "^3.3.3",

View file

@ -5,6 +5,7 @@ import {
$getRoot,
createEditor,
} from "lexical";
import { registerHistory, createEmptyHistoryState } from "@lexical/history";
import { registerPlainText } from "@lexical/plain-text";
import { onCleanup, onMount } from "solid-js";
import type Pages from "../../protocol/pages";
@ -34,6 +35,7 @@ export default (props: {
root.append(paragraphNode);
};
onCleanup(registerPlainText(editor, initialEditorState));
onCleanup(registerHistory(editor, createEmptyHistoryState(), 333));
onMount(() => {
onCleanup(
editor.registerTextContentListener((text) => {