From 16427683890374ed5acba96765757c44f5d5f2f5 Mon Sep 17 00:00:00 2001 From: Jason Chen Date: Wed, 20 Nov 2019 18:26:45 -0800 Subject: [PATCH] handle strike tag - convert to non-deprecated tag - mirror bold/italic's implementation --- formats/strike.js | 6 +++--- modules/clipboard.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/formats/strike.js b/formats/strike.js index 24764d7f89..1189d898d9 100644 --- a/formats/strike.js +++ b/formats/strike.js @@ -1,7 +1,7 @@ -import Inline from '../blots/inline'; +import Bold from './bold'; -class Strike extends Inline {} +class Strike extends Bold {} Strike.blotName = 'strike'; -Strike.tagName = 'S'; +Strike.tagName = ['S', 'STRIKE']; export default Strike; diff --git a/modules/clipboard.js b/modules/clipboard.js index cc45d9edf0..77c14a93f8 100644 --- a/modules/clipboard.js +++ b/modules/clipboard.js @@ -37,6 +37,7 @@ const CLIPBOARD_CONFIG = [ ['tr', matchTable], ['b', matchAlias.bind(matchAlias, 'bold')], ['i', matchAlias.bind(matchAlias, 'italic')], + ['strike', matchAlias.bind(matchAlias, 'strike')], ['style', matchIgnore], ];