quasar-tiptap
quasar-tiptap copied to clipboard
How to disable title
Hello, Just quickly asking how to disable the main title from the editor. I couldn't find any way how to get rid of it if that doesn't throw an error and crash the component.
I have no idea if this is the correct way, but I changed the return value of Placeholder
:
...
"OPrint",
"OImage",
"OEmbed",
new Placeholder({
showOnlyCurrent: false,
emptyNodeText: node => {
if (node.type.name === "title") {
return "Title";
}
return ""; // jayb was "Content"
},
}),
Sadly I found no answer for this and ended up using the default Quasar WYSIWYG, since this issue was a complete dealbreaker for me. Please fix this in the near future if possible.
remove 'OTitle','ODoc' in extensions:
remove 'OTitle','ODoc' in extensions:
I tried, this crashes the whole script.
I just tried it myself:
extensions: [
"Bold",
"Italic",
"Strike",
"Underline",
"Code",
"CodeBlock",
"CodeBlockHighlight",
"BulletList",
"OrderedList",
"ListItem",
"TodoList",
"HorizontalRule",
"Table",
"Link",
// 'OTitle',
// 'ODoc',
"OParagraph",
"OBlockquote",
"OTodoItem",
"OHeading",
"OAlignment",
"OIndent",
"OLineHeight",
"OForeColor",
"OBackColor",
"OFontFamily",
"OIframe",
"ODiagram",
"OKatexBlock",
"OKatexInline",
"OFormatClear",
"OPrint",
"OImage",
"OEmbed",
"OInsertHtml",
"OLink",
new Placeholder({
showOnlyCurrent: false,
emptyNodeText: (node) => {
return "Start writing here.";
},
}),
],
works for me