Skip to content
Permalink
Browse files

增加支持Word粘贴

  • Loading branch information
akof1314 committed May 21, 2015
1 parent 4da2fda commit 02602f25578d461e259fb08f9d7fa31958daea39
Showing with 3 additions and 3 deletions.
  1. +2 −2 md_editor_core.js
  2. +1 −1 to-markdown/to-markdown.js
@@ -86,7 +86,7 @@ $(function() {
if (clipboardData.types == "Files") {
clipboardToImage();
}
else if (clipboardData.types == "text/plain,text/html") {
else if ($.inArray("text/html", clipboardData.types) != -1) {
if (!plainPasteMode && clipboardHTMLToMd(clipboardData.getData("text/html"))) {
e.preventDefault();
}
@@ -174,7 +174,7 @@ $(function() {
},
{
filter: function (node) {
return node.nodeName === 'A' && referencelinkRegEx.test(node.className);
return (node.nodeName === 'A' && referencelinkRegEx.test(node.className));
},
replacement: function(content) {
return "";
@@ -80,7 +80,7 @@ function createHtmlParser() {
Parser.prototype.parseFromString = function (string) {
var newDoc = _document.implementation.createHTMLDocument('');

if (string.toLowerCase().indexOf('<!doctype') > -1) {
if (string.toLowerCase().indexOf('<html') > -1) {
newDoc.documentElement.innerHTML = string;
}
else {

0 comments on commit 02602f2

Please sign in to comment.
You can’t perform that action at this time.