We have this template:
class MyTemplate() : Template<HTML> {
val param = Placeholder<FlowContent>()
override fun HTML.apply() {
body {
div {
+"Param: "
insert(param)
}
}
}
}
What code should be placed in the routing handler for the user to see the following output in the browser:
1)
call.respondHtmlTemplate(MyTemplate()) {
b {
del {
+"some text1"
}
}
i {
ins {
+"some text2"
}
}
}
2)
call.respondHtmlTemplate(MyTemplate()) {
+"<b><del>some text1</del></b>"
+"<i><ins>some text2</ins></i>"
}
3)
call.respondHtmlTemplate(MyTemplate()) {
param {
i {
ins {
+"some text1"
}
}
b {
del {
+"some text2"
}
}
}
}
4)
call.respondHtmlTemplate(MyTemplate()) {
param {
+"<i><ins>some text1</ins></i>"
+"<b><del>some text2</del></b>"
}
}
5)
call.respondHtmlTemplate(MyTemplate()) {
param {
b {
del {
+"some text1"
}
}
i {
ins {
+"some text2"
}
}
}
}
6)
call.respondHtmlTemplate(MyTemplate()) {
param {
+"<b><del>some text1</del></b>"
+"<i><ins>some text2</ins></i>"
}
}
You can run these code snippets in the IDE and see the results.