You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The old Slate-based rich text editor is no longer receiving updates and
will be fully removed in Payload 4.0.
To give developers an early heads-up and encourage migration, this PR
marks richtext-slate as deprecated in preparation for its removal. We
recommend switching to Lexical as the supported rich text editor moving
forward.
desc: The Slate editor is our old rich text editor and will be removed in 4.0.
6
+
keywords: slatejs, slate
7
7
---
8
8
9
9
<Bannertype="warning">
10
10
11
-
The [default Payload editor](/docs/rich-text/overview) is currently based on Lexical. This documentation
12
-
is about our old Slate-based editor. You can continue using it because it is still supported, or you can
13
-
see the optional [migration guide](/docs/rich-text/migration) to migrate from Slate to Lexical (recommended).
11
+
The [default Payload editor](/docs/rich-text/overview) is currently based on Lexical. This documentation is about our old Slate-based editor which has been deprecated and will be removed in 4.0. We recommend [migrating to Lexical](/docs/rich-text/migration) instead.
Copy file name to clipboardExpand all lines: packages/richtext-slate/src/cell/rscEntry.tsx
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,9 @@ import { Link } from '@payloadcms/ui'
5
5
import{formatAdminURL}from'payload/shared'
6
6
importReactfrom'react'
7
7
8
+
/**
9
+
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
Copy file name to clipboardExpand all lines: packages/richtext-slate/src/types.ts
+35Lines changed: 35 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,31 +7,56 @@ import type {
7
7
}from'payload'
8
8
importtype{Editor}from'slate'
9
9
10
+
/**
11
+
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
22
+
*/
14
23
exportfunctionnodeIsTextNode(node: ElementNode|TextNode): node is TextNode{
15
24
return'text'innode
16
25
}
17
26
27
+
/**
28
+
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
34
+
*/
19
35
exporttypeRichTextPlugin=(editor: Editor)=>Editor
20
36
37
+
/**
38
+
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
39
+
*/
21
40
exporttypeRichTextCustomElement={
22
41
Button?: PayloadComponent
23
42
Element: PayloadComponent
24
43
name: string
25
44
plugins?: RichTextPluginComponent[]
26
45
}
27
46
47
+
/**
48
+
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
49
+
*/
28
50
exporttypeRichTextCustomLeaf={
29
51
Button: PayloadComponent
30
52
Leaf: PayloadComponent
31
53
name: string
32
54
plugins?: RichTextPluginComponent[]
33
55
}
34
56
57
+
/**
58
+
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
59
+
*/
35
60
exporttypeRichTextElement=
36
61
|'blockquote'
37
62
|'h1'
@@ -49,6 +74,10 @@ export type RichTextElement =
49
74
|'ul'
50
75
|'upload'
51
76
|RichTextCustomElement
77
+
78
+
/**
79
+
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
80
+
*/
52
81
exporttypeRichTextLeaf=
53
82
|'bold'
54
83
|'code'
@@ -57,6 +86,9 @@ export type RichTextLeaf =
57
86
|'underline'
58
87
|RichTextCustomLeaf
59
88
89
+
/**
90
+
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
91
+
*/
60
92
exporttypeAdapterArguments={
61
93
admin?: {
62
94
elements?: RichTextElement[]
@@ -77,6 +109,9 @@ export type AdapterArguments = {
77
109
}
78
110
}
79
111
112
+
/**
113
+
* @deprecated - slate will be removed in 4.0. Please [migrate our new, lexical-based rich text editor](https://payloadcms.com/docs/rich-text/migration#migrating-from-slate).
0 commit comments