Skip navigation
Currently Being Moderated

Remove userStyle entry without ApplyElementUserStyleOperation?

Mar 9, 2012 1:14 AM

Tags: #textlayoutframework #editmanager #applyelementuserstyleoperation

ApplyElementUserStyleOperation is deprecated with TLF 2.0. But I can't find a way to remove a userStyle without it. If I try to use ApplyFormatToElement with a TextLayoutFormat, it won't clear userStyles set to "undefined", just as it won't clear other styles.

 

Any suggestions? My code is working now using ApplyElementUserStyleOperation, but it always feels wrong to use deprecated methods.

 
Replies
  • Currently Being Moderated
    Mar 11, 2012 11:12 PM   in reply to casper_no

    Use “delete” to undefine a property

    if (val === undefined) delete _styles[val];

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 12, 2012 7:35 PM   in reply to casper_no

    ClearFormatOnElementOperation or ClearFormatOperation

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points