docs: function(switchText) {
      
      // note that the modal is active and set switchText
      if ((switchText === undefined) || (switchText)) {
        switchText = true;
        DataSaver.updateValue('modalActive', 'true');
        modalViewer.active = true;
      }
      
      // send a message to the pattern
      var obj = JSON.stringify({ 'event': 'patternLab.patternQuery', 'switchText': switchText });
      document.getElementById('sg-viewport').contentWindow.postMessage(obj, modalViewer.targetOrigin);
      
    }