tinymce.dom.StyleSheetLoader

This class handles loading of external stylesheets and fires events when these are loaded.

Summary

Methods

Name Summary Defined by

load()

Loads the specified CSS file and calls the success callback if successfully loaded, otherwise calls failure.

StyleSheetLoader

loadAll()

Loads the specified CSS files and calls the success callback if successfully loaded, otherwise calls failure.

StyleSheetLoader

unload()

Unloads the specified CSS file if no resources currently depend on it.

Added in TinyMCE 5.5

StyleSheetLoader

unloadAll()

Unloads each specified CSS file if no resources currently depend on it.

Added in TinyMCE 5.5

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.