Tag: pagedown

Pagedown markdown脚本一次插入图片url

我有一个修改的pagedown markdown标记脚本,用于将图像url插入编辑器,但它只在第一次工作。 我用评论解释了我的代码 (function () { var converter = new Markdown.Converter(); var help = function () { window.open(‘http://mywebsite.com/editing-help’); } var editor = new Markdown.Editor(converter); editor.hooks.set(‘insertImageDialog’, function(callback) { setTimeout(function () { //i use bootstrap dialog to enter the url $(‘#fileModal’).modal(‘show’); /*i have a button for clearing the textbox when i open it the second time since […]

让PageDown和MathJax一起工作

我正在实现一个看起来非常像math.stackexchange.com上的UI : 使用花哨的Markdown就像你习惯于stackoverflow一样 在$ … $ -signs之间使用MathJax解析公式。 所以我下载了PageDown演示并进行了设置,效果非常好。 现在我尝试在每次更改时动态加载MathJax。 MathJax为这种方法得到了一个例子 ,但我无法让它运行。 这就是“我的”代码: MathJax.Hub.Config({ tex2jax: { inlineMath: [[“$”,”$”],[“\\(“,”\\)”]] } }); $(“#wmd-input”).keypress(function(event){ UpdateMath($(this).val()); }); (function () { var QUEUE = MathJax.Hub.queue; // shorthand for the queue var math = null; // the element jax for the math output. QUEUE.Push(function () { math = MathJax.Hub.getAllJax(“#wmd-preview”)[0]; }); window.UpdateMath = […]