I'm trying to find a suitable way to disable HTML tags in the markdown editor, so that if someone tries to type a tag like<div> Some Content </div>, it won't create a new div in the WYSIWYG view, but just the div as a string. I tried using a customHTMLRenderer like in the example below:
...
customHTMLRenderer: {
htmlBlock: (node) => {
let result = node.literal?.replaceAll("<", "\\<");
return {
type: "text",
content: result || ""
}
},
...
But when adding a <div> in the markdown editor, the WYSIWYG seems to get stuck before even typing the <div> out completely:
Is there another way to simply disable HTML tags and just show them as string in the WYSIWYG editor?
Hi,
I'm trying to find a suitable way to disable HTML tags in the markdown editor, so that if someone tries to type a tag like
<div>
Some Content</div>
, it won't create a new div in the WYSIWYG view, but just the div as a string. I tried using a customHTMLRenderer like in the example below:But when adding a
<div>
in the markdown editor, the WYSIWYG seems to get stuck before even typing the<div>
out completely:Is there another way to simply disable HTML tags and just show them as string in the WYSIWYG editor?
Thanks in advance, Marcel