better newline matching
This commit is contained in:
parent
dab68de1f0
commit
a9a804887a
1 changed files with 1 additions and 2 deletions
|
@ -91,8 +91,7 @@ Ox.EditableContent = function(options, self) {
|
|||
if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.getData) {
|
||||
Ox.print('TYPES', e.originalEvent.clipboardData.types);
|
||||
var value = e.originalEvent.clipboardData.getData('text/plain');
|
||||
value = Ox.encodeHTMLEntities(value).replace('\n', '<br/>\n');
|
||||
Ox.print('VALUE', value);
|
||||
value = Ox.encodeHTMLEntities(value).replace(/\n\n\n/g, '<br/><br/>\n');
|
||||
document.execCommand('insertHTML', false, value);
|
||||
e.originalEvent.stopPropagation();
|
||||
e.originalEvent.preventDefault();
|
||||
|
|
Loading…
Reference in a new issue