mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12: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
|
Antaeus Feldspar @afeldspar 2015/10/20
|
||||||
|
|
||||||
Soeren Enevoldsen, @senevoldsen90, 2015/10/09
|
Soeren Enevoldsen, @senevoldsen90, 2015/10/09
|
||||||
|
|
||||||
|
Santiago Pelufo, @spelufo, 2015/12/18
|
||||||
|
@ -34,9 +34,10 @@ KaTeXWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
this.execute();
|
this.execute();
|
||||||
// Get the source text
|
// Get the source text
|
||||||
var text = this.getAttribute("text",this.parseTreeNode.text || "");
|
var text = this.getAttribute("text",this.parseTreeNode.text || "");
|
||||||
|
var displayMode = this.getAttribute("displayMode",this.parseTreeNode.displayMode || "false") === "true";
|
||||||
// Render it into a span
|
// Render it into a span
|
||||||
var span = this.document.createElement("span"),
|
var span = this.document.createElement("span"),
|
||||||
options = {throwOnError: false};
|
options = {throwOnError: false, displayMode: displayMode};
|
||||||
try {
|
try {
|
||||||
if(!this.document.isTiddlyWikiFakeDom) {
|
if(!this.document.isTiddlyWikiFakeDom) {
|
||||||
katex.render(text,span,options);
|
katex.render(text,span,options);
|
||||||
|
Loading…
Reference in New Issue
Block a user