Grapesjs: BUG: Unable to remove Strike via selection toolbar

Created on 24 Sep 2020  路  3Comments  路  Source: artf/grapesjs

Current version: 0.16.22

Are you able to reproduce the bug from the demo?

[x] Yes
[ ] No

What is the expected behavior?
Be able to apply and remove the Strike-through styling via the mini toolbar on a selection and remove it via the same process

What is the current behavior?
You're able top apply the styling via the mini toolbar, but you're not able to remove it once it's applied.

If you do all of this via the Style manager it works as intended as this applies it via CSS instead of wrapping it in a HTML element.

Most helpful comment

This is as a result of this change #2886, as a temporary fix you can use:

const rte = editor.RichTextEditor;
rte.add('clearFormatting', {
    icon: '<i class="fa fa-eraser"></i>',
    attributes: {
      title: 'Clear Formatting'
    },
    result: rte => rte.exec('removeFormat')
  });

This adds a button that removes all formatting tags.

All 3 comments

This is as a result of this change #2886, as a temporary fix you can use:

const rte = editor.RichTextEditor;
rte.add('clearFormatting', {
    icon: '<i class="fa fa-eraser"></i>',
    attributes: {
      title: 'Clear Formatting'
    },
    result: rte => rte.exec('removeFormat')
  });

This adds a button that removes all formatting tags.

Thanks @Ju99ernaut - appreciate the help :)

Will be fixed in the next release

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alibouaziz picture alibouaziz  路  3Comments

applibs picture applibs  路  3Comments

kosirm picture kosirm  路  3Comments

faizansaiyed picture faizansaiyed  路  3Comments

Snarkly picture Snarkly  路  3Comments