TineMCE

19 views
Skip to first unread message

Ian Eslick

unread,
Jan 25, 2009, 8:32:25 AM1/25/09
to webl...@googlegroups.com
I recall a discussion some time ago about TinyMCE - has anyone had
success integrating this with weblocks, and if so can you point me to
an example?

Thank you,
Ian

Leslie P. Polzer

unread,
Jan 25, 2009, 9:06:45 AM1/25/09
to weblocks
Working and good quality:

http://paste.lisp.org/display/74210

Ian Eslick

unread,
Jan 25, 2009, 11:39:45 AM1/25/09
to webl...@googlegroups.com
Wow, it works like magic. Thanks!

Has anyone produced a server-side HTML filter to avoid abuses of the
HTML submissions from TineMCE (or any user-editable field, for that
matter)? TinyMCE does filtering, but you can bypass it by disabling
javascript or doing direct posts so a server side filter is a
necessary safety net.

Ian

Ian Eslick

unread,
Jan 25, 2009, 12:48:27 PM1/25/09
to webl...@googlegroups.com
Actually it doesn't work in dialogs - I've got a hanging bug that
isn't obvious. If I exclude the script that attaches the editor to
the textarea, things work fine but the script inside the create dialog
script seems to muck things up. Perhaps this is because my version of
the tree is old, or has this not been tried with this presentation?

Thanks,
Ian

Leslie P. Polzer

unread,
Jan 25, 2009, 1:12:00 PM1/25/09
to webl...@googlegroups.com

> Actually it doesn't work in dialogs - I've got a hanging bug that
> isn't obvious. If I exclude the script that attaches the editor to
> the textarea, things work fine but the script inside the create dialog
> script seems to muck things up. Perhaps this is because my version of
> the tree is old, or has this not been tried with this presentation?

Your description sounds suspiciously familiar:

There were a bunch of problems with dialog, notably the inclusion
of JavaScript inside the Dialog (which is built with JavaScript
itself).

I've fixed all of them a couple of weeks ago.

You should be able to find them easily (search for "dialog"
in the logs) and cherry-pick them (hg transplant) into your
branch.

Leslie P. Polzer

unread,
Jan 25, 2009, 1:16:56 PM1/25/09
to webl...@googlegroups.com

> Has anyone produced a server-side HTML filter to avoid abuses of the
> HTML submissions from TineMCE (or any user-editable field, for that
> matter)? TinyMCE does filtering, but you can bypass it by disabling
> javascript or doing direct posts so a server side filter is a
> necessary safety net.

Would you like to remove SCRIPT tags or certain other
elements/attributes?

Parsing the HTML into a SEXP tree with the help of closure-html
and then walking it is pretty simple.

Ian Eslick

unread,
Jan 25, 2009, 1:18:43 PM1/25/09
to webl...@googlegroups.com
Thanks. These patches are in weblocks-dev, or your branch? -Ian

Leslie P. Polzer

unread,
Jan 25, 2009, 2:12:17 PM1/25/09
to webl...@googlegroups.com

> Thanks. These patches are in weblocks-dev, or your branch? -Ian

Right in -dev.

Stephen Compall

unread,
Jan 25, 2009, 6:04:19 PM1/25/09
to webl...@googlegroups.com
"Leslie P. Polzer" <sky-A/mCt7huS1RhCjiJD...@public.gmane.org> writes:
> You should be able to find them easily (search for "dialog"
> in the logs) and cherry-pick them (hg transplant) into your
> branch.

Better still to just merge-track the whole thing and avoid this sort of
thing. It's better to have more people using all of the latest dev
anyway, as it is, after all, the future of Weblocks.

--
Sorry but you say Nibiru is a Hoax? Doesnt Exist? So maybe The
Sumerian people doesnt exist also! --Anonymous by way of SkI

Jan Rychter

unread,
Jan 26, 2009, 6:10:03 AM1/26/09
to webl...@googlegroups.com

I tried, didn't like it, then decided that I prefer YUI anyway, and used
YUI RTE instead. Works fine in views (:present-as (yui-editor
:max-length 16000 :rows 15 :cols 45 :config *default-editor-config*)),
but requires the presentation-dom-id patch and the rest of my yui
branch.

Appropriate YUI modules get loaded on demand when needed, obviously, so
you don't pay the price on every page.

--J.

Ian Eslick

unread,
Jan 26, 2009, 6:30:26 AM1/26/09
to webl...@googlegroups.com
How compatible is your yui branch with -dev, and are there any plans
to integrate directly or as a contrib one of the yui branches being
worked on?

Thank you,
Ian

Jan Rychter

unread,
Jan 26, 2009, 7:22:49 AM1/26/09
to webl...@googlegroups.com
Ian Eslick <esl...@media.mit.edu> writes:

> How compatible is your yui branch with -dev, and are there any plans
> to integrate directly or as a contrib one of the yui branches being
> worked on?

It requires presentation-dom-id, I'm not sure if that made it into -dev
yet (it really should).

Otherwise, the current tip of my YUI branch is adapted to my
navigation-rewrite branch, but if you skip back two patches (to commit
fd7a9e6624c965aa9a2c3250a0c8c6a8c3b54c23), it should apply just fine to
-dev, as it's mostly self-contained.

You might want to know that there is another YUI effort by Leslie -- I
am not sure what its status is as of now.

--J.

Leslie P. Polzer

unread,
Jan 26, 2009, 2:08:32 PM1/26/09
to weblocks
> You might want to know that there is another YUI effort by Leslie -- I
> am not sure what its status is as of now.

Everything I have is in contrib/lpolzer/yui in mainline.

I have found TinyMCE easier to integrate but YUI's editor is also
good.
One's MMV. :)

Jan Rychter

unread,
Jan 26, 2009, 3:27:15 PM1/26/09
to webl...@googlegroups.com

Exactly. I seem to recall that I had problems with several editors on
one page, but I am not sure anymore.

--J.

o_z

unread,
Jan 8, 2013, 9:26:33 AM1/8/13
to webl...@googlegroups.com, j...@rychter.com


понедельник, 26 января 2009 г., 22:27:15 UTC+2 пользователь Jan Rychter написал:
Here is code I've used https://gist.github.com/4484141 It's trivial 
Reply all
Reply to author
Forward
0 new messages