diff --git a/appengine/README.txt b/appengine/README.txt index f91e2d86a..6ad341cb1 100644 --- a/appengine/README.txt +++ b/appengine/README.txt @@ -30,6 +30,7 @@ blockly/ |- blocks_compressed.js |- dart_compressed.js |- javascript_compressed.js + |- php_compressed.js `- python_compressed.js Instructions for fetching the optional Closure library may be found here: diff --git a/demos/blockfactory/index.html b/demos/blockfactory/index.html index 4fb4e61ac..44cea2e5c 100644 --- a/demos/blockfactory/index.html +++ b/demos/blockfactory/index.html @@ -134,6 +134,7 @@ diff --git a/demos/code/code.js b/demos/code/code.js index 2fed68b40..7dac1d43a 100644 --- a/demos/code/code.js +++ b/demos/code/code.js @@ -243,7 +243,7 @@ Code.LANG = Code.getLang(); * List of tab names. * @private */ -Code.TABS_ = ['blocks', 'javascript', 'python', 'dart', 'xml']; +Code.TABS_ = ['blocks', 'javascript', 'php', 'python', 'dart', 'xml']; Code.selected = 'blocks'; @@ -318,6 +318,14 @@ Code.renderContent = function() { code = prettyPrintOne(code, 'py'); content.innerHTML = code; } + } else if (content.id == 'content_php') { + code = Blockly.PHP.workspaceToCode(Code.workspace); + content.textContent = code; + if (typeof prettyPrintOne == 'function') { + code = content.innerHTML; + code = prettyPrintOne(code, 'php'); + content.innerHTML = code; + } } else if (content.id == 'content_dart') { code = Blockly.Dart.workspaceToCode(Code.workspace); content.textContent = code; diff --git a/demos/code/index.html b/demos/code/index.html index 9bcc045aa..663dbd3c4 100644 --- a/demos/code/index.html +++ b/demos/code/index.html @@ -10,6 +10,7 @@ + @@ -36,6 +37,8 @@   Python   + PHP +   Dart   XML @@ -61,6 +64,7 @@

+  

   

   

   
diff --git a/demos/index.html b/demos/index.html
index fafcb1963..8af600662 100644
--- a/demos/index.html
+++ b/demos/index.html
@@ -168,7 +168,7 @@
       
       
         
Code Editor
-
Export a Blockly program into JavaScript, Python, Dart or XML.
+
Export a Blockly program into JavaScript, Python, PHP, Dart or XML.