Theme feature handling
Methods
currentStyle() → {string}
Get the path to the current theme stylesheet
Returns:
HREF of current stylesheet
- Type
- string
fixPre(newStyleClass)
Fix all pre blocks
Parameters:
Name | Type | Description |
---|---|---|
newStyleClass |
string | The new style class to fix for |
fixPreBG()
Update code block backgrounds
fixPreWithDelay(delayopt)
Fix all pre blocks after a delay
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
delay |
number |
<optional> |
Timeout in milliseconds |
fixSinglePre(el)
Fix formatting for single <pre>
block
Parameters:
Name | Type | Description |
---|---|---|
el |
DOMElement | DOM pre element |
setStyle(newStyle) → {string}
Set the main preview theme
Parameters:
Name | Type | Description |
---|---|---|
newStyle |
string | Path to the new style to set |
Returns:
Path to new preview theme;
- Type
- string
setSyntaxStyle(newStyle) → {string}
Change syntax highlighting theme
Parameters:
Name | Type | Description |
---|---|---|
newStyle |
string | The new style |
Returns:
path to new stylesheet
- Type
- string
updateCSS(cssID)
Update or change the current theme
Parameters:
Name | Type | Description |
---|---|---|
cssID |
string | The target css element id |