habitat icon indicating copy to clipboard operation
habitat copied to clipboard

Add wysiwyg functionality to posts and comments

Open carlnewton opened this issue 9 months ago • 3 comments

carlnewton avatar Feb 12 '25 09:02 carlnewton

It should be customisable for the administrator of an instance if posts should be allowed with wysiwyg functionality.

Some things to consider:

  • hyperlinks
  • images in comments
  • a location selected from a map in comments
  • allowed tags when using (presumably) strip_tags should strip on posting AND displaying an existing post so that elements are stripped universally when that decision is made for an instance. Perhaps posts by the admin account itself should be excluded from this if we want that user to always have that ability -- I don't know if we do, it could be confusing. strip_tags on display of a post might also be ideal for phase 2.

carlnewton avatar Feb 12 '25 09:02 carlnewton

https://github.com/ueberdosis/tiptap looks like a good option for adding hyperlinks and stuff. Perhaps hyperlinks should only be available in admin content. I suppose it could be down to the admin preference.

carlnewton avatar May 11 '25 20:05 carlnewton

I'm no longer sure about having locations and images in comments, given that the content is lost if the post is deleted.

carlnewton avatar May 31 '25 07:05 carlnewton