Releases: microsoft/roosterjs
Releases · microsoft/roosterjs
RoosterJs 8.28.1
Improvement
- Modified shouldReplace to add editor as optional parameter (#1081)
Bug fix
- Delete the whole table if the table is empty after deletion (#1106)
- Horizontal table inserter not disposing (#1107)
- Avoid merge of two lines when the pasted content only contains two blocks. (#1113)
- Replace highlighted text not working (#1071)
- Modify the Check in normalizeRect (#1134)
- Stop Table Resizer disposal while editing (#1135)
- InsertNode with option InsertInNewLine is inserting the new node incorrectly when target is a table cell (#1137)
- Fix numbering list triggers (#1142)
Engineering improvement
- Add buildmjs to export esmodules under lib-mjs (#1110)
- Enable strict mode in roosterjs-editor-core/lib/coreApi folder (#1111)
- Add tests
- Run test coverage for both browsers (#1139)
- Use caret version dependency between packages
Interface changes
- New parameter of CustomReplacement.shouldReplace:
- sourceEditor: A reference to the editor to allow more complex replacement rules
RoosterJs 8.27.0
Improvement
- Modify the editor.addUndoSnapshot to add formatApiName to the request (#1075)
- Fix align list item when styled (#1076)
- Add different apiNames for automatic formatting. (#1087, #1092)
Bug fix
- Fix bug in ensureUniqueId (#1074)
- Fix Option+Backspace behavior on Mac (#1084)
- Add null check in AdjustInsertPosition (#1088)
- Fix empty selection check in TypeInContainerPlugin (#1086)
Engineering improvement
Interface change
- New parameter of addUndoSnapshot API callback parameter:
- additonalData: Additinal data for this callback
- New parameter for toggleBullet, toggleNumbering, toggleListType:
- apiNameOverride: Override the default API name parameter in ContentChangedEvent
RoosterJs 8.26.1
New features
Improvement
- Improve demo site #1037
- Fix dts.js to be compatible for react export #1049
- Re enable Table Selector is displaying incorrectly above the editors Div #1050
- Improve PasteOptionPlugin #1054
- Improve Table Shading Menu #1058
Bug fix
- Inserting a table after a non content editable entity, makes the table not editable #1038
- Fix dark mode style for demo site #1041
- Fix Paste will not replace selected content on Android #925 #1040 #1043
- Add API name to the ContentChanged Plugin Event that is going to be triggered after using a Format Function #1044
- Fix #1045 #1046
- Enable auto list only in the beginning of a sentence #1055
- Fixed issue with creating link not replacing all selected text - Creating link does not replace the whole selected text #917 #1057
- Fix #1062 PluginEvent should support CompatiblePluginEventType #1063
- Remove comment related styles #1068
- Fix #1067 Need to trigger ContentChangedEvent after resize image #1069
Interface change of roosterjs
- Separate event types for the existing event to make plugin event support CompatiblePluginEventType:
- BeforeCutCopyEventData: Data of BeforeCutCopyEvent
- BeforeCutCopyEvent and CompatibleBeforeCutCopyEvent
- CompatibleBeforeDisposeEvent
- BeforePasteEventData: Data of BeforePasteEvent
- BeforePasteEvent and CompatibleBeforePasteEvent
- BeforeSetContentEventData: Data of BeforeSetContentEvent
- BeforeSetContentEvent and CompatibleBeforeSetContentEvent
- ContentChangedEventData
- ContentChangedEvent and CompatibleContentChangedEvent
- EditImageEventData
- EditImageEvent and CompatibleEditImageEvent
- CompatibleEditorReadyEvent
- EntityOperationEventData
- EntityOperationEvent and CompatibleEntityOperationEvent
- ExtractContentWithDomEventData
- ExtractContentWithDomEvent and CompatibleExtractContentWithDomEventData
- CompatiblePendingFormatStateChangedEvent
- EnterShadowEditEventData
- EnterShadowEditEvent and CompatibleEnterShadowEditEvent and CompatibleLeaveShadowEditEvent
- ZoomChangedEventData
- ZoomChangedEvent and CompatibleZoomChangedEvent
- PluginMouseUpEventData
- PluginContextMenuEventData
- PluginScrollEventData
- PluginScrollEvent and CompatiblePluginScrollEvent
- CompatiblePluginCompositionEvent
- CompatiblePluginMouseDownEvent
- CompatiblePluginMouseUpEvent
- CompatiblePluginContextMenuEvent
- CompatiblePluginMouseEvent
- CompatiblePluginKeyDownEvent
- CompatiblePluginKeyPressEvent
- CompatiblePluginKeyUpEvent
- CompatiblePluginKeyboardEvent
- CompatiblePluginInputEvent
- CompatiblePluginScrollEvent
- CompatiblePluginDomEvent
Interface change of roosterjs-react
-
New types for string keys:
- EmojiStringKeys: Localized string keys for Emoji UI component.
- TableEditShadeMenuItemStringKey: Key of localized strings of Table Edit Cell Shade menu item.
-
New plugin API:
- createEmojiPlugin: Create a new instance of Emoji plugin with FluentUI components.
-
New ContextMenuItem parameters:
- itemRender: Custom render of drop down item
- itemClassName: CSS class name for drop down menu item
- commandBarSubMenuProperties: Use this property to pass in Fluent UI ContextMenu property directly. It will overwrite the values of other conflict properties
Full Changelog: v8.25.0...v8.26.1
RoosterJs 8.25.0
New features
- Add PasteOptions plugin to roosterjs-react (#1032)
- Add ContextMenu plugin to roosterjs-react (#1034)
Improvement
- Refactor and improve auto format and auto bullet featrues (#1025, #1026, #1028, #1029)
- Add theme support in roosterjs-react components (#1030)
- Image Edit: Support ModeIndependentColor for border color
- Add a string-typed version of Object.keys() - getObjectKeys() (#1036)
Bug fix
- Fix wrap content when element is empty (#1033)
Interface change of roosterjs
- New parameters of API setListStyleType:
- orderedStyle: Style for ordered list
- unorderedStyle: Style for unordered list
- New parameters of API toggleListType:
- orderedStyle: Style for ordered list
- unorderedStyle: Style for unordered list
- New API in roosterjs-editor-dom package:
- getObjectKeys: Provide a strong-typed version of Object.keys()
- New content edit features:
- autoBulletList: New implementation of auto bullet list
- autoNumberingList: New implementation of auto numbering list
Interface change of roosterjs-react
- New types
- UIUtilities: A set of UI Utilities to help render additional UI element from a plugin
- ReactEditorPlugin: A sub interface of roosterjs.EditorPlugin to provide additional functionalities for rendering react component from the plugin
- ContextMenuItem: Represent a context menu item
- New types for string keys:
- ListNumberMenuItemStringKey: Key of localized strings of List Number menu items and its dialog.
- ImageEditMenuItemStringKey: Key of localized strings of Image Alt Text menu item.
- TableEditMenuItemStringKey: Key of localized strings of Table Edit menu item.
- PasteOptionButtonKeys: keys for Paste Option buttons
- PasteOptionStringKeys: Localized string keys for Paste Option buttons and its UI component
- New APIs
- createUIUtilities: Create the UI Utilities object for plugins to render additional react components
- New parameter of RibbonButton.onClick:
- uiUtilities: A utilities object to help render addition UI elements
- New context menu related API
- createContextMenuPlugin: Create a new instance of roosterjs.ContextMenu plugin with context menu implementation based on FluentUI.
- createContextMenuProvider: Create a new instance of ContextMenuProviderImpl class
- createListEditMenuProvider: Create a new instance of ContextMenuProvider to support list number editing functionalities in context menu
- createImageEditMenuProvider: Create a new instance of ContextMenuProvider to support image editing functionalities in context menu
- createTableEditMenuProvider: Create a new instance of ContextMenuProvider to support table editing functionalities in context menu
RoosterJs 8.24.0
Improvement
- Show table selector if it is inside of the Scroll Container (#1015)
- Refactor auto hyphen experimental flight (#1014)
- Handle pasting '\t' characters into editor (#1017)
- Fix resize image on Android WebViews (#1019)
Bug fix
- Fix issue in Normalize Table (#1022)
Interface change
- New plugin class
- AutoFormat: Transform "--" into hyphen, if typed between two words.
RoosterJs 8.23.0
New feature
- New metadata API (#967)
- New text feature: auto hyphen (#1001)
- New list feature: auto format numbered and bullet list (#1000)
Improvement
- Add target parameter to createLink API (#966)
- Add attributes parameter to insertImage API (#968 #972 #973)
- Leverage metadata API for table format (#977)
- Remove deprecated colors when paste (#978)
- Allow return null in UndoSnapshotService.move() (#991)
- Support hotkey for clearing format (#992)
- Support additional hotkey for Undo (#997)
- Support resize image on mobile and custom resize handle style (#988)
Bug fixes
- Preserve table selection when no need to clear it (#970)
- Better handle empty new line text node when apply format (#974)
- Better handle SUB and SUP tags when apply format (#979)
- Add some log to SelectionBlockScoper to help troubleshooting (#971)
- Fix a run time script error in TableCellSelection (#984)
- Add null check during to editor instance in extractClipboardEvent callbacks (#998)
- Fix the table selector when it is scrolled out (#1005)
- Add compitable enum support for PluginEventTypes (#1009)
Interface changes
- New parameter of function getBrowserInfo
- vendor: The vendor string of a browser
- New method of VList class
- setListSTyleType: Change list style of the given range of this list.
- New method of VListItem class
- applyListStyle: Apply the list style type
- New metadata types and API
- DefinitionType: Types of definitions, used by Definition type
- DefinitionBase: Base type of all definitions
- ArrayItemType: A utility type to get item type of array
- ObjectPropertyDefinition: Child type of object definition
- StringDefinition, NumberDefinition, BooleanDefinition, ArrayDefinition, ObjectDefinition, , CustomizeDefintion: Known types of definitions
- Definition: A union of all known types of definitions
- validate: To validate a given object with a type definition object
- createNumberDefinition, createBooleanDefinition, createStringDefinition, createStringDefinition, createArrayDefinition, createObjectDefinition: Create definition objects for the specified types
- getMetadata: Get metadata from a DOM element and validate it
- setMetadata: Validate a metadata and set to DOM element
- removeMetadata: Remove existing metadata from a DOM element if exists
- New parameter of createLink API
- target: Display target for the link ("_blank"|"_self"|"_parent"|"_top"|"{framename}")
- New parameter of insertImage API
- attributes: Image element attributes
- New parameter of toggleBullet, toggleNumbering API and toggleListType API:
- listStyle: The style of the bullet list. If not defined, the style will be set to disc.
- New member of Browser object:
- isMobileOrTablet: Whether current browser is on mobile or a tablet
- New experimental features
- AutoFormatList: Trigger formatting by a especial characters. Ex: (A), 1. i).
- AutoHyphen: Automatically transform -- into hyphen, if typed between two words.
- New list style types:
- NumberingListType: Enum used to control the different types of numbering list
- BulletListType: Enum used to control the different types of bullet list
- New parameter of ImageEdit constructor:
- onShowResizeHandle: An optional callback to allow customize resize handle element of image resizing.
- Other types to help customize image resize handle
- OnShowResizeHandle
- DNDDirectionX
- DNDDirectionY
RoosterJs 8.22.0
Improvement
- Support more accessible image resize handles (#915, #927)
- Improve paste from Word behavior:
- Graduate experimental feature: AlwaysApplyDefaultFormat (#934)
- Expose original core API in EditorCore so that overridden core API can easily call original API (#930)
- New experimental feature: align list items with its list number or bullet point (#948)
- Apply default format when clear block format (#945)
Bug fix
- Fix the bug that formatted table can lose background when switch from dark mode to light mode (#933)
- Change normalize tableSelection using Vtable instead of table (#938)
- Do not insert TAB space when press TAB in readonly entity (#947)
- Fix a script error in VTable (#962)
- Remove duplicated Table ID when select table (#964)
- Maintain list style type when a style type is already applied (#960)
- Fix a bug that dark mode color not applied when there is already data color specified (#959)
Engineering improvement
- Publish a new package
roosterjs-editor-types-compatible
to export enums rather than const enum so it can work in isolatedModules mode, and go back to publish const enum from existingroosterjs-editor-types
package to keep smaller bundle size (#929, #949, #950, #956, #957, #958, #961) - Make the source code inline into source map in package
roosterjs-color-utils
to support better compatibility (#935)
Interface changes
- New compatible enum types are added. All of them have the same values with original const enum types. For more information, please refre to Work with isolatedModules
- New ExterimentalFeatures member:
- AdaptiveHandlesResizer: Provide a circular resize handles that adaptive the number od handles to the size of the image
- ListItemAlignment: Align list elements elements to left, center and right using setAlignment API
RoosterJs 8.20.0
Improvement
- Table improvements: support merging multiple cells (#880)
- Allow customization of TableResize helper elements (#909)
- When paste from Word, remove comments (#912)
Bug fix
- Fix the bug that focus can be lost after copy (#893)
- Fix some runtime errors (#897, #905)
- Check if the TabKeyFeatures before modifying the ListPosition to be inside (#899, #900)
- Fix copy/paste issue in IE (#908)
- Fix an issue when set content with Colgroup (#872, #916)
Engineering improvement
- Use "enum" instead of "const enum" by default to be compatible with "isolatedModule" mode. This will increase bundle size. To keep a smaller bundle size, we publish "@size-optimized" version to keep using "const enum" (#911)
- Finished the strict mode improvement for roosterjs-editor-dom package (#883, #892)
- Prepare strict mode for roosterjs-editor-core package (#902)
Interface change
- Replace "const enum" with "enum" for @latest version, but keep them in @size-optimized version
- New enum TableOperation member:
- MergeCells: Merge all selected cells
- New parameter of TableResize constructor:
- Parameter onShowHelperElement: An optional callback to allow customize helper element of table resizing
RoosterJs 8.19.0
New features
- Clipboard data now support copied files (#852, #857)
- Support insert/delete multiple columns/rows together (#847, #864, #875)
- Support indent whole table when whole table is selected (#865)
Improvement
- Dark mode and undo improvement:(#839 #840 #841 #842 #843)
- Now taking/restoring undo snapshot in dark mode won't trigger color transformation in not necessary
- Undo snapshot is aware of table selection
- Color transformation algorithm is optimized, no repeated rerender happens now
- Disable "template" tag in HtmlSanitzer for security (#850)
- Enable strict mode for:
Bug fix
- Add aria labels to ribbon buttons (#854)
- Fix some typos in comment (#856)
- Prevent the mouseUp event to be added when Event Target is not or under a table (#859)
- Fix Issue when selecting all table and trying to Copy (#862)
- Remove unneeded check in getListItemIndex in VList (#868)
- Fix issue when using Tab before Anchor Element (#877)
- Prevent List Item removal when Shift+Tab in a Level 1 LI (#874)
Interface change
roosterjs
- New interface TableOperation member:
- MergeCells: Merge all selected cells
- New interface ClipboardData member:
- files: General file from clipboard event
- New interfaces for snapshot based undo snapshots:
- ContentMetadataBase: Common part of NormalContentMetadata and TableContentMetadata
- NormalContentMetadata: a content metadata is a data structure storing information other than HTML content for normal selection
- TableContentMetadata: a content metadata is a data structure storing information other than HTML content for table selection
- ContentMetadata: a content metadata is a data structure storing information other than HTML content
- Snapshot: a serializable snapshot of editor content, including the html content and metadata
- New member for Editor/IEditor:
- transformToDarkColor: transform the given node and all its child nodes to dark mode color if editor is in dark mode
- New member for CorePlugins:
- normalizeTable: NormalizeTable plugin makes sure each table in editor has TBODY/THEAD/TFOOT tag around TR tags
- New parameter for core API SetContent:
- metadata: metadata of the HTML content, including color info and selection
- New parameter for core API TransformColor:
- forceTransform: by default this function will only work when editor core is in dark mode, pass true to this value to force do color transformation even editor core is in light mode
- New member for interface EditorOptions:
- undoMetadataSnapshotService: New undo snapshot service based on snapshot. Original one (undoSnapshotService) is deprecated now.
- New member of interface TableFeatureSettings:
- indentTableOnTab: indentTableOnTab edit feature, provides the ability to indent the table if it is all cells are selected.
- New member of class VTAble
- setAlignmentToSelectedCells: set text alignment to selected cells in table
- New function isWholeTableSelected: check if the whole table is selected
- New parameter of fucntion setIndentation:
- preventItemRemoval: true to prevent the indentation to remove the bullet when outdenting a first
- New parameter of VListItem.outdent:
- preventItemRemoval: whether prevent the list item to be removed for the listItem by default false
- New member of class VListItem:
- addNegativeMargins: add negative margin to the List item
- New function setHtmlWithMetadata: restore inner HTML of a root element from given html string
- New function addSnapshotV2: add a new snapshot to the given snapshots data structure
- New function clearProceedingSnapshotsV2: move current snapshot with the given step if can move this step. Otherwise no action and return null
roosterjs-react
- New type MoreCommandsButtonStringKey: key of localized strings of More commands (overflow) button
RoosterJs 8.18.0
New features:
- Introduce new package roosterjs-react. (#775, #777, #779, #783, #787, #799, #800, #801, #802, #803, #812, #814, #815, #817, #824)
It is a package of react component for roosterjs. In this version there are 2 components:- Rooster: The react wrapper of roosterjs editor
- Ribbon: The format bar of roosterjs editor
As well as 2 plugins: - UpdateContentPlugin: To help developer get HTML content of editor
- RibbonPlugin: Work with Ribbon to execute format command in editor and show format state in ribbon
- Support whole table alignment (#772) Experimental feature: TableAlignment
- Tab key improvement: (#810, #813, #816) Experimental feature: TabKeyTextFeatures
- Indent whole paragraph when TAB at beginning or select the whole paragraph
- Outdent whole paragraph when press Shift+TAB in a indented paragraph
- Insert a TAB space when tab between texts
- Indent the whole list when tab from the beginning of the first list item
- Auto change text color when set shade color in table (#806, #826)
Bug fix:
- Reduce unnecessary undo snapshot from table resize (#781)
- Set table background color using setColor() api to work better with dark mode (#785)
- Fix table selection issue when leaving Shadow Edit (#789)
- Fix Cut failed on Android since we collapse selection range before deleteSelectedContent (#797 #804)
- Fix Bug: Uncaught TypeError: Cannot read properties of null (reading 'y') (#805, #807)
- Fix: Do not remove cellshade when change table state (#808)
Interface changes:
- New classes/functions/types from roosterjs-react package. Please reference to https://microsoft.github.io/roosterjs/docs/modules/roosterjs_react.html for more details.
- New interface ExperimentalFeatures members:
- TableAlignment: Align table elements to left, center and right using setAlignment API
- TabKeyTextFeatures: Provide additional Tab Key Features. Requires Text Features Content Editable Features
- New interface FormatState members:
- isDarkMode: Whether editor is in dark mode
- zoomScale: Current zoom scale of editor
- New interface ElementBasedFormatState:
- isInTable: Whether the cursor is in a table
- New interface TableFormat member:
- keepCellShade: If true, the new format will not overlay cells that has color applied
- New interface for content edit feature:
- TextFeatureSettings: Settings for text features
- New function setColor parameter:
- shouldAdaptFontColor: Whether the font color needs to be adapted to be visible in a dark or bright background color.
- New function VTable.writeBack parameter:
- skipApplyFormat: Do not reapply table format when write back
- New class VList member:
- rootList: The root list element, can be either OL or UL tag
- getListItemIndex: Get the index of the List Item in the current List
- getStart: Get the Start property of the root list of this VList