Class CmsCodeMirrorScriptLoader
java.lang.Object
org.opencms.acacia.client.widgets.code.CmsCodeMirrorScriptLoader
Helper class that asynchronously loads all the necessary scripts and stylesheets for the CodeMirror editor widget, and
executes a callback at the end.
Scripts are loaded (unless they've already been loaded before) with the async=false option, which causes them to be executed in order, and a special dummy script is loaded at the end to execute the callback.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CmsCodeMirrorScriptLoader
public CmsCodeMirrorScriptLoader()Creates a new instance.
-
-
Method Details
-
load
Asynchronously loads all scripts / stylesheets and calls the given callback at the end.- Parameters:
callback
- the callback to execute after script loading
-
load
Loads the script from the given path (which is treated as relative to the CodeMirror base URI.- Parameters:
path
- the path to load the script from
-