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:
parent
1f5a1f5e6d
commit
ec27c90c57
4 changed files with 6 additions and 4 deletions
|
@ -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
|
@ -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 );
|
||||
|
|
|
@ -163,6 +163,7 @@ proto.setConfig = function ( config ) {
|
|||
config = mergeObjects({
|
||||
blockTag: 'DIV',
|
||||
blockAttributes: null,
|
||||
usePlainTextOnPaste: false,
|
||||
tagAttributes: {
|
||||
blockquote: null,
|
||||
ul: null,
|
||||
|
|
Loading…
Reference in a new issue