All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
Until 1.0.0 is released, breaking changes will be added as minor or patch version bumps.
This changelog file is not maintained anymore. Check the releases instead.
isSelectionInListItem
:- renamed to
getListItemEntry
- returns
{ list, listItem }
- renamed to
isList
:- renamed to
isNodeTypeList
- renamed options from
(options?: ListOptions) => (n: Node)
to(n: Node, options?: ListOptions)
- renamed to
- options refactored (old/new not listed here):
isSelectionInListItem
moveChildren
moveListItemDown
moveListItemUp
getSelectableElement
: you should now provide a drag icon indragIcon
option. Example:
import { DragIndicator } from '@styled-icons/material/DragIndicator';
<DragIndicator
style={{
width: 18,
height: 18,
color: 'rgba(55, 53, 47, 0.3)',
}}
/>
withList
: handles some cases ofdeleteBackward
to avoid deleting sublist items when deleting a list item.- new functions:
getLastChild
: Get the last child of a nodegetNodeById
: Get the first editor node entry found by idgetPreviousPath
getListItemSublist
: Get the list inside listItem if existinghasListInListItem
: Is there a list inlistItemNode
isListNested
: Is the list nested, i.e. its parent is a list itemmoveListItemSublistItemsToList
: Move the list items of the sublist offromListItem
totoList
moveListItemSublistItemsToListItemSublist
: Move fromListItem sublist list items to the end oftoListItem
sublistmoveListSiblingsAfterCursor
removeFirstListItem
removeRootListItem
: Remove list item and move its sublist to list if any
styled-components
is not a peer dependency anymore
- remove
withToggleType
, usetoggleNodeType
instead. - remove
withTransforms
, useTransforms.insertNodes
instead. - renamed
onKeyDownMark
togetOnHotkeyToggleMark
. - renamed
onKeyDownMarkDefault
togetOnHotkeyToggleMarkDefault
.
toggleNodeType
: Toggle the type of the selected node.- hotkey to toggle node type (default type is paragraph):
- blockquote:
mod+shift+.
- paragraph:
['mod+opt+0', 'mod+shift+0']
- todo list:
['mod+opt+4', 'mod+shift+4']
- code block:
['mod+opt+8', 'mod+shift+8']
- blockquote:
getOnHotkeyToggleNodeType
: GetonKeyDown
handler to toggle node type if hotkey is pressed.getOnHotkeyToggleNodeTypeDefault
:getOnHotkeyToggleNodeType
with default options.- added
serialize
as a plugin option. it acceptselement
andleaf
properties. serializeHTMLFromNodes
will useplugin.serialize.element
in place ofplugin.renderElement
andplugin.serialize.leaf
in place ofplugin.renderLeaf
todo-list
:- use
user-select: none
in the checkbox wrapper to fix selection bug. - checked can be
undefined
- use
table
: Set child type of a table cell to be<p>
for theTablePlugin
.list
: Copy the marks from the current leaf node to the next
- removed:
isRangeAtRoot
isPointAtRoot
deserializeHTMLElement
,deserializeHTMLToDocument
,deserializeHTMLToDocumentFragment
:- Refactor parameters from
(plugins: SlatePlugin[]) => (element: HTMLElement)
to({ plugins: SlatePlugin[]; element: HTMLElement; }
- Refactor parameters from
deserializeHTMLToElement
,deserializeHTMLToFragment
,deserializeHTMLToMarks
:- Refactor option
el
toelement
- Refactor option
serializeHTMLFromNodes
:- Refactor from
(plugins: SlatePlugin[]) => ( nodes: SlateNode[] )
to
- Refactor from
{
/**
* Plugins with renderElement or renderLeaf.
*/
plugins: SlatePlugin[];
/**
* Slate nodes to convert to HTML.
*/
nodes: SlateNode[];
}
common/queries
:getParent
β CallsEditor.parent
and returns undefined if there is no parent instead of throwing an error.
common/utils
createElementWithSlate
β Create a React element wrapped in a Slate provider
types
:SlateProps
EditorParentOptions
serializeHTMLFromNodes
:- new option
stripDataAttributes
(default:true
) β Enable stripping data attributes - new option
slateProps
(default: empty editor) β Slate props to provide if the rendering depends on slate hooks
- new option
serializeHTMLFromNodes
: it should now work with plugins using slate hooksisSelectionInListItem
: it's now usinggetParent
to not throw an error when selecting the root.
withList
is now needed for nested list (back again). MovedonKeyDownList
handler for Enter and Backspace toinsertBreak
anddeleteBackward
.
- queries:
isSelectionInListItem
- transforms:
moveListItemDown
moveListItemUp
insertListItem
- Could not use IME in nested lists, fixed using
withList
.
- Add
editor
as deps inEditable
onKeyDown
,decorate
andonDOMBeforeInput
. Sometimes the editor reference can change, e.g. when resetting the editor.
EditablePlugins
:onKeyDownPlugins
: RunonKeyDownList
thenonKeyDown
of each plugin. Stop if one handler returns false. It's a way to "stop propagation". By doing so, you should carefully order your plugins.
isBlockTextEmptyAfterSelection
: Is there empty text after the selection. If there is no leaf after the selected leaf, returnEditor.isEnd
. Else, check if the next leaves are empty.getNextSiblingNodes
: Get the next sibling nodes after a path.
- When a link was inserted at the end of a list item, we could not add a new list item after it.
- Stopping the propagation in mention
onKeyDown
so pressingEnter
in a list item will not insert a new list item when selecting a mention.
- markdown deserializer is now fixed by using
remark-slate
onKeyDownList
: missing options fixed.
onKeyDownList
: fixed a bug when inserting break at the start of a list item.
-
removed:
withResetBlockType
,withBreakEmptyReset
,withDeleteStartReset
in favor of `ResetBlo ### Breaking Changes
-
removed:
withResetBlockType
,withBreakEmptyReset
,withDeleteStartReset
in favor ofResetBlockTypePlugin
.withList
: its logic has been moved intoListPlugin
(onKeyDownList
).isTable
,isTableRow
,isTableCell
in favor ofgetAboveByType
.
- new plugin
ResetBlockTypePlugin
replacingwithResetBlockType
onKeyDownResetBlockType
- new editor plugin:
withRemoveEmptyNodes
: Remove nodes with empty text.options
accepts node types where the rule applies.
- queries:
getAboveByType
: Get the block above a location (default: selection) by type.isAncestorEmpty
: Is an ancestor empty (empty text and no inline children).isBlockAboveEmpty
: Is the block above the selection empty.
- new normalizer:
withRemoveEmptyNodes
:- Remove nodes with empty text.
- Option
type
to specify which node types are targeted.
link
plugin:isUrl
option with default tois-url
package.- Paste a string inside a link element will edit its children text but not its url.
- Uses
withRemoveEmptyNodes
.
getRenderLeaf
is now passingleaf
to the component props.
- Pasting some urls was freezing the editor.
list
: delete at the start of a list item will move it up.ckTypePlugin`.withList
: its logic has been moved intoListPlugin
(onKeyDownList
).isTable
,isTableRow
,isTableCell
in favor ofgetAboveByType
.
- new plugin
ResetBlockTypePlugin
replacingwithResetBlockType
onKeyDownResetBlockType
- new editor plugin:
withRemoveEmptyNodes
: Remove nodes with empty text.options
accepts node types where the rule applies.
- queries:
getAboveByType
: Get the block above a location (default: selection) by type.isAncestorEmpty
: Is an ancestor empty (empty text and no inline children).isBlockAboveEmpty
: Is the block above the selection empty.
- new normalizer:
withRemoveEmptyNodes
:- Remove nodes with empty text.
- Option
type
to specify which node types are targeted.
link
plugin:isUrl
option with default tois-url
package.- Paste a string inside a link element will edit its children text but not its url.
- Uses
withRemoveEmptyNodes
.
getRenderLeaf
is now passingleaf
to the component props.
- Pasting some urls was freezing the editor.
list
: delete at the start of a list item will move it up.
- improved typing of
EditablePlugins
- renamed
setPropsToNodes
tomergeDeepToNodes
- new utils:
applyDeepToNodes
defaultsDeepToNodes
withNodeID
: usedefaultsDeepToNodes
instead ofmergeDeepToNodes
as we don't want to override any existing id.- missing export
- update
EditablePluginsProps
interface.
attributes
was missing in the element plugins
- tree-shaking support for
lodash
- export
isExpanded
- Removed:
styled-components
from peerDependenciesAlignElement
DeserializeElement
in favor ofDeserializeNode
DeserializeLeaf
in favor ofDeserializeNode
getElementComponent
in favor ofgetRenderElement
HeadingEelements
ListElements
- Renamed:
ActionItem
toTodoList
.- Node types, full list:
ELEMENT_PARAGRAPH
ELEMENT_MENTION
ELEMENT_BLOCKQUOTE
ELEMENT_CODE_BLOCK
ELEMENT_LINK
ELEMENT_IMAGE
ELEMENT_MEDIA_EMBED
ELEMENT_TODO_LI
ELEMENT_H1
ELEMENT_H2
ELEMENT_H3
ELEMENT_H4
ELEMENT_H5
ELEMENT_H6
ELEMENT_ALIGN_LEFT
ELEMENT_ALIGN_CENTER
ELEMENT_ALIGN_RIGHT
ELEMENT_UL
ELEMENT_OL
ELEMENT_LI
ELEMENT_TABLE
ELEMENT_TH
ELEMENT_TR
ELEMENT_TD
MARK_BOLD
MARK_ITALIC
MARK_UNDERLINE
MARK_STRIKETHROUGH
MARK_CODE
MARK_SUBSCRIPT
MARK_SUPERSCRIPT
MARK_HIGHLIGHT
MARK_SEARCH_HIGHLIGHT
- Plugin options follow a new structure:
For getRenderElement
:
const options: ParagraphRenderElementOptions = {
// Use a unique key for each slate node.
p: {
// Give a React component or HTML tag (e.g. 'div') to render the element.
component: StyledElement,
// Give a unique type for each element.
type: ELEMENT_PARAGRAPH,
// Give props to the root of the React component.
rootProps: {
// Give a className to the React component. Give an empty string to remove the className.
className: 'slate-p',
// When using a styled component, specify the root tag to render.
as: 'p',
// Customize styled components: https://github.com/microsoft/fluentui/wiki/Component-Styling
styles: {
root: {
margin: 0,
}
}
},
},
}
For getRenderLeaf
:
const options: BoldRenderLeafOptions = {
// Use a unique key for each slate node.
bold: {
// Give a React component or HTML tag (e.g. 'span') to render the leaf.
component: StyledLeaf,
// Give a unique string for each mark.
type: MARK_BOLD,
// Specify the hotkey to toggle this mark.
hotkey: 'mod+b',
// Specify the marks to clear when toggling this mark.
clear: '',
// Give props to the root of the React component.
rootProps: {
// Give a className to the React component. Give an empty string to remove the className.
className: 'slate-bold',
// When using a styled component, specify the root tag to render.
as: 'strong',
// Customize styled components: https://github.com/microsoft/fluentui/wiki/Component-Styling
styles: {
root: {
fontWeight: 600,
}
}
},
},
}
onKeyDownMark
signature updated:
// from
(
type: string,
hotkey: undefined,
options?: MarkOnKeyDownOptions
)
// to
(options: MarkOnKeyDownOptions)
HighlightPlugin
:- Removed
bg
option in favor ofstyles
props.
- Removed
- Updated
getLeafDeserializer
,getElementDeserializer
andgetNodeDeserializer
- Updated
deserializeHTMLToMarks
. - Updated default hotkeys:
code
:mod+e
strikethrough
:mod+shift+s
getNodeDeserializer
- returns a list of deserializers
- options:
- updated:
node
(renamed fromcreateNode
): Slate node creator from HTML element. - new:
rules
: List of rules the element needs to follow to be deserialized to a slate node:- updated:
nodeNames
(renamed fromtagNames
): Required node names to deserialize the element. Set '*' to allow any node name. - new:
className
: Required className to deserialized the element. - new:
style
: Required style to deserialize the element. Each value should be a (list of) string.
- updated:
- updated:
- ...
- Centralized default options for each plugin (
defaults.ts
):
DEFAULTS_PARAGRAPH
DEFAULTS_MENTION
DEFAULTS_BLOCKQUOTE
DEFAULTS_CODE_BLOCK
DEFAULTS_LINK
DEFAULTS_IMAGE
DEFAULTS_MEDIA_EMBED
DEFAULTS_TODO_LIST
DEFAULTS_TABLE
DEFAULTS_LIST
DEFAULTS_HEADING
DEFAULTS_ALIGN
- All element and leaf plugins use a default
className
: useful for serialization. - Components:
- New:
StyledComponent
StyledElement
StyledLeaf
- Updated:
strikethrough
:<s>
tag instead of<span>
with styles
- New:
- New utils:
setDefaults
β Deep merge the default object properties that are not defined in the destination object. Used to set the default options.getRenderLeafDefault
onKeyDownMarkDefault
- Hotkeys:
- New:
highlight
:mod+shift+h
- Updated:
code
:mod+e
strikethrough
:mod+shift+s
- New:
- HTML Deserializers:
- added style deserializing for:
- superscript:
vertical-align: sub
- subscript:
vertical-align: super
- code:
word-wrap: break-word
- superscript:
- added style deserializing for:
- Styles updated:
blockquote
code
code-block
table
- Decorate code block using Prismjs. It's using javascript language by default (WIP).
align
: deserialize
getSelectionNodesByType
renamed togetNodesByType
- new option:
at
- new option:
isNodeInSelection
renamed toisNodeTypeIn
- new option:
at
- new option:
getBlockAboveSelection
renamed togetBlockAbove
- new option:
at
- new option:
getTextFromBlockStartToAnchor
renamed togetRangeFromBlockStart
- new option:
at
- new option:
- removed
getSelectionNodesArrayByType
- replaced
insertLink
byupsertLinkAtSelection
wrapLink
is now only wrapping the link (without unwrapping).@udecode/core
package renamed to@udecode/slate-plugins-core
.
AlignPlugin
β new plugin for alignment.getPointBefore
- new options:
multiPaths
afterMatch
(replacingbeforeMatch
)skipInvalid
- support for multiple characters lookup.
- new options:
getRangeBefore
β Get range fromgetPointBefore
to the end point ofat
.withAutoformat
:- new option type:
WithAutoformatOptions
- Configurable markup to trigger the autoformatting.
- Configurable character to trigger the autoformatting.
- Configurable option to enable autoformatting in the middle of a block by inserting a block instead of updating.
- Configurable option to enable inline formatting.
- new option type:
wrapNodes
β new transform extendingTransforms.wrapNodes
. Options:unhang
β to unhang range before wrapping.
getNodes
β same forEditor.nodes
withLink
β space key should wrap the previous url with a link at the start of a block.wrapNodes
β fixed a bug where selecting an entire node then callingwrapNodes
was wrapping also the next node.
getPointBefore
β Editor.before with additional options, useful to look for a point before a location using match options.withLink
β Insert space after a url to wrap a link. There should be a space before the url. TODO: it's not working when the url is at the start of the block.LinkElement
:- styles updated.
- supports
styles
.
- when using
withLink
, inserting '#' was adding a link element.
- Split the core functionality to
@udecode/slate-plugins-core
Note: Version bump only for package slate-plugins
Note: Version bump only for package slate-plugins
Note: Version bump only for package slate-plugins
Note: Version bump only for package slate-plugins
- renamed
withDeserializeHtml
towithDeserializeHTML
. - changed signature of
withDeserializeHTML
to({ plugins })
- renamed most of utils in
deserialize-html
, includinghtmlDeserialize
todeserializeHTMLToDocumentFragment
- renamed
htmlSerialize
toserializeHTMLFromNodes
. - removed
ToolbarCodeBlock
in favor ofToolbarElement
instead. withBreakEmptyReset
andwithDeleteStartReset
β renamed optionp.type
todefaultType
.withToggleType
β renamed optionp.type
todefaultType
withTable
β removedinsertBreak
handler that prevented to insert break inside table cells, you should now useSoftBreakPlugin
to allow inserting soft breaks instead.
- new types, including
SlateDocument
to enforce a valid structure to be used in<Slate>
- added
inlineTypes
andvoidTypes
properties to theSlatePlugin
interface.EditablePlugins
will setisInline
andisVoid
to each provided type. withVoid
andwithInline
have been replaced bywithInlineVoid
.withResetBlockType
β combineswithBreakEmptyReset
andwithDeleteStartReset
.SoftBreakPlugin
β configurable rules.ExitBreakPlugin
.
deserializeHTMLToDocumentFragment
could return a fragment with emptychildren
, crashing the editor. It has been fixed so all elements have at least one children (empty text) by usingSlateDocument
type.withDeserializeHTML
was buggy when the first inserted node is an inline element (e.g. mention element).
htmlSerialize
β function for serializing content from Slate format to HTML format.
htmlSerialize
β improved the plugin identification and also added a branch for missing types in top levels.withNodeID
βinsertNode
operation was not creating new ids.
htmlSerialize
β function for serializing content from Slate format to HTML format.
- correctly export the React component types.
- export
withNodeID
.
- renamed
withBlock
towithToggleType
as it just toggles the type of an element (inline or not). - renamed
withImage
towithImageUpload
. - renamed
VideoPlugin
and its atoms toMediaEmbedPlugin
. - renamed
VIDEO
type toMEDIA_EMBED
and changed its value fromvideo
tomedia_embed
. - renamed
withShortcuts
towithAutoformat
. - renamed
HoveringToolbar
toBalloonToolbar
. - renamed
MarkdownPreviewPlugin
toPreviewPlugin
as it will be configurable to support other languages. - removed
height
props inToolbar
, usestyles
instead. - renamed
ToolbarBlock
toToolbarElement
. - renamed
ToolbarTableProps.action
toToolbarTableProps.transform
.
- New plugin
BasicElementPlugins
- New props
styles
inToolbar
- New props
styles
inHeadingToolbar
- New props in
ToolbarButton
:styles
tooltip
- New props in
BalloonToolbar
:styles
direction
hiddenDelay
theme
arrow
Toolbar
,HeadingToolbar
andBalloonToolbar
restyled.- New queries:
getSelectionText
getText
isCollapsed
isExpanded
isSelectionExpanded
useMention
:- removed
MentionSelectComponent
from return
- removed
onChangeMention
:- signature changed from
({ editor }: { editor: Editor })
to(editor: Editor)
- signature changed from
MentionSelect
:- props renaming:
- from
mentionables
tooptions
- from
index
tovalueIndex
- from
target
toat
- from
- props renaming:
MentionNode
interface: replacedmentionable
byvalue
. You can add more fields to the element interface instead of adding them tomentionable
onKeyDownMark
:- signature changed from
({ clear, type, hotkey, }: MarkOnKeyDownOptions)
to(type: string, hotkey: string, { clear }: MarkOnKeyDownOptions = {})
- signature changed from
- removed
withForcedLayout
in favor ofwithTypeRules
(more generic) - changed
CODE
type value fromcode
tocode_block
- renamed
CodePlugin
toCodeBlockPlugin
andInlineCodePlugin
toCodePlugin
getLastNode(editor: Editor, level: number)
: new query to get the last node at a specific level/depthwithTypeRules
: new normalizer plugin to force any node to have a specific typeutils
:getPreviousIndex
getNextIndex
queries
:isPointAtWordEnd
isWordAfterTrigger
getNode
: same thanNode.get
but returns null if not the node is not found at the given path.
useMention
:options
is now optional
MentionPlugin
,renderElementMention
:- added
prefix
option - added
onClick
option
- added
MentionSelect
:- added props:
styles
, see Component Styling
- added props:
getRenderElement
- added a 3rd argument:
options
that will be passed to the component as props. You should use that for static props (same value for all instances). And you should mutate the element when it's dynamic.
- added a 3rd argument:
MentionElement
:- attribute
data-slate-character
renamed todata-slate-value
- attribute
mention
:- signature of
onChangeMention
changed - signature of
useMention
changed
- signature of
// from
useMention({
characters: CHARACTERS,
}
// to
useMention(CHARACTERS, {
maxSuggestions: 10,
trigger: '@',
prefix: ''
});
mention
:- changed mention representation from string to object (more useful later for storing other information then just the string, like ids)
- added an options parameter to useMention, adding trigger and prefix to maxSuggestions
- improved typing where seemed appropriate
deserializer-html
:- export
withDeserializeHtml
- export
- previous build was broken because of tests not being excluded
- refactored:
toggleCode
totoggleWrapNodes
(generic).
- removed:
clearMark
in favor ofEditor.removeMark
.
pipe
: new helper to avoid the wrapper hell when usingwithPlugins
. You can now have an array of pluginswithPlugins
.EditablePlugins
: new props for adding your dependencies to the correspondinguseCallback
.decorateDeps
renderElementDeps
renderLeafDeps
onDOMBeforeInputDeps
onKeyDownDeps
toggleMark
: new optional parameterclear
: marks to clear when adding mark.- helpers:
createDefaultHandler
- there was a big performance gap between the official slate
Editable
component and ourEditablePlugins
component. This has been resolved by usinguseCallback
.
deserializeLink
: should work with slate fragments.withForcedLayout
was normalizing on each change.
withNodeID
: renamedidGenerator
toidCreator
withNodeID
: new options:filterText
filter
allow
exclude
setPropsToNodes
: helper to set props to nodes and its children (recursively), with many options to filter the nodes that will receive the props (e.g. only Element, only Text, only nodes of type Paragraph, etc.).
withNodeID
should now work with history undos/redos
- renamed:
withPasteHtml
towithDeserializeHtml
withPasteMd
towithDeserializeMd
onKeyDownMark.mark
toonKeyDownMark.type
- refactored:
onKeyDownMention
andonChangeMention
are now returned byuseMention
isBlockActive
andisLinkActive
have been removed in favor ofisNodeInSelection
- new options for mark plugins: type (
typeBold
,typeItalic
, etc.) . withDeserializeHtml
:- the deserializer is now using
data-slate-type
attribute of each HTML element. So copy/pasting slate fragments should now work. - when pasting a value, the type of the first node will replace the
type of the selected node (using
Transforms.setNodes
).
- the deserializer is now using
withTransforms
:- extends
editor
with transforms (only one for now).
- extends
withNodeID
:- Set an id to the new
Element
and/orText
nodes.
- Set an id to the new
deserializeMention
deserializeActionItem
deserializeIframe
deserializeHighlight
getSelectionNodesArrayByType
getSelectionNodesByType
isAncestor
unwrapNodesByType
- unit testing
- a lot of refactoring
HeadingPlugin
:- styling change (from h1 to h6)
EditablePlugins
:style
props is now overridable
withDeserializeHtml
: fixCannot read property 'children' of null
withForcedLayout
: the previous behavior was forcing to have paragraph nodes after the title. New behavior: first node should be a title (otherwise insert/edit) and second node should exist (otherwise insert a paragraph by default). We will see how to generalize this plugin in a future release.Toolbar
: changeheight
tomin-height
for dynamic height.
- refactor
getElement
togetElementComponent
- refactor elements types to reflect the html tags. Also avoiding
-
as it's not valid in GraphQL enums.action-item
->action_item
block-quote
->blockquote
heading-one
->h1
(untilh6
)link
->a
numbered-list
->ol
bulleted-list
->ul
list-item
->li
paragraph
->p
table-row
->tr
table-cell
->td
If you already saved elements in your database, you will need to migrate or override the types with the previous ones:
// you can add nodeTypes to any element plugin
export const nodeTypes = {
p.type: PARAGRAPH,
typeMention: MENTION,
blockquote.type: BLOCKQUOTE,
typeCode: CODE_BLOCK,
typeLink: LINK,
typeImg: IMAGE,
typeVideo: MEDIA_EMBED,
todo_li.type: TODO_LIST,
typeTable: TableType.TABLE,
typeTr: TableType.ROW,
typeTd: TableType.CELL,
ul.type: ListType.UL,
ol.type: ListType.OL,
typeLi: ListType.LI,
h1.type: HeadingType.H1,
h2.type: HeadingType.H2,
h3.type: HeadingType.H3,
h4.type: HeadingType.H4,
h5.type: HeadingType.H5,
h6.type: HeadingType.H6,
typeEditableVoid: EDITABLE_VOID,
};
- Ordered lists supported in
withShortcuts
(Markdown Shortcuts) by typing1.
. - Option type to all elements. Not yet for the marks.
getRenderElements
- queries:
isRangeAtRoot(point: Point)
to check if anchor or focus of a range is at the root.
- use
isRangeAtRoot(point: Point)
before eachEditor.parent
call.
- queries:
isPointAtRoot(point: Point)
to check if a point is at the root.
- plugins:
withVoid
to set a list of element types to void.withInline
to set a list of element types to inline.
plugin-list
: fixed a bug where toggling the list throws an error when a paragraph has few leafs
plugin-marks
: New plugins for HTML<sub>
and<sup>
tags: superscript and subscript plugins. Included in the "Marks" story.
- Deserializer: pasting html or markdown with Elements inside Text tags works correctly now.
paste-md
:- markdown can be pasted into the editor
plugin-list
:- make sure list item is removed when unwrapping.
- if multiple paragraphs are selected when pressing toggle - they should end up as separate list items.
- The default toggleBlock function creates several code blocks if there are multiple paragraphs selected. This fix creates a toggleCode function that just wraps the whole selection in a code block - or unwraps if it is already in a block.
plugin-table
:- Insert table
- Delete table
- Add/delete row
- Add/delete cell
plugin-list
:- Each list item now has a paragraph child.
plugin-list
:- Supports nested lists:
- Press
Tab
on a list item (except the first one) to indent the current list. - Press
Shift+Tab
,Enter
orBackspace
to unindent the current list.
- Press
- Supports nested lists:
- styles:
line-height
of heading
- plugins:
withList
has been removed and its logic is now insidewithBlock
with the new optionunwrapTypes
.withShortcuts
: removeddeleteBackward
logic as its covered bywithDeleteStartReset
.
p
tag was the default if notype
was provided. The new default isdiv
.
- plugins:
withDeleteStartReset
: on delete at the start of an empty block in types, replace it with a new paragraph.withBreakEmptyReset
: on insert break at the start of an empty block in types, replace it with a new paragraph.
- queries:
isList
- styles
- action item.
- removed the element styling from
globalStyle
as it is not exported. - a lot of spacing changes.