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