Skip to content

Commit

Permalink
editor: fixed adding tasklist using md in heading
Browse files Browse the repository at this point in the history
  • Loading branch information
alihamuh authored and thecodrr committed Aug 27, 2024
1 parent 3a23e4f commit caff480
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/editor/src/extensions/task-list/task-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ export const TaskListNode = TaskList.extend({
});
const oldHandler = inputRule.handler;
inputRule.handler = ({ state, range, match, chain, can, commands }) => {
if (state.selection.$from.node().type.name === "heading")
commands.setParagraph();
oldHandler({ state, range, match, chain, can, commands });

state.tr.setNodeMarkup(state.tr.selection.to - 2, undefined, {
Expand Down

0 comments on commit caff480

Please sign in to comment.