editor->lexer->drop(alt != 0);
}
+extern "C" int
+c_mathml_editor_cursor_hide(Editor* editor)
+{
+ assert(editor);
+ return editor->parser->hideCursor();
+}
+
+extern "C" int
+c_mathml_editor_cursor_show(Editor* editor)
+{
+ assert(editor);
+ return editor->parser->showCursor();
+}
+
extern "C" char*
c_mathml_editor_get_tex(const Editor* editor)
{
assert(editor);
DOM::Document res = editor->tml_tex->apply(editor->parser->document());
- DOM::Element root = res.get_documentElement();
- return strdup(std::string(root.get_nodeValue()).c_str());
+ assert(res);
+ res.normalize();
+ assert(res.get_firstChild() && res.get_firstChild().get_nodeName() == "#text");
+ return strdup(std::string(res.get_firstChild().get_nodeValue()).c_str());
}
extern "C" void