WISH: Diff.js

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

WISH: Diff.js

Alejandro Torras
Hi,

I am working in a project that uses kupu.

Kupu is a JS based XHTML editor.

It uses the designMode to edit the content but I have one problem: I
want to perform some transformations to the "background" html with
execCommand but it doesn't work with selected text
(window.getSelection()) and the executed changes are block wide (<p>,
<div>...)

I did a workaround working directly with DOM and Ranges, but I have no
undo command (execComand("undo")) so I thought to save diff's of changes
done in the editor that doesn't work with execComand method so... my
wish is:

Can you import to the utility classes a diff function?

I suppose that spidermonkey comes with utility classes, no?

Thank you.

atec_post.vcf (173 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: WISH: Diff.js

Brendan Eich
Alejandro Torras wrote:

> Hi,
>
> I am working in a project that uses kupu.
>
> Kupu is a JS based XHTML editor.
>
> It uses the designMode to edit the content but I have one problem: I
> want to perform some transformations to the "background" html with
> execCommand but it doesn't work with selected text
> (window.getSelection()) and the executed changes are block wide (<p>,
> <div>...)
>
> I did a workaround working directly with DOM and Ranges, but I have no
> undo command (execComand("undo")) so I thought to save diff's of changes
> done in the editor that doesn't work with execComand method so... my
> wish is:
>
> Can you import to the utility classes a diff function?
>
> I suppose that spidermonkey comes with utility classes, no?


SpiderMonkey is just the core JavaScript language engine, not the DOM or
editor stuff.  You want to use the mozilla.dom newsgroup.  Crossposting
with followup-to: set.

/be
_______________________________________________
mozilla-jseng mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-jseng