Anthony, thank you for your input. And thank you too, Ross.

I did some evaluation in these days. Now I gonna share my thoughts.

elrte and ckeditor and tinymce etc. are definitely feature-riched, at
the same time somwhat bloated. Each sizes 135KB, 355KB, 203KB,
respectively. (How could this be called "tiny-something"? So ironic.)

After I notice the fact that, end user can (and very likely to) copy
formatted text from the popular MS WORD document, then paste into any
wysiwyg editor, I decide to choose some lightweight editor which only
provided some basic features. Oh, I don't need upload-image feature so
far.

Right now I am happy with the 9KB js jhtmlarea (http://pietschsoft.com/
demo/jHtmlArea/). Another similar option is 8KB tinyeditor (http://
www.scriptiny.com/2010/02/javascript-wysiwyg-editor/), but it is less
polished.

One caveat. When using such kind of html editors, end user could input
javascript code, which I consider potentially harmful. So we will need
something similar to this in our model:

    Field('content', 'text', requires=CLEANUP('<script.*?</script>'))

But that is still not good enough. To Massimo, if you are reading this
thread, CLEANP(...) should be improved to support this syntax:

    CLEANUP(re.compile('<script.*?</script>', re.S|re.I))

Regards,
Ray

On Dec 20, 3:20 am, Anthony <abasta...@gmail.com> wrote:
> It shouldn't be too difficult to use any JS editor with web2py, but here
> are some web2py specific plugins:
>
> https://bitbucket.org/PhreeStyle/web2py_ckeditor/srchttp://dev.s-cubism.com/plugin_elrte_widgethttp://dev.s-cubism.com/plugin_managed_html/page1/_managed_html_preview
>
> Anthony
>
>
>
>
>
>
>
> On Monday, December 19, 2011 1:23:16 PM UTC-5, Ray (a.k.a. Iceberg) wrote:
>
> > Hi folks,
>
> > I used web2py for years but never have a need to use wysiwyg html
> > editor in my projects. Until recently. Then I surprisingly find no
> > "mainstream" editor mentioned in web2py world. Of course I can go with
> > any editor I will run into, but before that I just want to hear some
> > suggestion from those been-there-done-that people. Any thoughts,
> > gentlemen?
>
> > Regards,
> > Ray
>
> > PS: candidates I found.
>
> > 1. the plugin_wiki of web2py uses elrte (http://elrte.ru/en), which
> > has most powerful feature I even seen
>
> > 2. I saw this one in an unfamous web2py app, jhtmlarea. It is
> > lightweight. (http://pietschsoft.com/demo/jHtmlArea/)
>
> > 3. jwysiwyg mentioned in a web2pyslice
> >http://www.web2pyslices.com/slices/take_slice/54
>
> > 4. This sounds cool. "WYSIWYG editor with integrated image upload
> > Options"http://www.web2pyslices.com/main/slices/take_slice/18

Reply via email to