Skip to content

Commit

Permalink
fix: #743 paste text
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 committed May 13, 2021
1 parent dc3660e commit 3be663a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@webpack-cli/init": "^0.2.2",
"babel-loader": "^8.1.0",
"clean-webpack-plugin": "^0.1.19",
"codemirror": "^5.57.0",
"codemirror": "^5.61.0",
"css-loader": "^1.0.1",
"csstype": "^2.6.13",
"file-loader": "^2.0.0",
Expand Down
4 changes: 1 addition & 3 deletions src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -7032,7 +7032,7 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
}
cleanData = core.cleanHTML(cleanData, core.pasteTagsWhitelistRegExp);
} else {
cleanData = plainText.replace(/\n/g, '<br>');
cleanData = util._HTMLConvertor(plainText).replace(/\n/g, '<br>');
}

const maxCharCount = core._charCount(core._charTypeHTML ? cleanData : plainText);
Expand All @@ -7049,8 +7049,6 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re
if (typeof value === 'string') cleanData = value;
}

if (onlyText) cleanData = util._HTMLConvertor(cleanData);

// files
const files = data.files;
if (files.length > 0 && !MSData) {
Expand Down

0 comments on commit 3be663a

Please sign in to comment.