0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-02-07 22:57:58 -05:00

Handle selection better when creating new PRE.

This commit is contained in:
Gert K. Sønderby 2015-11-25 11:50:12 +01:00 committed by Gert Sønderby
parent bfbdd45184
commit 6ba03f6989
3 changed files with 7 additions and 3 deletions

View file

@ -3551,7 +3551,9 @@ var getTextFromHTMLFragment = function ( self, frag ) {
var makePreformatted = function ( frag ) { var makePreformatted = function ( frag ) {
return this.createElement( 'PRE', return this.createElement( 'PRE',
this._config.tagAttributes.pre, [ this._config.tagAttributes.pre, [
getTextFromHTMLFragment( this, frag ) this.createElement( 'DIV', { id: startSelectionId } ),
getTextFromHTMLFragment( this, frag ),
this.createElement( 'DIV', { id: endSelectionId } )
] ); ] );
}; };

File diff suppressed because one or more lines are too long

View file

@ -1352,7 +1352,9 @@ var getTextFromHTMLFragment = function ( self, frag ) {
var makePreformatted = function ( frag ) { var makePreformatted = function ( frag ) {
return this.createElement( 'PRE', return this.createElement( 'PRE',
this._config.tagAttributes.pre, [ this._config.tagAttributes.pre, [
getTextFromHTMLFragment( this, frag ) this.createElement( 'DIV', { id: startSelectionId } ),
getTextFromHTMLFragment( this, frag ),
this.createElement( 'DIV', { id: endSelectionId } )
] ); ] );
}; };