AW: [daisy] Displaying a Diff next to the Editor

Bruno Dumon bruno at outerthought.org
Mon Jun 4 07:51:52 CDT 2007


On Mon, 2007-06-04 at 13:20 +0200, Hofmann. David wrote:
> 
> Thank you very much again for your detailed help!
> I managed to develop this extension and loading it into the iframe,
> including a dropdown menu to choose the version. Great!
> 
> Now comes the next stage, but I'm not sure if this is possible: Our
> editors even want to see the diff inside the WYSIWYG-Editor.
> 
> My concept is to load the Diff into the Editor, ignoring the <div
> class="unchanged"> Tags (not ignoring the content of the tags).  When
> the "Save"-Button is clicked, the class="removed" Elements should be
> removed from the code. Also the class="added" Tags need to be deleted,
> but with their content remaining.
> 
> This might work fine with simple modifications, but do you think this
> will work when e.g. a whole table structure is modified?
> I would like to hear your opinion about this.

I think this won't work except when you're lucky (e.g. when the changes
are very minimal). The text-diff is unaware of the HTML structure. This
is where Guy's HTML-diff project for gsoc would help.

> 
> To get started: I could not manage to find the function
> daisyutil:translateForHtmlArea() in the code. Can you tell me where it
> is located?

To completely replace the HTML in the htmlarea, it would need to go
through the initialization code again, which can be found in
daisy_edit.js, however this code is currently not isolated nor designed
for re-initialization. You're on your own here.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org                          bruno at apache.org



More information about the daisy mailing list