unsetAllMarks command

unsetAllMarks will remove all marks from the current selection. By default, it respects the clearable option on each mark — marks with clearable: false will not be removed.

Parameters

options?: Record<string, any>

  • ignoreClearable?: boolean - If true, removes all marks regardless of their clearable setting. Defaults to false

Using the unsetAllMarks command

// removes all marks that have clearable: true (default behavior)
editor.commands.unsetAllMarks()

// removes all marks, ignoring the clearable option
editor.commands.unsetAllMarks({ ignoreClearable: true })