Welcome to mirror list, hosted at ThFree Co, Russian Federation.

strike.js « extensions « content_editor « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ea1abd35b87e0dfc5241e99a063101347b212730 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Strike } from '@tiptap/extension-strike';

export default Strike.extend({
  addAttributes() {
    return {
      ...this.parent?.(),

      htmlTag: {
        default: null,
        renderHTML: () => '',
      },
    };
  },

  parseHTML() {
    return [
      { tag: 'del' },
      { tag: 's', attrs: { htmlTag: 's' } },
      { tag: 'strike', attrs: { htmlTag: 'strike' } },
    ];
  },
});