Class CmsCodeMirrorScriptLoader


  • public class CmsCodeMirrorScriptLoader
    extends java.lang.Object
    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.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void load​(java.lang.Runnable callback)
      Asynchronously loads all scripts / stylesheets and calls the given callback at the end.
      void load​(java.lang.String path)
      Loads the script from the given path (which is treated as relative to the CodeMirror base URI.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • load

        public void load​(java.lang.Runnable callback)
        Asynchronously loads all scripts / stylesheets and calls the given callback at the end.
        Parameters:
        callback - the callback to execute after script loading
      • load

        public void load​(java.lang.String path)
        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