[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta-devel
Subject:    Re: [quanta-devel] Re: KDOM
From:       Paulo Moura Guedes <moura () kdewebdev ! org>
Date:       2005-05-20 13:51:55
Message-ID: 200505201451.55406.moura () kdewebdev ! org
[Download RAW message or body]

On Friday 20 May 2005 04:51, Jens Herden wrote:
> > > The serialization API works great, and you can finetune quite some
> > > stuff. (ie. 'pretty-ident' mode etc...)
> >
> > Currently, for copy/cut/paste, we have to serialize the nodes ourselves.
>
> Yes this is what we do and this is not the way it should work in the future
> IMHO.

I have the same opinion. There must be a more normalized way.

> 1. in the future we should not save the text that was parsed inside the
> node. Just the coordinates is sufficient, if we need the text we can look
> into the texteditor.

Yes. But we have to take care of the indentation... maybe we could just save 
the indentation text like "\n     ".

> 2. in order to preserve the user formatted source we should copy/cut/paste
> just in the textdocument. Then we can use the undo feature of the
> texteditor. We have to take care of syncing the dom tree though.

Interesting thought... so you mean making the the changes in the node tree and 
then synch the text editor. I see some disadvantages though:
1. in VPL you'll have to rebuild all the tree when undoing.
2. you can't have user defined indentation.
3. what holds the document is the tree not the text editor. So if count on the 
text to make changes to your document you'll soon will find some limitations 
like the first point.
I don't think this is a good approach.

> > This works well but it has some limitations. For example, if we want to
> > paste into VPL some data with text/html as mimetype we can't. We know
> > only to decode our custom data.
>
> Yes, a bad limitation.
>
> > I'm wondering if we can dump a string from a node subtree and build a
> > node subtree from XML text with kdom?
>
> This would destroy the user formatting.

It would apply the Quanta formating. See above. Eric want's custom indentation 
and I would like to implement that so I think it would be more an advantage 
that the opposite.

-- 
Paulo Moura Guedes

Linux Caixa Mágica  - http://caixamagica.org
KDE Web Development - http://kdewebdev.org
_______________________________________________
quanta-devel mailing list
quanta-devel@kde.org
https://mail.kde.org/mailman/listinfo/quanta-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic