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
10 Replies
Solution
awcodes
awcodes2mo 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
PabloZagni2mo ago
Ok! I'll make the configuration available only to me... as an Admin... (Y)
awcodes
awcodes2mo ago
what ever you need to do 🙂
PabloZagni
PabloZagni2mo 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
awcodes2mo 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
PabloZagni2mo 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
awcodes2mo ago
Doesn’t have to be a PR unless you have a fix. A simple Issue is enough.
awcodes
awcodes2mo 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
PabloZagni2mo ago
Done!
awcodes
awcodes2mo ago
Thank you.
Want results from more Discord servers?
Add your server