0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 15:23:29 -05:00

Allow setting whether or not to paste plain by default

This commit is contained in:
Robert O'Leary 2017-01-30 16:44:34 +01:00
parent 1f5a1f5e6d
commit ec27c90c57
No known key found for this signature in database
GPG key ID: DD07530AA9B1D961
4 changed files with 6 additions and 4 deletions

View file

@ -2286,7 +2286,7 @@ var onPaste = function ( event ) {
while ( l-- ) {
item = items[l];
type = item.type;
if ( !choosePlain && type === 'text/html' ) {
if ( !choosePlain && type === 'text/html' && !this._config.usePlainTextOnPaste ) {
/*jshint loopfunc: true */
item.getAsString( function ( html ) {
self.insertHTML( html, true );
@ -2610,6 +2610,7 @@ proto.setConfig = function ( config ) {
config = mergeObjects({
blockTag: 'DIV',
blockAttributes: null,
usePlainTextOnPaste: false,
tagAttributes: {
blockquote: null,
ul: null,

File diff suppressed because one or more lines are too long

View file

@ -156,7 +156,7 @@ var onPaste = function ( event ) {
while ( l-- ) {
item = items[l];
type = item.type;
if ( !choosePlain && type === 'text/html' ) {
if ( !choosePlain && type === 'text/html' && !this._config.usePlainTextOnPaste ) {
/*jshint loopfunc: true */
item.getAsString( function ( html ) {
self.insertHTML( html, true );

View file

@ -163,6 +163,7 @@ proto.setConfig = function ( config ) {
config = mergeObjects({
blockTag: 'DIV',
blockAttributes: null,
usePlainTextOnPaste: false,
tagAttributes: {
blockquote: null,
ul: null,