Re: WISH: Diff.js

classic Classic list List threaded Threaded
3 messages Options
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-dom mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-dom
Reply | Threaded
Open this post in threaded view
|

Re: WISH: Diff.js

Alejandro Torras
Brendan Eich wrote:

> 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
Thank you for your explanation. I am a really newbie... :-)

I think I have not expressed myself well.

First of all, I have posted there because I have not found any general
JS related newsgroup, and surfing over there I found the unique
reference in http://www.mozilla.org/js/

I didn't want to disturb anybody crossposting the message. I thought the
JS newsgroup was the right place.

What I wanted to say is that I don't know if Mozilla has a library of
functions at the top level accessible with JavaScript and, if it exists,
is a "diff" function included?

Best regards.

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

Re: WISH: Diff.js - Link to diff.js

Alejandro Torras
Alejandro Torras wrote:
> Brendan Eich wrote:
>> Alejandro Torras wrote:
>>> Hi,
>>>
>>> I am working in a project that uses kupu.
[...]

>>> 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
> Thank you for your explanation. I am a really newbie... :-)
[...]

> What I wanted to say is that I don't know if Mozilla has a library of
> functions at the top level accessible with JavaScript and, if it exists,
> is a "diff" function included?
>
> Best regards.

I found a link to a diff function in JS:

http://nomatic.org/svn/svnbrowser/trunk/code/Global/Diff.js/source.page?revision=150&format=text

I hope it would be useful.

atec_post.vcf (173 bytes) Download Attachment