Skip to content

Commit 7655531

Browse files
authored
update (#8)
1 parent a430d5f commit 7655531

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

public/index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
<div id="gutter1" class="gutter"></div>
1414

15-
<div id="container2" class="container">
16-
<iframe src="https://view.officeapps.live.com/op/view.aspx?src=https://abap2xlsx.github.io/abap2xlsx-web/demo1.xlsx" title="Excel" width="800" height="600"></iframe>
17-
</div>
15+
<div id="container2" class="container"></div>
1816
</div>
1917
</body>
2018
</html>

src/index.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,25 @@ async function abapChanged() {
9595
reg.parse();
9696
abapMonaco.updateMarkers(reg, model1);
9797

98-
// const res = await new Transpiler().runRaw([{filename, contents}]);
98+
if (contents === abapfiles[top]) {
99+
document.getElementById("container2").innerHTML = `<iframe src="https://view.officeapps.live.com/op/view.aspx?src=https://abap2xlsx.github.io/abap2xlsx-web/demo1.xlsx" title="Excel"></iframe>`;
100+
101+
setTimeout(() => monaco.editor.getEditors()[0].focus(), 1000);
102+
} else {
103+
const markers = monaco.editor.getModelMarkers({});
104+
if (markers.length > 0) {
105+
let text = "<u><b>Code Issues</b></u><br>";
106+
for (const marker of markers) {
107+
text += marker.message + "<br>";
108+
}
109+
document.getElementById("container2").innerHTML = text;
110+
return;
111+
}
112+
113+
document.getElementById("container2").innerHTML = `todo, compiling`;
114+
115+
// const res = await new Transpiler().runRaw([{filename, contents}]);
116+
}
99117
} catch (error) {
100118
console.dir(error);
101119
}

0 commit comments

Comments
 (0)