components/blockly-src/demos/blockfactory/factory.js
function formatChange() {
  var mask = document.getElementById('blocklyMask');
  var languagePre = document.getElementById('languagePre');
  var languageTA = document.getElementById('languageTA');
  if (document.getElementById('format').value == 'Manual') {
    Blockly.hideChaff();
    mask.style.display = 'block';
    languagePre.style.display = 'none';
    languageTA.style.display = 'block';
    var code = languagePre.textContent.trim();
    languageTA.value = code;
    languageTA.focus();
    updatePreview();
  } else {
    mask.style.display = 'none';
    languageTA.style.display = 'none';
    languagePre.style.display = 'block';
    updateLanguage();
  }
  disableEnableLink();
}
function formatChange() {
  var mask = document.getElementById('blocklyMask');
  var languagePre = document.getElementById('languagePre');
  var languageTA = document.getElementById('languageTA');
  if (document.getElementById('format').value == 'Manual') {
    Blockly.hideChaff();
    mask.style.display = 'block';
    languagePre.style.display = 'none';
    languageTA.style.display = 'block';
    var code = languagePre.textContent.trim();
    languageTA.value = code;
    languageTA.focus();
    updatePreview();
  } else {
    mask.style.display = 'none';
    languageTA.style.display = 'none';
    languagePre.style.display = 'block';
    updateLanguage();
  }
  disableEnableLink();
}
function formatChange ( ) { var mask = document . getElementById ( 'blocklyMask' ) ; var languagePre = document . getElementById ( 'languagePre' ) ; var languageTA = document . getElementById ( 'languageTA' ) ; if ( document . getElementById ( 'format' ) . value == 'Manual' ) { Blockly . hideChaff ( ) ; mask . style . display = 'block' ; languagePre . style . display = 'none' ; languageTA . style . display = 'block' ; var code = languagePre . textContent . trim ( ) ; languageTA . value = code ; languageTA . focus ( ) ; updatePreview ( ) ; } else { mask . style . display = 'none' ; languageTA . style . display = 'none' ; languagePre . style . display = 'block' ; updateLanguage ( ) ; } disableEnableLink ( ) ; }
Change the language code format.
Change the language code format .