mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
editor: do not add block id on list items
(because they already contain paragraphs and we don't want duplicates)
This commit is contained in:
@@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import { Extension, NodeWithPos } from "@tiptap/core";
|
||||
import { Plugin } from "@tiptap/pm/state";
|
||||
import { nanoid } from "nanoid";
|
||||
import { getChangedNodes } from "../../utils/prosemirror";
|
||||
|
||||
const BLOCK_ID_TYPES = [
|
||||
"paragraph",
|
||||
@@ -28,7 +27,6 @@ const BLOCK_ID_TYPES = [
|
||||
"blockquote",
|
||||
"bulletList",
|
||||
"orderedList",
|
||||
"taskItem",
|
||||
"taskList",
|
||||
"table",
|
||||
"codeblock",
|
||||
@@ -82,7 +80,6 @@ export const BlockId = Extension.create({
|
||||
blocksWithoutBlockId.push({ node: n, pos: offset });
|
||||
});
|
||||
if (blocksWithoutBlockId.length > 0) {
|
||||
console.log(blocksWithoutBlockId);
|
||||
const { tr } = newState;
|
||||
for (const { node, pos } of blocksWithoutBlockId) {
|
||||
const id = nanoid(8);
|
||||
|
||||
Reference in New Issue
Block a user