HTML Rich Textbox
-
06-09-2019 - |
Question
I'm writing a web-app using Python and Pylons. I need a textbox that is rich (ie, provides the ability to bold/underline/add bullets..etc...). Does anyone know a library or widget I can use?
It doesn't have to be Python/Pylons specific, as it can be a Javascript implementation as well.
Thanks!
Solution
There are several very mature javascript implementations that are server-framework agnostic:
- http://www.fckeditor.net/
- TinyMCE
- WMD (used by SO)
The wikipedia article on Free HTML editors has a good overview, though note that not all are for application embedding.
OTHER TIPS
ExtJS's HtmlEditor was the best I found (license issues aside):
http://extjs.com/deploy/dev/docs/?class=Ext.form.HtmlEditor
ExtJS is a bit heavy-weight, but that HtmlEditor was the most responsive and best-looking out of the box that I found. It's worth running the output through HTMLTidy, which there are python libraries for.
webkit-gtk is getting very stable, and i believe has python bindings now so technically you could use that (then your text editor merely needs to be <body contenteditable></body>
and you'd be done. Unfortunately i'm not sure how complete its bindings are at present