Quantcast
Channel: Adobe Community: Message List - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 3715

Technique to undo a character format application?

$
0
0

Hi,

 

Seems that answers to complicated questions are a bit sparse in these parts, but I'll try again anyway

 

I'm wondering if there is any technique to reliably undo a character format application change; that is, an application of properties to a range of text with SetTextProps(). It is fairly simple to remember a list of original properties (PropVals) and the original text range (TextRange), then reapply those original properties to the whole range. However, within a text range, each character can have its own unique set of properties. So, remembering one set of original properties is not enough... seems I have to remember the properties of every single character in the range, the reapply character-by-character, in order to ensure that the new property application is completely undone.

 

When you apply a character format in the GUI, FM reliably allows an undo, restoring each affected character to its original state. Surely it isn't remembering a PropVals array for every single character (?)  I'm just wondering if there is another trick here. It's entirely possible if FM is internally using another trick, it isn't one that I can feasibly replicate.

 

Thanks,

Russ


Viewing all articles
Browse latest Browse all 3715

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>