mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 15:23:29 -05:00
Use <S> to markup strike through, not <STRIKE>.
The <strike> tab has been obsoleted in HTML5.
This commit is contained in:
parent
a875d20f12
commit
bee49bef40
4 changed files with 12 additions and 12 deletions
|
@ -157,7 +157,7 @@ TreeWalker.prototype.previousNode = function () {
|
||||||
*/
|
*/
|
||||||
/*jshint strict:false */
|
/*jshint strict:false */
|
||||||
|
|
||||||
var inlineNodeNames = /^(?:#text|A(?:BBR|CRONYM)?|B(?:R|D[IO])?|C(?:ITE|ODE)|D(?:FN|EL)|EM|FONT|HR|I(?:NPUT|MG|NS)?|KBD|Q|R(?:P|T|UBY)|S(?:U[BP]|PAN|TR(?:IKE|ONG)|AMP)|U)$/;
|
var inlineNodeNames = /^(?:#text|A(?:BBR|CRONYM)?|B(?:R|D[IO])?|C(?:ITE|ODE)|D(?:ATA|FN|EL)|EM|FONT|HR|I(?:NPUT|MG|NS)?|KBD|Q|R(?:P|T|UBY)|S(?:U[BP]|PAN|TR(?:IKE|ONG)|MALL|AMP)?|U|VAR|WBR)$/;
|
||||||
|
|
||||||
var leafNodeNames = {
|
var leafNodeNames = {
|
||||||
BR: 1,
|
BR: 1,
|
||||||
|
@ -2248,7 +2248,7 @@ var stylesRewriters = {
|
||||||
},
|
},
|
||||||
STRONG: replaceWithTag( 'B' ),
|
STRONG: replaceWithTag( 'B' ),
|
||||||
EM: replaceWithTag( 'I' ),
|
EM: replaceWithTag( 'I' ),
|
||||||
S: replaceWithTag( 'STRIKE' ),
|
STRIKE: replaceWithTag( 'S' ),
|
||||||
FONT: function ( node, parent ) {
|
FONT: function ( node, parent ) {
|
||||||
var face = node.face,
|
var face = node.face,
|
||||||
size = node.size,
|
size = node.size,
|
||||||
|
@ -2969,7 +2969,7 @@ if ( isMac && isGecko && win.getSelection().modify ) {
|
||||||
keyHandlers[ ctrlKey + 'b' ] = mapKeyToFormat( 'B' );
|
keyHandlers[ ctrlKey + 'b' ] = mapKeyToFormat( 'B' );
|
||||||
keyHandlers[ ctrlKey + 'i' ] = mapKeyToFormat( 'I' );
|
keyHandlers[ ctrlKey + 'i' ] = mapKeyToFormat( 'I' );
|
||||||
keyHandlers[ ctrlKey + 'u' ] = mapKeyToFormat( 'U' );
|
keyHandlers[ ctrlKey + 'u' ] = mapKeyToFormat( 'U' );
|
||||||
keyHandlers[ ctrlKey + 'shift-7' ] = mapKeyToFormat( 'STRIKE' );
|
keyHandlers[ ctrlKey + 'shift-7' ] = mapKeyToFormat( 'S' );
|
||||||
keyHandlers[ ctrlKey + 'shift-5' ] = mapKeyToFormat( 'SUB', { tag: 'SUP' } );
|
keyHandlers[ ctrlKey + 'shift-5' ] = mapKeyToFormat( 'SUB', { tag: 'SUP' } );
|
||||||
keyHandlers[ ctrlKey + 'shift-6' ] = mapKeyToFormat( 'SUP', { tag: 'SUB' } );
|
keyHandlers[ ctrlKey + 'shift-6' ] = mapKeyToFormat( 'SUP', { tag: 'SUB' } );
|
||||||
keyHandlers[ ctrlKey + 'y' ] = mapKeyTo( 'redo' );
|
keyHandlers[ ctrlKey + 'y' ] = mapKeyTo( 'redo' );
|
||||||
|
@ -3182,14 +3182,14 @@ proto.addStyles = function ( styles ) {
|
||||||
proto.bold = command( 'changeFormat', { tag: 'B' } );
|
proto.bold = command( 'changeFormat', { tag: 'B' } );
|
||||||
proto.italic = command( 'changeFormat', { tag: 'I' } );
|
proto.italic = command( 'changeFormat', { tag: 'I' } );
|
||||||
proto.underline = command( 'changeFormat', { tag: 'U' } );
|
proto.underline = command( 'changeFormat', { tag: 'U' } );
|
||||||
proto.strikethrough = command( 'changeFormat', { tag: 'STRIKE' } );
|
proto.strikethrough = command( 'changeFormat', { tag: 'S' } );
|
||||||
proto.subscript = command( 'changeFormat', { tag: 'SUB' }, { tag: 'SUP' } );
|
proto.subscript = command( 'changeFormat', { tag: 'SUB' }, { tag: 'SUP' } );
|
||||||
proto.superscript = command( 'changeFormat', { tag: 'SUP' }, { tag: 'SUB' } );
|
proto.superscript = command( 'changeFormat', { tag: 'SUP' }, { tag: 'SUB' } );
|
||||||
|
|
||||||
proto.removeBold = command( 'changeFormat', null, { tag: 'B' } );
|
proto.removeBold = command( 'changeFormat', null, { tag: 'B' } );
|
||||||
proto.removeItalic = command( 'changeFormat', null, { tag: 'I' } );
|
proto.removeItalic = command( 'changeFormat', null, { tag: 'I' } );
|
||||||
proto.removeUnderline = command( 'changeFormat', null, { tag: 'U' } );
|
proto.removeUnderline = command( 'changeFormat', null, { tag: 'U' } );
|
||||||
proto.removeStrikethrough = command( 'changeFormat', null, { tag: 'STRIKE' } );
|
proto.removeStrikethrough = command( 'changeFormat', null, { tag: 'S' } );
|
||||||
proto.removeSubscript = command( 'changeFormat', null, { tag: 'SUB' } );
|
proto.removeSubscript = command( 'changeFormat', null, { tag: 'SUB' } );
|
||||||
proto.removeSuperscript = command( 'changeFormat', null, { tag: 'SUP' } );
|
proto.removeSuperscript = command( 'changeFormat', null, { tag: 'SUP' } );
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1200,7 +1200,7 @@ var stylesRewriters = {
|
||||||
},
|
},
|
||||||
STRONG: replaceWithTag( 'B' ),
|
STRONG: replaceWithTag( 'B' ),
|
||||||
EM: replaceWithTag( 'I' ),
|
EM: replaceWithTag( 'I' ),
|
||||||
S: replaceWithTag( 'STRIKE' ),
|
STRIKE: replaceWithTag( 'S' ),
|
||||||
FONT: function ( node, parent ) {
|
FONT: function ( node, parent ) {
|
||||||
var face = node.face,
|
var face = node.face,
|
||||||
size = node.size,
|
size = node.size,
|
||||||
|
@ -1921,7 +1921,7 @@ if ( isMac && isGecko && win.getSelection().modify ) {
|
||||||
keyHandlers[ ctrlKey + 'b' ] = mapKeyToFormat( 'B' );
|
keyHandlers[ ctrlKey + 'b' ] = mapKeyToFormat( 'B' );
|
||||||
keyHandlers[ ctrlKey + 'i' ] = mapKeyToFormat( 'I' );
|
keyHandlers[ ctrlKey + 'i' ] = mapKeyToFormat( 'I' );
|
||||||
keyHandlers[ ctrlKey + 'u' ] = mapKeyToFormat( 'U' );
|
keyHandlers[ ctrlKey + 'u' ] = mapKeyToFormat( 'U' );
|
||||||
keyHandlers[ ctrlKey + 'shift-7' ] = mapKeyToFormat( 'STRIKE' );
|
keyHandlers[ ctrlKey + 'shift-7' ] = mapKeyToFormat( 'S' );
|
||||||
keyHandlers[ ctrlKey + 'shift-5' ] = mapKeyToFormat( 'SUB', { tag: 'SUP' } );
|
keyHandlers[ ctrlKey + 'shift-5' ] = mapKeyToFormat( 'SUB', { tag: 'SUP' } );
|
||||||
keyHandlers[ ctrlKey + 'shift-6' ] = mapKeyToFormat( 'SUP', { tag: 'SUB' } );
|
keyHandlers[ ctrlKey + 'shift-6' ] = mapKeyToFormat( 'SUP', { tag: 'SUB' } );
|
||||||
keyHandlers[ ctrlKey + 'y' ] = mapKeyTo( 'redo' );
|
keyHandlers[ ctrlKey + 'y' ] = mapKeyTo( 'redo' );
|
||||||
|
@ -2134,14 +2134,14 @@ proto.addStyles = function ( styles ) {
|
||||||
proto.bold = command( 'changeFormat', { tag: 'B' } );
|
proto.bold = command( 'changeFormat', { tag: 'B' } );
|
||||||
proto.italic = command( 'changeFormat', { tag: 'I' } );
|
proto.italic = command( 'changeFormat', { tag: 'I' } );
|
||||||
proto.underline = command( 'changeFormat', { tag: 'U' } );
|
proto.underline = command( 'changeFormat', { tag: 'U' } );
|
||||||
proto.strikethrough = command( 'changeFormat', { tag: 'STRIKE' } );
|
proto.strikethrough = command( 'changeFormat', { tag: 'S' } );
|
||||||
proto.subscript = command( 'changeFormat', { tag: 'SUB' }, { tag: 'SUP' } );
|
proto.subscript = command( 'changeFormat', { tag: 'SUB' }, { tag: 'SUP' } );
|
||||||
proto.superscript = command( 'changeFormat', { tag: 'SUP' }, { tag: 'SUB' } );
|
proto.superscript = command( 'changeFormat', { tag: 'SUP' }, { tag: 'SUB' } );
|
||||||
|
|
||||||
proto.removeBold = command( 'changeFormat', null, { tag: 'B' } );
|
proto.removeBold = command( 'changeFormat', null, { tag: 'B' } );
|
||||||
proto.removeItalic = command( 'changeFormat', null, { tag: 'I' } );
|
proto.removeItalic = command( 'changeFormat', null, { tag: 'I' } );
|
||||||
proto.removeUnderline = command( 'changeFormat', null, { tag: 'U' } );
|
proto.removeUnderline = command( 'changeFormat', null, { tag: 'U' } );
|
||||||
proto.removeStrikethrough = command( 'changeFormat', null, { tag: 'STRIKE' } );
|
proto.removeStrikethrough = command( 'changeFormat', null, { tag: 'S' } );
|
||||||
proto.removeSubscript = command( 'changeFormat', null, { tag: 'SUB' } );
|
proto.removeSubscript = command( 'changeFormat', null, { tag: 'SUB' } );
|
||||||
proto.removeSuperscript = command( 'changeFormat', null, { tag: 'SUP' } );
|
proto.removeSuperscript = command( 'changeFormat', null, { tag: 'SUP' } );
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*/
|
*/
|
||||||
/*jshint strict:false */
|
/*jshint strict:false */
|
||||||
|
|
||||||
var inlineNodeNames = /^(?:#text|A(?:BBR|CRONYM)?|B(?:R|D[IO])?|C(?:ITE|ODE)|D(?:FN|EL)|EM|FONT|HR|I(?:NPUT|MG|NS)?|KBD|Q|R(?:P|T|UBY)|S(?:U[BP]|PAN|TR(?:IKE|ONG)|AMP)|U)$/;
|
var inlineNodeNames = /^(?:#text|A(?:BBR|CRONYM)?|B(?:R|D[IO])?|C(?:ITE|ODE)|D(?:ATA|FN|EL)|EM|FONT|HR|I(?:NPUT|MG|NS)?|KBD|Q|R(?:P|T|UBY)|S(?:U[BP]|PAN|TR(?:IKE|ONG)|MALL|AMP)?|U|VAR|WBR)$/;
|
||||||
|
|
||||||
var leafNodeNames = {
|
var leafNodeNames = {
|
||||||
BR: 1,
|
BR: 1,
|
||||||
|
|
Loading…
Reference in a new issue