Improved error handling.
This commit is contained in:
parent
c6fec78bf9
commit
fde8d11b5f
1 changed files with 9 additions and 7 deletions
|
@ -104,13 +104,15 @@
|
||||||
|
|
||||||
// break <blockquote> after enter on empty line
|
// break <blockquote> after enter on empty line
|
||||||
sel = window.getSelection()
|
sel = window.getSelection()
|
||||||
|
if (sel) {
|
||||||
node = $(sel.anchorNode)
|
node = $(sel.anchorNode)
|
||||||
if (node.parent().is('blockquote')) {
|
if (node && node.parent() && node.parent().is('blockquote')) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
document.execCommand('Insertparagraph')
|
document.execCommand('Insertparagraph')
|
||||||
document.execCommand('Outdent')
|
document.execCommand('Outdent')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// behavior to enter new line on alt+enter
|
// behavior to enter new line on alt+enter
|
||||||
// on alt + enter not realy newline is fired, to make
|
// on alt + enter not realy newline is fired, to make
|
||||||
|
|
Loading…
Reference in a new issue