mirror of
https://github.com/google/blockly.git
synced 2025-12-16 06:10:12 +01:00
Fixes to handling <pre> text content.
This commit is contained in:
@@ -148,7 +148,7 @@ BlockFactory.updateLanguage = function() {
|
||||
if (!BlockFactory.updateBlocksFlagDelayed) {
|
||||
var languagePre = document.getElementById('languagePre');
|
||||
var languageTA = document.getElementById('languageTA');
|
||||
code = languagePre.textContent.trim();
|
||||
code = languagePre.innerText.trim();
|
||||
languageTA.value = code;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -889,7 +889,7 @@ FactoryUtils.injectCode = function(code, id) {
|
||||
pre.textContent = code;
|
||||
code = pre.textContent;
|
||||
code = PR.prettyPrintOne(code, 'js');
|
||||
pre.textContent = code;
|
||||
pre.innerHTML = code;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user