Class StyleHandler
  
  Handler for performing simple operations with paragraph and character styles.
Remarks
  
  Constructors
  
  
  
  (constructor)(tw, colorPreviewService)
  Constructs a new instance of the StyleHandler class
Declaration
  
    constructor(tw: ITextWhizzHolder, colorPreviewService: IColorPreviewService);
   
  Parameters
  
  Properties
  
  
  
  colorPalette
  
  
  Declaration
  
    get colorPalette(): IColorPalette;
   
  Property Value
  
  
  
  isInitialized
  
  
  Declaration
  
    get isInitialized(): boolean;
   
  Property Value
  
  
  
  styleChangeEvent
  Character or paragraph style change event.
Declaration
  
    get styleChangeEvent(): EventObject<void>;
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | EventObject<void> | Character or paragraph style change event. | 
    
  
  Methods
  
  
  
  clearFormatForCurrentPosition()
  
  
  Declaration
  
    clearFormatForCurrentPosition(): void;
   
  Returns
  
  
  
  clearFormatForRange(textRange)
  
  
  Declaration
  
    clearFormatForRange(textRange: ITextRange): void;
   
  Parameters
  
  Returns
  
  
  
  getCharStyleForCurrentPosition()
  
  
  Declaration
  
    getCharStyleForCurrentPosition(): ICharStyle;
   
  Returns
  
  
  
  getCharStyleForPosition(position)
  
  
  Declaration
  
    getCharStyleForPosition(position: IPositionInText): ICharStyle;
   
  Parameters
  
  Returns
  
  
  
  getCharStyleForRange(range)
  
  
  Declaration
  
    getCharStyleForRange(range: ITextRange): ICharStyle | null;
   
  Parameters
  
  Returns
  
  
  
  getDefaultCharStyle()
  
  
  Declaration
  
    getDefaultCharStyle(): ICharStyle;
   
  Returns
  
  
  
  getDefaultParagraphStyle()
  
  
  Declaration
  
    getDefaultParagraphStyle(): IParagraphStyle;
   
  Returns
  
  
  
  getParagraphStyleByIndex(index)
  
  
  Declaration
  
    getParagraphStyleByIndex(index: number): IParagraphStyle;
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | number | index |  | 
    
  
  Returns
  
  
  
  getParagraphStyleForCurrentPosition()
  
  
  Declaration
  
    getParagraphStyleForCurrentPosition(): IParagraphStyle;
   
  Returns
  
  
  
  getParagraphStyleForRange(range)
  
  
  Declaration
  
    getParagraphStyleForRange(range: ITextRange): IParagraphStyle;
   
  Parameters
  
  Returns
  
  
  
  initialize(colorPalette)
  
  
  Declaration
  
    initialize(colorPalette: Collection<IColorData>): void;
   
  Parameters
  
  Returns
  
  
  
  setCharStyleForCurrentPosition(style)
  
  
  Declaration
  
    setCharStyleForCurrentPosition(style: ICharStyle): void;
   
  Parameters
  
  Returns
  
  
  
  setCharStyleForPosition(position, style)
  
  
  Declaration
  
    setCharStyleForPosition(position: IPositionInText, style: ICharStyle): void;
   
  Parameters
  
  Returns
  
  
  
  setCharStyleForRange(style, range)
  
  
  Declaration
  
    setCharStyleForRange(style: ICharStyle, range: ITextRange): void;
   
  Parameters
  
  Returns
  
  
  
  setDefaultCharStyle(style)
  
  
  Declaration
  
    setDefaultCharStyle(style: ICharStyle): void;
   
  Parameters
  
  Returns
  
  
  
  setDefaultParagraphStyle(style)
  
  
  Declaration
  
    setDefaultParagraphStyle(style: IParagraphStyle): void;
   
  Parameters
  
  Returns
  
  
  
  setParagraphStyleByIndex(index, style)
  
  
  Declaration
  
    setParagraphStyleByIndex(index: number, style: IParagraphStyle): void;
   
  Parameters
  
  Returns
  
  
  
  setParagraphStyleForCurrentPosition(style)
  
  
  Declaration
  
    setParagraphStyleForCurrentPosition(style: IParagraphStyle): void;
   
  Parameters
  
  Returns
  
  
  
  setParagraphStyleForRange(style, range)
  
  
  Declaration
  
    setParagraphStyleForRange(style: IParagraphStyle, range: ITextRange): void;
   
  Parameters
  
  Returns