tinymce.dom.StyleSheetLoader
This class handles loading of external stylesheets and fires events when these are loaded.
Methods
name | summary | defined by |
---|---|---|
load() | Loads the specified CSS file and calls the `success` callback if successfully loaded, otherwise calls `failure`. | tinymce.dom.StyleSheetLoader |
loadAll() | Loads the specified CSS files and calls the `success` callback if successfully loaded, otherwise calls `failure`. | tinymce.dom.StyleSheetLoader |
unload() | Unloads the specified CSS file if no resources currently depend on it. Added in TinyMCE 5.5 | tinymce.dom.StyleSheetLoader |
unloadAll() | Unloads each specified CSS file if no resources currently depend on it. Added in TinyMCE 5.5 | tinymce.dom.StyleSheetLoader |
Methods
load
load(url:String, success:Function, failure:Function)
Loads the specified CSS file and calls the `success` callback if successfully loaded, otherwise calls `failure`.
Parameters
- url (String) - Url to be loaded.
- success (Function) - Callback to be executed when loaded.
- failure (Function) - Callback to be executed when failed loading.
loadAll
loadAll(urls:Array, success:Function, failure:Function)
Loads the specified CSS files and calls the `success` callback if successfully loaded, otherwise calls `failure`.
Parameters
- urls (Array) - URLs to be loaded.
- success (Function) - Callback to be executed when the style sheets have been successfully loaded.
- failure (Function) - Callback to be executed when the style sheets fail to load.
unload
unload(url:String)
Unloads the specified CSS file if no resources currently depend on it.
Added in TinyMCE 5.5
Parameters
- url (String) - URL to unload or remove.
unloadAll
unloadAll(urls:Array)
Unloads each specified CSS file if no resources currently depend on it.
Added in TinyMCE 5.5
Parameters
- urls (Array) - URLs to unload or remove.
Can't find what you're looking for? Let us know.
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.