Todor Todorov
2006-02-05 14:52:25 UTC
I am writing a HTML editor. I have a challenge the atomicselection attribute
in IE 6. Let me give an example:
Here is some text with <span atomicselection="true">an atomic selectable
part</span>.
If the user selects the span, the selection will look like this:
Here is some text with <span atomicselection="true">[sel_start]an atomic
selectable part[sel_end]</span>.
The user can now copy and paste or simply drag and drop the selected text.
The result can look like this:
Here is some [sel_start]an atomic selectable part[sel_end] text with <span
atomicselection="true"></span>.
It is clear that the user now moved the "atomic" text out of the
atomicselection tag and the text is no longer protected. The user can edit
it as (s)he wishes.
Can ypu please point to a solution to this problem? One idea I had is to
extend the selection to include the <span> tag as well, but I don't know ho
to do that. I am hosting the web browser control and have access to the COM
interfaces, but only limited access/influence on the HTML being displayed.
Thanks!
in IE 6. Let me give an example:
Here is some text with <span atomicselection="true">an atomic selectable
part</span>.
If the user selects the span, the selection will look like this:
Here is some text with <span atomicselection="true">[sel_start]an atomic
selectable part[sel_end]</span>.
The user can now copy and paste or simply drag and drop the selected text.
The result can look like this:
Here is some [sel_start]an atomic selectable part[sel_end] text with <span
atomicselection="true"></span>.
It is clear that the user now moved the "atomic" text out of the
atomicselection tag and the text is no longer protected. The user can edit
it as (s)he wishes.
Can ypu please point to a solution to this problem? One idea I had is to
extend the selection to include the <span> tag as well, but I don't know ho
to do that. I am hosting the web browser control and have access to the COM
interfaces, but only limited access/influence on the HTML being displayed.
Thanks!