mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Add displayMode attribute to katex widget.
This commit is contained in:
parent
c2105de49c
commit
aaf3e6bb9e
@ -256,3 +256,5 @@ Tony Grosinger @tgrosinger 2015/10/03
|
||||
Antaeus Feldspar @afeldspar 2015/10/20
|
||||
|
||||
Soeren Enevoldsen, @senevoldsen90, 2015/10/09
|
||||
|
||||
Santiago Pelufo, @spelufo, 2015/12/18
|
||||
|
@ -34,9 +34,10 @@ KaTeXWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.execute();
|
||||
// Get the source text
|
||||
var text = this.getAttribute("text",this.parseTreeNode.text || "");
|
||||
var displayMode = this.getAttribute("displayMode",this.parseTreeNode.displayMode || "false") === "true";
|
||||
// Render it into a span
|
||||
var span = this.document.createElement("span"),
|
||||
options = {throwOnError: false};
|
||||
options = {throwOnError: false, displayMode: displayMode};
|
||||
try {
|
||||
if(!this.document.isTiddlyWikiFakeDom) {
|
||||
katex.render(text,span,options);
|
||||
|
Loading…
Reference in New Issue
Block a user