anchor.diff:          });
   
           $(window).resize(() => this._relocateTrash());
  +      },
  +
  +
  +      /**
  +       * Initializes a workspace using a custom toolbox.
  +       *
  +       * Blockly's workspace is destroyed when toolbox changes, so initialization
  +       * is performed here
  +       */
  +      _initializeCustomToolboxBlocklyWorkspace(toolboxXml) {
  +        this._getBlockly().toolbox = { defaultToolbox: toolboxXml };
  +        this._initializeBlocklyWorkspace();
  +      },
  +
  +      /**
  +       * Initializes a workspace using a non-custom toolbox.
  +       *
  +       * Blockly's workspace is destroyed when toolbox changes,
  +       * so this method will initialize it only if a there is a custom toolbox
  +       * that will be called later.
  +       */
  +      _initializeNonCustomToolboxBlocklyWorkspace() {
  +        if (!this.hasCustomToolbox()) {
  +          this._initializeBlocklyWorkspace();
  +        }
         },
   
         _initializeBlocklyWorkspace() {
  
positive.code: 
        hasInteractiveProgram() {
          return this._getBlockly().initialXml.indexOf("block type=\"InteractiveProgram\"") !== -1;
        },
  
        hasCustomToolbox() {
          return $('gs-toolbox').length;
        },
  
        toggleInteractiveMode() {
  
negative.code:         this._scrollToMainBlock();
        },
  
        /**
         * Configures a custom toolbox using a toolbox url
         * This method does nothing if editor is read-only, but
         * assumes a gs-toolbox element is present - otherwise it would
         * have no sense to have a toolboxUrl.
         */
        configureCustomToolboxFromUrl(toolboxUrl) {
          if (!this.readOnly) {
            $.get(toolboxUrl, (toolboxXml) => {
              this._initializeCustomToolboxBlocklyWorkspace(toolboxXml);
            });
          }
        },
  
        /**
         * Wether a custom toolbox is required. Read only editors and gs-toolbox-less context
         * don't require it
         */
        hasCustomToolbox() {
          return !this.readOnly && $('gs-toolbox').length;
        },
  
        compile(code) {
  