A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: enter not spliting outline list item
thecodrrc742a12b1e96
diff --git a/packages/editor/dist/es/extensions/outlinelistitem/outlinelistitem.js b/packages/editor/dist/es/extensions/outlinelistitem/outlinelistitem.jsindex de1446c1e..7f4b95865 100644--- a/packages/editor/dist/es/extensions/outlinelistitem/outlinelistitem.js+++ b/packages/editor/dist/es/extensions/outlinelistitem/outlinelistitem.js@@ -41,7 +41,7 @@ export const OutlineListItem = Node.create({Enter: ({ editor }) => {const subList = findSublist(editor, this.type);if (!subList)- return false;+ return this.editor.commands.splitListItem(this.name);const { isCollapsed, subListPos } = subList;if (isCollapsed) {return this.editor.commands.toggleOutlineCollapse(subListPos, false);diff --git a/packages/editor/src/extensions/outline-list-item/outline-list-item.ts b/packages/editor/src/extensions/outline-list-item/outline-list-item.tsindex aca9641a1..973563912 100644--- a/packages/editor/src/extensions/outline-list-item/outline-list-item.ts+++ b/packages/editor/src/extensions/outline-list-item/outline-list-item.ts@@ -1,6 +1,7 @@import { Node, mergeAttributes, findChildren, Editor } from "@tiptap/core";import { NodeType } from "prosemirror-model";import { findParentNodeOfTypeClosestToPos } from "prosemirror-utils";+import { findSelectedNode } from "../../toolbar/utils/prosemirror";import { onBackspacePressed } from "../list-item/commands";import { OutlineList } from "../outline-list/outline-list";import { createNodeView } from "../react";@@ -63,7 +64,8 @@ export const OutlineListItem = Node.create<ListItemOptions>({},Enter: ({ editor }) => {const subList = findSublist(editor, this.type);- if (!subList) return false;+ if (!subList) return this.editor.commands.splitListItem(this.name);+const { isCollapsed, subListPos } = subList;if (isCollapsed) {diff --git a/packages/editor/tsconfig.json b/packages/editor/tsconfig.jsonindex 4f86e6043..5379960d7 100644--- a/packages/editor/tsconfig.json+++ b/packages/editor/tsconfig.json@@ -11,7 +11,7 @@// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. *//* Language and Environment */- "target": "ES5" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,+ "target": "ES6" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,"lib": ["DOM","DOM.Iterable",@@ -51,7 +51,7 @@// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */// "sourceMap": true, /* Create source map files for emitted JavaScript files. */// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */- "outDir": "./dist" /* Specify an output folder for all emitted files. */,+ "outDir": "./dist/es" /* Specify an output folder for all emitted files. */,// "removeComments": true, /* Disable emitting comments. */// "noEmit": true, /* Disable emitting files from a compilation. */// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */