Natürlich, das verstehe ich. Das ist der Code den ich pro Seite einbinde, um den Formeleditor zu benutzen (wird dann in eine interne Variable abgespeichert). Die Frage hätte ich per html Feld davor gesetzt.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src="
https://www.wiris.net/demo/editor/editor"></script>
<script>
var editor;
window.onload = function () {
editor = com.wiris.jsEditor.JsEditor.newInstance({'language': 'en', 'hand':'false', 'toolbar':'<toolbar removeLinks="true"><tab ref="general" rows="2"><removeItem ref="forceLigature" /><removeItem ref="rtl" /><removeItem ref="setFontSize" /><removeItem ref="setFontFamily" /><section><item ref="↓"/><item ref="←"/><item ref="↓"/><item ref="↑"/></section><section><item ref="table"/><item ref="≡"/><item ref=">"/><item ref="<"/><item ref="parenthesisTable"/><item ref="≈"/></section><section><item ref="α"/><item ref="β"/><item ref="γ"/><item ref="δ"/><item ref="ε"/><item ref="ζ"/></section></tab></toolbar>'});
editor.insertInto(document.getElementById('editorContainer'));
}
SoSciTools.questionnaire.attachCheck(function() {
var canvas = document.getElementsByClassName("wrs_canvas");
function sendImage() {
var imageBlob = canvas.toBlob(sendBLOB);
state = "sent";
return true;
}
var input = document.getElementById("E002_01");
var wert = editor.getMathML();
input.value = wert;
return true;
})
</script>
<div style="height:500px; width:500" id="editorContainer"></div>