mirror of
https://github.com/google/blockly.git
synced 2026-01-06 16:40:07 +01:00
@@ -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';
|
||||
|
||||
@@ -324,6 +324,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;
|
||||
|
||||
Reference in New Issue
Block a user