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) {
|
if (e.originalEvent.clipboardData && e.originalEvent.clipboardData.getData) {
|
||||||
Ox.print('TYPES', e.originalEvent.clipboardData.types);
|
Ox.print('TYPES', e.originalEvent.clipboardData.types);
|
||||||
var value = e.originalEvent.clipboardData.getData('text/plain');
|
var value = e.originalEvent.clipboardData.getData('text/plain');
|
||||||
value = Ox.encodeHTMLEntities(value).replace('\n', '<br/>\n');
|
value = Ox.encodeHTMLEntities(value).replace(/\n\n\n/g, '<br/><br/>\n');
|
||||||
Ox.print('VALUE', value);
|
|
||||||
document.execCommand('insertHTML', false, value);
|
document.execCommand('insertHTML', false, value);
|
||||||
e.originalEvent.stopPropagation();
|
e.originalEvent.stopPropagation();
|
||||||
e.originalEvent.preventDefault();
|
e.originalEvent.preventDefault();
|
||||||
|
|
Loading…
Reference in a new issue