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

List:       kde-kafka
Subject:    text formatting
From:       "Stephan Heigl" <stephan () eisscholle ! de>
Date:       2001-03-26 14:40:04
[Download RAW message or body]

For all of you confused people out there....
the following text has nothing todo with textmovin (se Re: Text Plugin) :)
It's just about formatting text:

Hmm, i cannot see your problems, perhaps i've misunderstood you. Text is
always formatted by its parent nodes, right? So the first thing to do would
be to check if there's e.g. a <B> parent of the current node (or range).
Setting properties is another thing, which requires in my opinion 2 steps.
First thing check if it's a selection (speak: range) or a "simple" node,
then create a new node (e.g. <B>) in the node's parent and move/reparent the
current node to the new node.
If it's a range, you have to separate the text node in 2 or 3 nodes and go o
n as above (as already done in kafkahtmlpart).
This of course blows up the HTML code. So the final step is polishing by
comparing the formating of the current textnode and it's parent nodes and if
they are the same merge those 2 nodes together again.

regards

stephan


_______________________________________________
Kde-kafka mailing list
Kde-kafka@master.kde.org
http://master.kde.org/mailman/listinfo/kde-kafka

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

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