Skip to content

Commit 618b816

Browse files
committed
htmlGroovy cont
1 parent 189da8c commit 618b816

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

Tutorial-o-Matic/src/main/groovy/ToM.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class ToM{
278278
buttonPanel.metaClass.pending = false
279279
myP.add(buttonPanel, tomui.GBC)
280280
} else {
281-
def textoHtml = '<html><body><p>Command not encountered in Menu for active map</p></body></html>'
281+
def textoHtml = '<html><body><p>No script encountered in tutorial node</p></body></html>'
282282
myP.add(tomui.createInstructionsPane(textoHtml), tomui.GBC)
283283
}
284284
}

Tutorial-o-Matic/src/main/groovy/ToM_ui.groovy

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@ class ToM_ui{
123123
}
124124
return html
125125
}
126+
127+
def static getHtmlFromGroovyNode(nodo, script){
128+
def html = """<html>
129+
<style>${htmlStyle}</style>
130+
<body>
131+
<h3>${nodo.text}</h3>
132+
<pre><code>${script}</code></pre>
133+
</body>
134+
</html>"""
135+
return html
136+
}
126137

127138
def static createInstructionsPane(nodo){
128139
return createInstructionsPane(getHtmlFromNote(nodo))

0 commit comments

Comments
 (0)