- Updated dependencies [
a6bf8c5e
]:- @udecode/[email protected]
- Updated dependencies [
8aec270f
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
7ee21356
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
503956fd
]:- @udecode/[email protected]
- Updated dependencies [
b22c06aa
]:- @udecode/[email protected]
- Updated dependencies [
58f6fb53
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
6af469cd
]:- @udecode/[email protected]
- @udecode/[email protected]
- #1053
cc14dfd4
Thanks @bensquire! - Passes the most recent keystroke into auto-format rule "query"
- Updated dependencies [
f1da7267
,35caf35d
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
58387c6d
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
f6c58134
]:- @udecode/[email protected]
- #939
e6ea7ac2
Thanks @zbeyens! - breaking changes:autoformatBlock
:- signatude changed from
(editor: TEditor, type: string, at: Location, options: Pick<AutoformatRule, 'preFormat' | 'format'>)
to(editor: TEditor, options: AutoformatBlockOptions)
- moved the checks from
withAutoformat
- signatude changed from
autoformatInline
:- renamed to
autoformatMark
- signatured changed from
(editor: TEditor, options: Pick<AutoformatRule, 'type' | 'between' | 'markup' | 'ignoreTrim'>)
toAutoformatMarkOptions
- renamed to
AutoformatRule
is nowAutoformatBlockRule | AutoformatMarkRule | AutoformatTextRule;
mode: 'inline'
renamed tomode: 'mark'
markup
andbetween
have been replaced bymatch: string | string[] | MatchRange | MatchRange[]
: The rule applies when the trigger and the text just before the cursor matches. Formode: 'block'
: lookup for the end match(es) before the cursor. Formode: 'text'
: lookup for the end match(es) before the cursor. Ifformat
is an array, also lookup for the start match(es). Formode: 'mark'
: lookup for the start and end matches. Note:'_*'
,['_*']
and{ start: '_*', end: '*_' }
are equivalent.trigger
now defaults to the last character ofmatch
ormatch.end
(previously' '
)
- the plugin now checks that there is no character before the start match to apply autoformatting. For example, nothing will happen by typing
a*text*
.
- #939
2eb3bb7a
Thanks @zbeyens! - features:- new rules:
autoformatArrow
,autoformatLegal
,autoformatLegalHtml
,autoformatPunctuation
,autoformatComparison
,autoformatEquality
,autoformatFraction
,autoformatMath
,autoformatDivision
,autoformatOperation
,autoformatSubscriptNumbers
,autoformatSubscriptSymbols
,autoformatSuperscriptNumbers
,autoformatSuperscriptSymbols
- types:
AutoformatMarkOptions
: options forautoformatMark
AutoformatTextOptions
: options forautoformatText
AutoformatBlockOptions
: options forautoformatBlock
AutoformatCommonRule
: rule properties for all modesMatchRange
GetMatchPointsReturnType
mode: 'block'
,autoformatBlock
:mode: 'mark'
:type
now acceptsstring[]
to add multiple marks- new
mode: 'text'
that can be used to replacematch
by any text using theformat
optionmatch: string | string[]
format: string | string[] | ((editor: TEditor, options: GetMatchPointsReturnType) => void)
–string
: the matched text is replaced by that string –string[]
: the matched texts are replaced by these strings (e.g. smart quotes) –function
: called when there is a match.
getMatchPoints
: used byautoformatMark
andautoformatText
to get the matching pointsgetMatchRange
: mapsmatch
andtrigger
option to start to match, end to match and triggers.isPreviousCharacterEmpty
- new rules:
- Updated dependencies [
ec4d5b7b
]:- @udecode/[email protected]
-
#918
7d045d8d
Thanks @zbeyens! - addslate-history
as a peerDep -
Updated dependencies [
7d045d8d
]:- @udecode/[email protected]
🎉 The Slate Plugins project has evolved to Plate 🎉
To migrate, install @udecode/plate[-x]
then find and replace all
occurrences of:
slate-plugins
toplate
SlatePlugins
toPlate
SlatePlugin
toPlatePlugin
This is the last version of
@udecode/slate-plugins[-x]
, please install@udecode/plate[-x]
.
- Updated dependencies [
7c26cf32
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
3a3eb1b8
]:- @udecode/[email protected]
- Updated dependencies [
75b39f18
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
abaf4a11
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
d906095d
]:- @udecode/[email protected]
- Updated dependencies [
42360b44
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
6e9068f6
]:- @udecode/[email protected]
- Updated dependencies [
15048e6f
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
b444071e
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
2cf618c3
]:- @udecode/[email protected]
- Updated dependencies [
7cbd7bd9
,806e1632
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
33605a49
,28f30c8a
,75e6d25d
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
dfbde8bd
,dfbde8bd
]:- @udecode/[email protected]
- @udecode/[email protected]
- Updated dependencies [
201a7993
]:- @udecode/[email protected]
- @udecode/[email protected]