markdown tables, sanitize mode off unless collaboration active
This commit is contained in:
parent
ccbf8336ea
commit
19cca8f0d6
5 changed files with 20 additions and 20 deletions
|
@ -458,17 +458,7 @@ $(function(){
|
|||
.html('') // unnecessary?
|
||||
.html(md);
|
||||
|
||||
refreshWordCount();
|
||||
}
|
||||
|
||||
function refreshWordCount(selectionCount){
|
||||
var msg = "Words: ";
|
||||
if (selectionCount !== undefined) {
|
||||
msg += selectionCount + " of ";
|
||||
}
|
||||
if (profile.wordcount) {
|
||||
$wordcounter.text(msg + countWords(getTextInElement($preview[0])));
|
||||
}
|
||||
//refreshWordCount();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,7 +32,7 @@ WMD.convert = function(content, options) {
|
|||
var doc = {raw: content, markdown: content};
|
||||
var opt = WMD.readOptions(options);
|
||||
WMD.preprocess(doc, opt);
|
||||
doc.html = WMD.processor(doc.markdown);
|
||||
doc.html = WMD.processor(doc.markdown, true);
|
||||
WMD.postprocess(doc, opt);
|
||||
doc.toString = function () {
|
||||
return doc.html;
|
||||
|
@ -52,8 +52,8 @@ function gsub(str, re, fn, /*optional*/newstr) {
|
|||
}
|
||||
return newstr + str;
|
||||
}
|
||||
|
||||
WMD.processor = new Showdown.converter().makeHtml;
|
||||
WMD.showdown = new Showdown.converter({extensions: ['table']});
|
||||
WMD.processor = WMD.showdown.makeHtml;
|
||||
|
||||
WMD.preprocessors = {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue