HTML Input field

Hi. I meed am input field to let the user enter an HTML table, to design the headers of a document template, so all content has the same header. RichEditor cant handle this. Is it safe or not to allow the user to enter HTML code? Any recommendations?
Solution:
Both of these support tables, I’m sure there’s a few more too. In general though it is risky to allow direct html. You have to make sure it’s getting sanitized properly. https://filamentphp.com/plugins/mohamedsabil83-tinyeditor https://filamentphp.com/plugins/awcodes-tiptap-editor...
Filament
TinyEditor by Mohamed Sabil - Filament
A form component for the Tinymce editor.
Filament
Tiptap Editor by Adam Weston - Filament
A Rich Text Editor plugin for Filament Forms.
Jump to solution
11 Replies
Solution
awcodes
awcodes4mo ago
Both of these support tables, I’m sure there’s a few more too. In general though it is risky to allow direct html. You have to make sure it’s getting sanitized properly. https://filamentphp.com/plugins/mohamedsabil83-tinyeditor https://filamentphp.com/plugins/awcodes-tiptap-editor
Filament
TinyEditor by Mohamed Sabil - Filament
A form component for the Tinymce editor.
Filament
Tiptap Editor by Adam Weston - Filament
A Rich Text Editor plugin for Filament Forms.
PabloZagni
PabloZagniOP4mo ago
Ok! I'll make the configuration available only to me... as an Admin... (Y)
awcodes
awcodes4mo ago
what ever you need to do 🙂
PabloZagni
PabloZagniOP4mo ago
It seams Tiptap has a bug. I enter code <p style="text-align: center;"><h1>Title</h1></p> save it, then enter code again and code is modified <p style="text-align: center;; text-align: center"></p><h1>Title</h1> It repeats text-align Another example... <h1 style="text-align: center;">Title</h1> Is trasnformed in <h1 style="text-align: center;; text-align: center; text-align: center; text-align: center">Title</h1>
awcodes
awcodes4mo ago
I believe there is a known bug in the underlying Tiptap package around this. Feel free to file an issue on the repo though and I can investigate further.
PabloZagni
PabloZagniOP4mo ago
Sorry.... I've never summit a PR, or a bug, I'm a "lone wolf" coder, never worked in a team... I'll learn how to summit a PR
awcodes
awcodes4mo ago
Doesn’t have to be a PR unless you have a fix. A simple Issue is enough.
awcodes
awcodes4mo ago
GitHub
GitHub - awcodes/filament-tiptap-editor: A Rich Text Editor plugin ...
A Rich Text Editor plugin for Filament Forms. Contribute to awcodes/filament-tiptap-editor development by creating an account on GitHub.
PabloZagni
PabloZagniOP4mo ago
Done!
awcodes
awcodes4mo ago
Thank you.
Ojush Pathak
Ojush Pathak4w ago
@awcodes I’m reaching out to report a bug in the Tiptap editor. When creating a paragraph, all the alignment properties function as expected. However, if I try to edit the same paragraph later, the alignment properties stop responding. Interestingly, if I cut the entire paragraph and then edit it, the alignment properties start working again.
Want results from more Discord servers?
Add your server