-
commands:
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-const ProsemirrorDocData: React.FC = () => {
- const ctx = useRemirrorContext({ autoUpdate: false });
- const [jsonPluginState, setJsonPluginState] = useState("");
- const [jsonDoc, setJsonDoc] = useState("");
- const { addHandler, view } = ctx;
-
- useEffect(() => {
- addHandler("updated", () => {
- setJsonDoc(JSON.stringify(view.state.doc.toJSON(), null, 2));
-
- const pluginStateValues = tableControllerPluginKey.getState(view.state)?.values;
- setJsonPluginState(
- JSON.stringify({ ...pluginStateValues, tableNodeResult: "hidden" }, null, 2)
- );
- });
- }, [addHandler, view]);
-
- return (
-