Skip to content

Commit

Permalink
EPRESS-102 Avoid to add wrappers for any non supported url pasted text
Browse files Browse the repository at this point in the history
  • Loading branch information
Anderson Grudtner Martins committed Mar 10, 2017
1 parent 0ed1e0f commit 2c1a0a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/assets/js/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,11 @@
return line;
});

var content = '<p>'+ contentLines.join('') +'</p>';
// Check if the text was transformed or not. If it was, add wrappers
var content = contentLines.join('');
if (content.replace(/<br>$/, '') !== rawContent) {
content = '<p>'+ content +'</p>';
}

// Insert the new content into the editor.
editorInstance.execCommand('mceInsertContent', false, content);
Expand Down

0 comments on commit 2c1a0a3

Please sign in to comment.