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.

StyleSheetLoader

unloadAll()

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

StyleSheetLoader

Methods

load()

load(url: String): Promise

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

Parameters

  • url (String) - Url to be loaded.

Return value

  • Promise - A promise that will resolve when the stylesheet is loaded successfully or reject if it failed to load.


loadAll()

loadAll(urls: Array): Promise

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

Parameters

  • urls (Array) - URLs to be loaded.

Return value

  • Promise - A promise that is resolved when all stylesheets are loaded or rejected if any failed to load.


unload()

unload(url: String)

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

Parameters

  • url (String) - URL to unload or remove.


unloadAll()

unloadAll(urls: Array)

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

Parameters

  • urls (Array) - URLs to unload or remove.