Skip to content

Releases: microsoft/roosterjs

RoosterJs 8.16.0

22 Feb 23:33
455c7a0
Compare
Choose a tag to compare

Improvement

  1. Using a new approach to do table selection (#748, #749, #750)
  2. Add zoomScale number support (#755)
  3. Add whole table selector (#758)

Bug fix

  1. Fix a conflict between table cell shade API and table applyFormat() API (#746)
  2. Bug fix for table selection (#751)
  3. Fix a bug when creating a link (#759)
  4. Fix a bug when deleting table rows (#763)
  5. Fix a scroll bug in TableResize plugin (#762)
  6. Fix a bug in shadowEditTableSelection (#767)
  7. Fix a bug when disposing editor and table cell selecting (#770)
  8. Fix a bug in onFocus event for TableSelection (#771)

Engineering

  1. Add inlineSource compile options (#747)
  2. Enable strict mode for:
    • roosterjs-editor-dom\htmlSanitizer (#741)
    • roosterjs-editor-dom\event (#764)
    • roosterjs-editor-dom\clipboard (#764)
  3. Use sass instead of node-sass (#769)

Interface change

  1. New PluginEventType and event object ZoomChangedEvent
  2. New function overload: IEditor.select() now accept table element and coordinates to select cells from table
  3. New IEditor/Editor API: getZoomScale() and setZoomScale() to get/set the number of zoom scale
  4. New member of EditorCore: zoomScale and EditorOptions.zoomScale
  5. New Core API: selectTable
  6. New member of TableSelectionRange: coordinates
  7. New member of DOMEventPluginState: tableSelectionRange
  8. New member of LifecyclePluginState: shadowEditTableSelectionPath

RoosterJs 8.14.0

08 Feb 05:22
ddb4dec
Compare
Choose a tag to compare

New features

  1. New table selection plugin (still under development)
  2. New table format API (still under development)
  3. New API to set table cell shading color
  4. TableResize plugin now supports zoomed view

Code improvement

  1. Enable strict mode for severl folders

Interface changes

  1. New enum KnownCreateElementDataIndex.TableSelector
  2. New enum TableBorderFormat
  3. New interface members:
    • TableFormat.hasHeaderRow
    • TableFormat.headerRowColor
    • TableFormat.hasFirstColum
    • TableFormat.hasBandedColumns
    • TableFormat.hasBandedRows
    • TableFormat.tableBorderFormat
  4. New interface TableSelection
  5. New interface Coordinates
  6. New IEditor/Editor method getSelectionRangeEx()
  7. New parameter "range" of method IEditor/Editor.getSelectionTraverser()
  8. New core API and type getSelectionRangeEx: GetSelectionRangeEx
  9. New interface SelectionRangeExBase, NormalSelectionRAnge, TableSelectionRange, SelectionRangeEx
  10. New enum SelectionRangeTypes
  11. New parameter "sizeTransformer" of constructor of VTable
  12. New members of VTable:
    • VTable.formatInfo
    • VTable.selection
    • VTable.getTd()
  13. New parameter "sizeTransformer" of VTable.normalizeTableCellSize()
  14. New API applyCellShading()
  15. New plugin class TableCellSelection
  16. Parameter/return value adjustment for strict mode:
    • changeElementTag()
    • contains()
    • findClosestElementAncestor()
    • matchLink()
    • splitParentNode()
    • unwrap()
    • getNextLeafSibling()
    • getPreviousLeafSibling()
    • getFirstLeafNode()
    • getLastLeafNode()
    • normalizeRect()
    • readFile()
    • createElement()
    • getPositionRect()
    • getSelectionPath()
    • setHtmlWithSelectionPath()
    • getEntityFromElement()

RoosterJs 8.13.0

24 Jan 21:07
604f5b0
Compare
Choose a tag to compare

Bug fix

  1. Adjust the execution order of core plugins and customized plugins (#713)
  2. ImageEdit plugin modifies image src url (#704)

New features

  1. Add GetContentMode.PlainTextFast to allow retrieve plain text content faster (#717)
  2. Support scal in ImageEdit plugin (#719)

Interface changes

  1. New enum member GetContentMode.PlainTextFast: Retrieve plain text content faster
  2. New Editor/IEditor method getSizeTransformer() to get a transformer function for size transformation
  3. New interface EditorCore member sizeTransformer: to store the size transformer function
  4. New interface EditorOptions member sizeTransformer: to specify the size transformer function
  5. New type definition SizeTransformer

RoosterJs 8.12.0

09 Jan 23:54
84d9c08
Compare
Choose a tag to compare

New features

  • Support "trusted-types dompurify" (#689)
  • Support "inherit" color for dark mode color transform (#691)

Bug fixes

  • Fix listFeature Issue with Safari (#696)
  • Collapse selection after performing Copy when Android (#702)
  • Fix typescript version issue (#715)

Interface changes

  • Remove uncommon members from TargetWindowBase
  • Add optional type parameter for safeInstanceOf()

RoosterJs 8.11.3

08 Nov 17:50
086f7ed
Compare
Choose a tag to compare

Bug fixes:

  1. Fix whole table alignment API to keep table occupy the whole block (#681)
  2. Fix text selection issue in Safari (#683)
  3. Fix bug that paste images with SVG format results in nothing pasted (#685)

RoosterJs 8.11.1

25 Oct 22:22
9722fd0
Compare
Choose a tag to compare

Improvements

  • Upgrade build tool to typescript 4.4.4. This causes some interface change about TargetWindow interface (see below)

Bug fixes:

  • Exclude comment nodes when checking first child nodes when paste image (#673)
  • Remove empty span with position:absolute when paste from Word WAC (#674)

Interface changes

  • New members of interface Keys
    • Keys.EIGHT_ASTERISK (correct the spelling of the name)
    • Keys.FORWARD_SLASH (add "_" between words)
    • Old related members are marked as @deprecated
  • New base interface of TargetWindow: TargetWindowBase, to split auto-generated members from manually added ones
  • New Member of TargetWindow (via TargetWindowBase). These members are supported by new version of typescript:
    • TargetWindow(Base).ParentNode
    • TargetWindow(Base).SVGMPathElement
    • TargetWindow(Base).SVGSetElement
    • TargetWindow(Base).MathMLElement
  • Deprecated members of TargetWindow interface, for backward compatibility, we still keep them but there types are all "Element", so do not use them.
    • TargetWindow.SVGCursorElement
    • TargetWindow.HTMLBaseFontElement
    • TargetWindow.HTMLAppletElement

Roosterjs 8.10.1

08 Oct 21:40
57cda67
Compare
Choose a tag to compare

Changes from v8.10.1

Bug fix

  • Fix a VListChain bug, do not change start number of a list that start from 1 when insert another list before (#653)
  • Fix a bug in ImageResize (#654)
  • Fix Paste Gifs when HTML only have one IMG Tag (#658)
  • Fix a conflict issue between list features and entity plugin (#662)

Changes from v8.10.0

New API

  • Shadow DOM entity API (still in experiment)

Improvement

  • Set List Item ::marker styles to be equal as the content when starting new List (#644)

Bug fix

  • Keep image resposive, if not resized (#645)

Interface change

  • New EntityOperation interface members
    • EntityOperation.AddShadowRoot: Notify plugins that editor has attached shadow root for an entity.
    • EntityOperation.RemoveShadowRoot: Notify plugins that editor has removed the shadow root of an entity
  • New EntityOperationEvent interface member
    • EntityOperationEvent.contentForShadowEntity: A document fragment for entity based on Shadow DOM. This property is only available for NewEntity operation.
  • New EntityPluginState interface member
    • EntityPluginState.shadowEntityCache: Cache for the hydrated content of shadow DOM entity
  • New format API
    • setListItemStyle: Set the Style of a List Item provided, with the styles that the inline child elements have.
  • API return value change:
    • IEditor.runAsync: change return value from void to a disposer function

RoosterJs 8.9.0

10 Sep 05:40
77fc593
Compare
Choose a tag to compare

New features

  1. Support set horizontal and vertical alignment of a table cell
  2. In CustomReplace plugin, add a callback to check if a replacement should be executed

Bug fixes

  1. Do not set text color to default text color when remove format of a hyperlink
  2. Fix #632: Do not convert null initial content to string 'null'
  3. Fix #614: Do not merge list when exit from a list
  4. Fix #631: Better retrieve format state from current position
  5. When exit from a blockquote, resume to default format

Interface change

  1. New TableOperation enum values
    • AlignCellLeft
    • AlignCellCenter
    • AlignCellRight
    • AlignCellTop
    • AlignCellMiddle
    • AlignCellBottom
  2. New public API toggleListType: Toggle List Type at selection
  3. new CustomReplacement interface member
    • shouldReplace: a callback to check if the string should be replaced
  4. New function parameter for function setTextColor:
    • shouldApplyInlineStyle: (Optional) callback function to be invoked to verify if the current element should have the inline Style applied

RoosterJs 8.8.0

26 Aug 21:22
b6a29f0
Compare
Choose a tag to compare

New features:

  1. New API Editor.getPendableFormatState(), fix the underline state incorrect issue
  2. New EditorOperations to set table alignment
  3. New feature to reset list number

Bug fixes:

  1. Fix a bug in EntityId fixup logic (#606)
  2. Fix a bug in setHtmlWithSelectionPath when DOMPurify is used (#605)
  3. Fix a bug in ImageEdit plugin to show better cursor for resize handle
  4. Fix a bug when paste a whole table as image
  5. Fix a bug when paste HTML with a single image
  6. Fix a bug that getComputedStyles() always returns lowercase font name

Interface changes

  1. New ExperimentalFeatures enum value
    • ExperimentalFeatures.ConvertSingleImageBody: Paste the Html instead of the Img when the Html Body only have one IMG Child node
  2. New TableOperation enum value
    • TableOperation.AlignCenter
    • TableOperation.AlignLeft
    • TableOperation.AlignRight - allow align a table to center/left/right
  3. New ClipboardData interface member
    • ClipboardData.html.FirstLevelChildTags - Array of tag names of the first level child nodes
  4. New Editor API
    • IEditor.getPendableFormatState(forceGetStateFromDOM?: boolean): PendableFormatState - Get the pendable format state from the current selection, incluing formats as underline, bold, italics
  5. New Core API Type and member
    • type GetPendableFormatState = (core: EditorCore, forceGetStateFromDOM: boolean) => PendableFormatState;
    • CoreApiMap.getPendableFormatState: GetPendableFormatState - Get the pendable format such as underline and bold
  6. New VList API
    • VList.split(separator: HTMLElement, startNumber: number): void - Sets the New List Start Property, that is going to be used to create a new List in the WriteBack function
    • VListItem.getNewListStart(): number | undefined - Get the Start Number of the new List
    • VListItem.setNewListStart(startNumber: number): void - Set the start Number of the new list
  7. New Format API
    • setOrderedListNumbering(editor: IEditor, separator: HTMLLIElement, startNumber?: number): void - Resets Ordered List Numbering back to the value of the parameter startNumber
    • blockFormat(editor: IEditor, callback: (region: Region, start: NodePosition, end: NodePosition, chains: VListChain[]) => void, beforeRunCallback?: () => boolean): void - Split selection into regions, and perform a block-wise formatting action for each region.

RoosterJs 8.7.0

10 Aug 17:57
932c859
Compare
Choose a tag to compare

New features:

  • Support TrustedType for Content Security Policy (#581)
  • Integrate functionality of clearBlockFormat into clearFormat and support auto detecting clear format mode
  • Allow always apply default format when type in container which doesn't have format

Bug fix:

  • When insert image after a link, image will be inserted into link (#551)
  • Fix EntityId matching issue

New Experimental Features:

  • AlwaysApplyDefaultFormat: When type new content, check if the element has a style attribute, if not, apply the default format

New enum / interface / values:

  • ClearFormatMode: Represents the strategy to clear the format of the current editor selection, used by clearFormat() API
  • KnownCreateElementData: The metadata to create DOM elements used by createElement()
  • KnownCreateElementDataIndex: Index of known CreateElementData used by createElement function, used by createElement() API
  • CreateElementData: An interface represents the data for creating element used by createElemnet()
  • PluginEventType.BeforeSetContent: Event type for BeforeSetContentEvent
  • EditorCore.trustedHTMLHandler: A handler to convert HTML string to a trust HTML string. By default it will just return the original HTML string directly. To override, pass your own trusted HTML handler to EditorOptions.trustedHTMLHandler
  • EditorOptions.trustedHTMLHandler: The option to pass in trustedHTMLHandler

New event:

  • BeforeSetContentEvent: The event to be triggered before SetContent API is called.

New API / parameters:

  • IEditor.getTrustedHMTLHandler/Editor.getTrustedHMTLHandler: Get a function to convert HTML string to trusted HTML string. By default it will just return the input HTML directly. To override this behavior, pass your own trusted HTML handler to EditorOptions.trustedHTMLHandler
  • wrap(node, CreateElementData | KnownCreateElementDataIndex): Wrap given elements with element created from the given CreateElementData or index.
  • adjustInsertPosition(): Adjust insert position before insert node to DOM tree, handle some cases such as inserting list items into list, or insert table cells into table, or insert content before/after a hyperlink, etc
  • createElement(): A shortcut to create a bunch of DOM elements from CreateElementData, to replace API fromHTML.
  • moveChildNodes(): Replace all child nodes of the given target node to the child nodes of source node.
  • setHtmlWithSelectionPath(rootNode, html, trustedHTMLHanlder): Allow pass in a trusted HTML handler so that HTML can be sanitized before set into DOM tree
  • chainSanitizerCallback(): Loosen the type parameter constraint to allow passing compatible callbacks
  • clearFormat(editor, formatType): Add a new parameter formatType to allow auto detecting clear format mode

Deprecated API / properties:

  • CorePlugins.typeAfterLink: No need to have it now since the major logic has been integrated into insertNode() API
  • ImageEditOptions.rotateIconHTML: This is not supported any more.
  • fromHtml(): Due to security risk, we don't use this API any more. Use new API createElement() instead.
  • wrap(node, wrapperString): This override is deprecated due to security risk. Use new override wrap(node, createElementData) instead
  • clearBlockFormat(): Use clearFormat(ClearFormatMode.Block) instead