com.ephox.editlive.view.style
Interface StyleManager


public interface StyleManager

Manages styles within the EditLive! document.

Since:
7.5

Method Summary
 void addTemporaryStyle(String selector, String rules)
          Add a temporary style to the spreadsheet.
 void notifyOfStyleChanges()
          Notify the editor of a wholesale change to the document styles.
 void notifyOfStyleChanges(int start, int length)
          Notify the editor of style changes in a given area of the document.
 

Method Detail

addTemporaryStyle

void addTemporaryStyle(String selector,
                       String rules)
Add a temporary style to the spreadsheet. Temporary styles are hidden from the HTML output of EditLive!.

Parameters:
selector - class selector (text before the {} in a CSS style)
rules - selector rules (text between the {} in a CSS style)

notifyOfStyleChanges

void notifyOfStyleChanges()
Notify the editor of a wholesale change to the document styles. This method should be used sparingly as it causes the entire document to be re-rendered which is a comparatively slow process and can cause flickering.


notifyOfStyleChanges

void notifyOfStyleChanges(int start,
                          int length)
Notify the editor of style changes in a given area of the document. This is preferred over notifyOfStyleChanges() as it does not cause the entire document to be rerendered.

Parameters:
start - start position of the affected style change
length - length of the text affected by this style change

Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved.