Discussion:
Toggle text class at end of tag
Peter Bowman
2004-04-02 17:32:15 UTC
Permalink
Hi Christian,

I'm having an interesting problem with toggling of text classes where the
selection is right up to the end of the tag.

For example, if I have

<para>Some text</para>
<para>Some other text</para>

and I attempt to make "text" in the first <para> tag bold, the first and
second para tags then merge into each other. If I make anything bold that
doesn't include the last "t" of "text", it works fine. This is repeatable in
the inline example - but only on text typed in since the editor was loaded.

In my own code, I had table <cell> elements, and if I attempted to make the
last character of text in the element bold or whatever, the bold tag would
end up *outside* the <cell> tag! I.e. <b><cell>Text</cell></b>. I guess this
could be the same problem as above.

Thanks!
Pete Bowman.
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Christian Stocker
2004-04-03 09:31:28 UTC
Permalink
Hi
Post by Peter Bowman
Hi Christian,
I'm having an interesting problem with toggling of text classes where the
selection is right up to the end of the tag.
For example, if I have
<para>Some text</para>
<para>Some other text</para>
and I attempt to make "text" in the first <para> tag bold, the first and
second para tags then merge into each other. If I make anything bold that
doesn't include the last "t" of "text", it works fine. This is repeatable in
the inline example - but only on text typed in since the editor was loaded.
Yes, the selection stuff on element-"borders" is sometimes tricky...
Post by Peter Bowman
In my own code, I had table <cell> elements, and if I attempted to make the
last character of text in the element bold or whatever, the bold tag would
end up *outside* the <cell> tag! I.e. <b><cell>Text</cell></b>. I guess this
could be the same problem as above.
Yes, could be the same problem.

I currently don't have a solution to that problem, it's really hard, to
do the "right" thing in such situations...

Could you please file a bugreport, so that it doesn't get forgotten?

chregu
--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | ***@bitflux.ch | gnupg-keyid 0x5CE1DECB
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Peter Bowman
2004-04-05 09:38:19 UTC
Permalink
Thanks - added to Bugzilla.

I wondered if a workaround might be to add a character to the end of the
selection, then perform the toggle, then remove the added character. Since
it always works where the selection isn't adjacent to an end tag, this would
at least mean that it would work even if it isn't particularly pretty.

At the moment my future users would be faced with a strange situation where
their hard work gets mangled if they don't obey an obscure set of rules
(like "don't select up to the end of a tag").

Thanks,
Pete.
-----Original Message-----
Sent: 03 April 2004 10:31
To: Peter Bowman
Subject: Re: [bx-editor-dev] Toggle text class at end of tag
Hi
Post by Peter Bowman
Hi Christian,
I'm having an interesting problem with toggling of text
classes where
Post by Peter Bowman
the selection is right up to the end of the tag.
For example, if I have
<para>Some text</para>
<para>Some other text</para>
and I attempt to make "text" in the first <para> tag bold,
the first
Post by Peter Bowman
and second para tags then merge into each other. If I make anything
bold that doesn't include the last "t" of "text", it works
fine. This
Post by Peter Bowman
is repeatable in the inline example - but only on text
typed in since
Post by Peter Bowman
the editor was loaded.
Yes, the selection stuff on element-"borders" is sometimes tricky...
Post by Peter Bowman
In my own code, I had table <cell> elements, and if I attempted to
make the last character of text in the element bold or
whatever, the
Post by Peter Bowman
bold tag would end up *outside* the <cell> tag! I.e.
<b><cell>Text</cell></b>. I guess this could be the same problem as
above.
Yes, could be the same problem.
I currently don't have a solution to that problem, it's
really hard, to
do the "right" thing in such situations...
Could you please file a bugreport, so that it doesn't get forgotten?
chregu
--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 |
ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88
60 | fax +41 1 240 56 71 http://www.bitflux.ch |
--
bx-editor-dev mailing list
bx-editor-***@lists.bitflux.ch
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-dev
Loading...