Home Forums General XMetaL Discussion Insert Table Button XSD Reply To: Insert Table Button XSD

Derek Read

Reply to: Insert Table Button XSD

This new question is really about how the APIs function (and not where they are called from) I think, and more specifically, the way selections work in the two different views.

What an author can do in Normal view is more restricted (or more “guided”) than Tags On view. The Selection object mimics this and will function equally differently in these two views. You will have more success in your particular case if you use the Range object instead. It is allowed to do more than an author (and the Selection object) can do. It is invisible and can move to some locations that an author is guided away from in Normal view. The Selection object is useful for some cases (where you want to mimic the difference) but if you want your code to function the same in both views, and you want to use the APIs you are using, then it is probably best to use Range instead.

For even more power (in some cases) you may also wish to look into using the DOM APIs.