Issue rendering paragraph toolbar button (missing icon)
mikkellindblom opened this issue ยท 6 comments
Hi there, could you please paste your Resource Class, or just the Tiptap fields inside that class? I'm not sure which button you mean. There is no "paragraph" button. Just pressing enter inside Tiptap adds a new paragraph, no button is needed. All other block elements can be turned back into a paragraph by by toggling the button again (like H1, H2, Unordered List etc.).
Hi @manogi ,
I often use the "paragraph" button to reset text pasted from elsewhere, maybe that is just me?
Tiptap::make('Content', 'content')
->buttons([
'heading',
'paragraph',
'|',
'italic',
'bold',
'|',
'link',
'strike',
'underline',
'highlight',
'|',
'bulletList',
'orderedList',
'|',
'table',
])
->headingLevels([1, 2, 3, 4])
->onlyOnForms(),
Maybe the following would work:
File: NormalButton.vue:
Line 58:
else if (this.button == 'paragraph') {
return ['fas', 'paragraph'];
}
Line 109:
else if (this.button == 'paragraph') {
command.setParagraph();
}
Hmm. I'm not sure I would like the Paragraph button to be a "first class citizen", because people might think they actually need to use it. But I might consider adding the button, but not adding it to the Readme. I will think about it.
Sure thing, let me know what you decide :) Thanks!
I decided to add the button (is added in version v2.7.2), but I don't mention it in the Readme. Using feels a little strange to me, as there is no way to "untoggle" a paragraph, as the paragraph is the default block node. I hope it fits your use case!
Thank you @manogi!