RealObjects Nimbudocs Editor 2.5.3885_Beta5

Class: StyleSheet


NimbudocsEditor. StyleSheet

This object describes the properties of an individual style sheet contained the list of all author, document or editor style sheets.

Properties

contentStringreadonly
The styles contained in this style sheet.
Type:
  • String
titleStringreadonly
The title of this style sheet if it has one.
Type:
  • String
typeStringreadonly
The type of this style sheet object. This is either author, document or editor.
Type:
  • String

Methods

add(styles)
Adds styles to this style sheet object.
Parameters:
Name Type Description
styles String The styles to add to this style sheet object.
Example:
 editor.fetchUserStyleSheets().then(function(sheets) { sheets[0].add("p { color: red }"); });
remove()
Removes this style sheet object and all styles it contains.
Example:
 editor.fetchUserStyleSheets().then(function(sheets) { sheets[0].remove(); });