diff --git a/README.md b/README.md index 19b4d63..124fc55 100644 --- a/README.md +++ b/README.md @@ -403,3 +403,9 @@ Returns self (the Squire instance). Decreases by 1 the nesting level of any at-least-partially selected blocks which are part of a list. Returns self (the Squire instance). + +### removeAllFormatting + +Removes all formatting from the selection. Block elements (list items, table cells, etc.) are kept as separate blocks. + +Returns self (the Squire instance). diff --git a/build/squire-raw.js b/build/squire-raw.js index 47446be..198c68e 100644 --- a/build/squire-raw.js +++ b/build/squire-raw.js @@ -3715,6 +3715,8 @@ proto.removeAllFormatting = function ( range ) { } ); this.setSelection( this._getRangeAndRemoveBookmark() ); + + return this; }; proto.increaseQuoteLevel = command( 'modifyBlocks', increaseBlockQuoteLevel ); diff --git a/source/Editor.js b/source/Editor.js index b66cdb1..9df452b 100644 --- a/source/Editor.js +++ b/source/Editor.js @@ -2257,6 +2257,8 @@ proto.removeAllFormatting = function ( range ) { } ); this.setSelection( this._getRangeAndRemoveBookmark() ); + + return this; }; proto.increaseQuoteLevel = command( 'modifyBlocks', increaseBlockQuoteLevel );