Lots of fighting with CSS to get side-by-side editors and previews. Didn't really win. Turned turtle into a live TurtleScript editor.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3188 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2016-04-04 20:26:01 +00:00
parent cbf54eaa17
commit 3b5f123136
4 changed files with 254 additions and 71 deletions

View File

@ -52,7 +52,14 @@ function split(container, children) {
var shrink = children[i].shrink || "1";
var basis = children[i].basis || "auto";
node.setAttribute("style", "flex: " + grow + " " + shrink + " " + basis);
node.setAttribute("class", "terminal");
var classes = ["terminal"];
if (children[i].type == "vertical") {
classes.push("vbox");
} else if (children[i].type == "horizontal") {
classes.push("hbox");
}
node.setAttribute("class", classes.join(" "));
container.appendChild(node);
} else if (children[i].type) {
node = document.createElement("div");
@ -177,7 +184,7 @@ function printStructured(container, data) {
} else if (data.iframe) {
node = document.createElement("iframe");
node.setAttribute("srcdoc", data.iframe);
node.setAttribute("sandbox", "allow-forms allow-scripts");
node.setAttribute("sandbox", "allow-forms allow-scripts allow-top-navigation");
node.setAttribute("width", data.width || 320);
node.setAttribute("height", data.height || 240);
if (data.name) {