Skip to content

Commit b46cc18

Browse files
committed
fix: mock tiptap edit mode for task-list
Will be made redundant once ueberdosis/tiptap#4044 is fixed
1 parent 3d43ba9 commit b46cc18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

wiki/public/js/editor.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ const saveWikiPage = (draft = false) => {
4949
const isEmptyEditor = !!urlParams.get("newWiki");
5050

5151
const title = $(`.wiki-editor .ProseMirror h1`).html();
52+
// mock tiptap edit mode for task-list
53+
// will be made redundant once editor.getHTML() is used to load content for saving
54+
$('[data-type="taskList"] > li').attr('data-type', 'taskItem');
5255
// markdown=1 tag is needed for older wiki content to properly render
5356
// TODO: use editor.getHTML() instead of this when ueberdosis/tiptap#4044 is fixed
5457
const content = `<div markdown="1">${$(".editor-space .ProseMirror")
@@ -425,4 +428,4 @@ $('ul[data-type=taskList] input[type=checkbox]').click(function(){
425428

426429
if(!urlParams.get("newWiki") && !urlParams.get("editWiki"))
427430
return false;
428-
});
431+
});

0 commit comments

Comments
 (0)