@udecode/plate-common
Advanced tools
Comparing version 4.3.7 to 4.4.0
# @udecode/plate-common | ||
## 4.4.0 | ||
### Minor Changes | ||
- [#1085](https://github.com/udecode/plate/pull/1085) [`b22c06aa`](https://github.com/udecode/plate/commit/b22c06aad1cfed08069dadc7ec39bcbfb1d0af37) Thanks [@ghingis](https://github.com/ghingis)! - `removeMark`: | ||
- `key` can be an array (to remove multiple marks) | ||
- `options` are extended so we can use other location than `editor.selection` | ||
## 4.3.7 | ||
@@ -4,0 +12,0 @@ |
import { TEditor } from '@udecode/plate-core'; | ||
import { Range } from 'slate'; | ||
import { SetNodesOptions } from '../types'; | ||
export interface RemoveMarkOptions extends Omit<SetNodesOptions, 'match' | 'split'> { | ||
/** | ||
* Mark or the array of marks that will be removed | ||
*/ | ||
key: string | string[]; | ||
/** | ||
* When location is not a Range, | ||
* setting this to false can prevent the onChange event of the editor to fire | ||
* @default true | ||
*/ | ||
shouldChange?: boolean; | ||
/** | ||
* Range where the mark(s) will be removed | ||
*/ | ||
at?: Range; | ||
} | ||
/** | ||
* Remove mark and trigger `onChange` if collapsed selection. | ||
*/ | ||
export declare const removeMark: (editor: TEditor, { key, shouldChange, }: { | ||
key: string; | ||
shouldChange?: boolean | undefined; | ||
}) => void; | ||
export declare const removeMark: (editor: TEditor, { key, at, shouldChange, ...rest }: RemoveMarkOptions) => void; | ||
//# sourceMappingURL=removeMark.d.ts.map |
import { TEditor } from '@udecode/plate-core'; | ||
/** | ||
* Add/remove marks in the selection. | ||
* @param editor | ||
* @param key mark to toggle | ||
@@ -5,0 +6,0 @@ * @param clear marks to clear when adding mark |
{ | ||
"name": "@udecode/plate-common", | ||
"version": "4.3.7", | ||
"version": "4.4.0", | ||
"description": "Common utilities used by Plate", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1034191
11084