mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +03:00
Updated Squire to v1.11.1
This commit is contained in:
parent
43e107b0cb
commit
d351ee6367
2 changed files with 15 additions and 8 deletions
17
vendors/squire/build/squire-raw.js
vendored
17
vendors/squire/build/squire-raw.js
vendored
|
|
@ -2562,10 +2562,13 @@ class Squire
|
|||
documentSizeThreshold: -1, // -1 means no threshold
|
||||
undoLimit: -1 // -1 means no limit
|
||||
},
|
||||
sanitizeToDOMFragment: null,
|
||||
addLinks: true
|
||||
}, config, true );
|
||||
|
||||
if ( typeof config.sanitizeToDOMFragment !== 'function' ) {
|
||||
config.sanitizeToDOMFragment = null;
|
||||
}
|
||||
|
||||
// Users may specify block tag in lower case
|
||||
config.blockTag = config.blockTag.toUpperCase();
|
||||
|
||||
|
|
@ -3683,7 +3686,13 @@ class Squire
|
|||
_setHTML ( html ) {
|
||||
let root = this._root;
|
||||
let node = root;
|
||||
node.innerHTML = html;
|
||||
let sanitizeToDOMFragment = this._config.sanitizeToDOMFragment;
|
||||
if ( sanitizeToDOMFragment ) {
|
||||
empty( node );
|
||||
node.appendChild( sanitizeToDOMFragment( html, false, this ) );
|
||||
} else {
|
||||
node.innerHTML = html;
|
||||
}
|
||||
do {
|
||||
fixCursor( node, root );
|
||||
} while ( node = getNextBlock( node, root ) );
|
||||
|
|
@ -3709,7 +3718,7 @@ class Squire
|
|||
let div, frag, child;
|
||||
|
||||
// Parse HTML into DOM tree
|
||||
if ( typeof sanitizeToDOMFragment === 'function' ) {
|
||||
if ( sanitizeToDOMFragment ) {
|
||||
frag = sanitizeToDOMFragment( html, false, this );
|
||||
} else {
|
||||
div = createElement( 'DIV' );
|
||||
|
|
@ -3830,7 +3839,7 @@ class Squire
|
|||
html = html.slice( startFragmentIndex + 20, endFragmentIndex );
|
||||
}
|
||||
}
|
||||
if ( typeof sanitizeToDOMFragment === 'function' ) {
|
||||
if ( sanitizeToDOMFragment ) {
|
||||
frag = sanitizeToDOMFragment( html, isPaste, this );
|
||||
} else {
|
||||
// Wrap with <tr> if html contains dangling <td> tags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue