diff --git a/static/css/markdown.preview.css b/static/css/markdown.preview.css index bde4e456..e5002126 100644 --- a/static/css/markdown.preview.css +++ b/static/css/markdown.preview.css @@ -20,9 +20,6 @@ text-align: left } -.editormd-preview-container blockquote, .editormd-html-preview blockquote{ - font-style: normal; -} .editormd-preview-container table th { background-color: #f2f2f2; color: #333; diff --git a/static/editor.md/css/editormd.css b/static/editor.md/css/editormd.css index 98421476..77353329 100644 --- a/static/editor.md/css/editormd.css +++ b/static/editor.md/css/editormd.css @@ -3259,7 +3259,7 @@ } .markdown-body a { - color: #4183c4; + color: #08c; text-decoration: none; } @@ -3834,19 +3834,16 @@ background-color: #fff; } .editormd-preview-container blockquote, .editormd-html-preview blockquote { - color: #666; - border-left: 4px solid #ddd; - padding-left: 20px; - margin-left: 0; + color: #2C3E50; + border-left: 5px solid #D6DBDF; font-size: 14px; - font-style: italic; -} -.editormd-preview-container blockquote.default, .editormd-html-preview blockquote.default { - border-left: 5px solid #D0E3F0; + background: none repeat scroll 0 0 rgba(102,128,153,.05); margin: 8px 0; padding: 8px 16px; - background-color: #F0F7FD; - color: #0382AD; +} +.editormd-preview-container blockquote.default, .editormd-html-preview blockquote.default { + + } .editormd-preview-container blockquote.info, .editormd-html-preview blockquote.info { border-left-color: #5bc0de; diff --git a/static/editor.md/css/editormd.preview.css b/static/editor.md/css/editormd.preview.css index 267dfd55..4e4c4f82 100644 --- a/static/editor.md/css/editormd.preview.css +++ b/static/editor.md/css/editormd.preview.css @@ -3118,13 +3118,12 @@ background-color: #fff; } .editormd-preview-container blockquote, .editormd-html-preview blockquote { - color: #666; - border-left: 4px solid #ddd; - padding-left: 20px; - margin-left: 0; + color: #2C3E50; + border-left: 4px solid #D6DBDF; font-size: 14px; - font-style: italic; - line-height:1.7em; + background: none repeat scroll 0 0 rgba(102,128,153,.05); + margin: 8px 0; + padding: 8px 16px; } .editormd-preview-container p code, .editormd-html-preview p code { margin-left: 5px; @@ -3189,14 +3188,6 @@ font-family: "YaHei Consolas Hybrid", Consolas, "Microsoft YaHei", "Malgun Gothic", "Segoe UI", Helvetica, Arial !important; } -.editormd-preview-container blockquote.default, .editormd-html-preview blockquote.default { - border-left: 5px solid #D0E3F0; - margin: 8px 0; - padding: 8px 16px; - background-color: #F0F7FD; - color: #0382AD; - font-size: 14px; -} .editormd-preview-container blockquote.info, .editormd-html-preview blockquote.info { border-left-color: #5bc0de; color: #5bc0de; diff --git a/static/editor.md/editormd.js b/static/editor.md/editormd.js index e84674f5..7ab3364b 100644 --- a/static/editor.md/editormd.js +++ b/static/editor.md/editormd.js @@ -3472,36 +3472,31 @@ var pageBreakReg = regexs.pageBreak; markedRenderer.blockquote = function($quote) { - console.log($quote) + + var quoteBegin = ""; + + var ps = $quote.match(//i); + if(ps !== null) { + quoteBegin = ps[0]; + $quote = $quote.substr(quoteBegin.length); + } var $class = "default"; if($quote.indexOf("[info]") === 0){ $class = "info"; $quote = $quote.substr(6); - }else if($quote.indexOf("

[info]") === 0){ - $class = "info"; - $quote = $quote.substr(9); }else if($quote.indexOf("[warning]") === 0){ $class = "warning"; $quote = $quote.substr(9); - }else if($quote.indexOf("

[warning]") === 0){ - $class = "warning"; - $quote = $quote.substr(12); }else if($quote.indexOf("[success]") === 0){ $class = "success"; $quote = $quote.substr(9); - }else if($quote.indexOf("

[success]") === 0){ - $class = "success"; - $quote = $quote.substr(12); }else if($quote.indexOf("[danger]") === 0){ $class = "danger"; $quote = $quote.substr(8); - }else if($quote.indexOf("

[danger]") === 0){ - $class = "danger"; - $quote = $quote.substr(11); } - return '

\n' + $quote + '
\n'; + return '
\n' + quoteBegin + $quote + '
\n'; }; markedRenderer.image = function(href,title,text) { @@ -3524,7 +3519,7 @@ attr += " height=\"" + attrs[1] + "\"" } } - attrs = a.hash.match(/align=center|left|right/i) + attrs = a.hash.match(/align=(center|left|right)/i) if (attrs !== null) { var hash = a.hash.replace(attrs[0],""); if (hash.indexOf("#&") === 0) { @@ -3625,7 +3620,7 @@ }); text = text.replace(atLinkReg, function($1, $2) { - return "" + $1 + ""; + return "" + $1 + ""; }).replace(/_#_@_#_/g, "@"); } @@ -3655,8 +3650,14 @@ return ""; } } + if(href.indexOf("@") === 0){ + return ''; + } var out = "" + this.atLink(this.emoji(text)) + ""; } }; + markedRenderer.checkbox = function(checked){ + return checked ? ' ' : ' '; + }; return markedRenderer; };