Skip to content

Commit

Permalink
fix: convertContentsForEditor function
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 committed Sep 23, 2018
1 parent bb4e2d0 commit 9d56fe5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/suneditor.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ const util = {
for (let i = 0, len = tag.length; i < len; i++) {
baseHtml = tag[i].outerHTML || tag[i].textContent;

if (!this.isFormatElement(tag[i])) {
if (!this.isFormatElement(tag[i]) && !this.isRangeFormatElement(tag[i])) {
const textArray = baseHtml.split(/\n/g);
let text = '';
for (let t = 0, tLen = textArray.length; t < tLen; t++) {
if (textArray[t].nodeType !== 3) continue;
text = textArray[t].trim();
if (text.length > 0) innerHTML += '<P>' + text + '</p>';
}
Expand Down

0 comments on commit 9d56fe5

Please sign in to comment.