-
Notifications
You must be signed in to change notification settings - Fork 166
RoosterJs 7
We are planning to remove all deprecated APIs/Interfaces/Classes/Parameters soon, and increate the major build version from 6 to 7.
Compare with roosterjs 6.19, there is no new functionalities introduced in roosterjs 7.0.0. And we will still maintain roosterjs 6 for a while. But once roosterjs 7 is published, new features will be added in to roosterjs 7 first, and may or may not backport into roosterjs 6. So we still recommend to upgrade to roosterjs 7.
Start from roosterjs 7.0.0, the following APIs/Interfaces/Classes/Parameters will be removed. Most of them have replacement, some of them are not used any more and have no replacement.
All replacement methods are now available from roosterjs 6.19.0.
For more details, please see tables for each packages below:
Name | Replacement | Comment |
---|---|---|
ContentScope | N/A | Use Editor.get*Traverser() to specify content scope |
EditorPoint | NodePosition | |
NodeBoundary | PositionType | |
ListState | N/A | |
ChangeSource.AutoBullet | N/A | |
ChangeSource.Undo | N/A | |
ContentChangeEvent.lastSnapshot | N/A | |
PluginEventType.Idle | N/A | |
BlockElement.getTextContent | N/A | |
BlockElement.getContentNodes | N/A | |
BlockElement.getFirstInlineElement | getFirstInlineElement(BlockElement.getStartNode()) | In package roosterjs-editor-dom |
BlockElement.getLastInlineElement | getLastInlineElement(BlockElement.getEndNode()) | In package roosterjs-editor-dom |
BlockElement.getInlineElements | N/A | |
BlockElement.isInBlock | BlockElement.contains(inlineElement.getContainerNode()) | |
InlineElement.getStartPoint | InlineElement.getStartPosition() | |
InlineElement.getEndPoint | InlineElement.getEndPosition() |
Name | Replacement | Comment |
---|---|---|
getFirstBlockElement | N/A | |
getLastBlockElement | N/A | |
getFirstLastBlockElement | N/A | |
TextInlineElement | N/A | |
getInlineElementBefore | N/A | |
getInlineElementAfter | N/A | |
matchWhiteSpaces | N/A | |
isTextualInlineElement | InlineElement.isTextualInlineElement() | |
wrapAll | wrap() | |
TraversingScoper | N/A | Use Editor.get*Traverser() to specify content scope |
convertInlineCss | HtmlSanitizer.convertInlineCss() | In package roosterjs-html-sanitizer |
sanitizeHtml | HtmlSanitizer.sanitizeHtml() | In package roosterjs-html-sanitizer |
SanitizeHtmlPropertyCallback | AttributeCallbackMap | In package roosterjs-html-sanitizer |
StyleMap | StringMap | In package roosterjs-html-sanitizer |
markSelection | N/A | Editor.getContent(false, true) can mark selection in a different way |
removeParker | N/A | Editor.setContent() respects the new marked selection |
NodeBlockElement.getTextContent | N/A | |
NodeBlockElement.getContentNodes | [NodeBlockElement.getStartNode()] | |
NodeBlockElement.getFirstInlineElement | getFirstInlineElement(NodeBlockElement.getStartNode()) | |
NodeBlockElement.getLastInlineElement | getLastInlineElement(NodeBlockElement.getEndNode()) | |
NodeBlockElement.getInlineElements | N/A | |
NodeBlockElement.isInBlock | NodeBlockElement.contains(inlineElement.getContainerNode()) | |
StartEndBlockElement.getTextContent | N/A | |
StartEndBlockElement.getContentNodes | N/A | Use StartEndBlockElement().collapseToSingleElement() to collapse to a single node |
StartEndBlockElement.getFirstInlineElement | getFirstInlineElement(StartEndBlockElement.getStartNode()) | |
StartEndBlockElement.getLastInlineElement | getLastInlineElement(StartEndBlockElement.getEndNode()) | |
StartEndBlockElement.getInlineElements | N/A | |
StartEndBlockElement.isInBlock | StartEndBlockElement.contains(inlineElement.getContainerNode()) | |
NodeInlineElement.getStartPoint | NodeInlineElement.getStartPosition() | |
NodeInlineElement.getEndPoint | NodeInlineElement.getEndPosition() | |
PartialInlineElement.getStartPoint | PartialInlineElement.getStartPosition() | |
PartialInlineElement.getEndPoint | PartialInlineElement.getEndPosition() |
Name | Replacement | Comment |
---|---|---|
browserData | Browser | In package roosterjs-editor-dom |
BrowserData | BrowserInfo | In package roosterjs-editor-types |
buildSnapshot | N/A | Editor.getContent(false, true) can mark selection in a different way |
restoreSnapshot | N/A | Editor.setContent() respects the new marked selection |
Editor.runWithSelectionMarker | N/A | |
Editor.queryContent | Editor.queryElements() | |
Editor.updateSelection | Editor.select() | |
Editor.runWithoutAddingUndoSnapshot | Editor.addUndoSnapshot() | |
Editor.getContentTraverser() | ContentScope.Body: Editor.getBodyTraverser(); ContentScope.Block: Editor.getBlockTraverser(); ContentScope.Selection: Editor.getSelectionTraverser() | |
EditorPlugin.name | EditorPlugin.getName() |
Name | Replacement | Comment |
---|---|---|
cacheGetListState | cacheGetElementAtCursor(editor, event, 'OL,UL') | Will return the list element instead of a ListState |
execFormatWithUndo | Editor.addUndoSnapshot() | In package roosterjs-editor-dom |
Formatter | N/A | |
CursorData | PositionContentSearcher | In package roosterjs-editor-dom |
CursorData.wordBeforeCursor | PositionContentSearcher.getWordBefore() | In package roosterjs-editor-dom |
CursorData.inlineElementBeforeCursor | PositionContentSearcher.getInlineElementBefore() | In package roosterjs-editor-dom |
CursorData.inlineElementAfterCursor | PositionContentSearcher.getInlineElementAfter() | In package roosterjs-editor-dom |
CursorData.getXCharsBeforeCursor | PositionContentSearcher.getSubStringBefore() | In package roosterjs-editor-dom |
CursorData.getTextSectionBeforeCursorTill | PositionContentSearcher.forEachTextInlineElement() | In package roosterjs-editor-dom |
CursorData.getFirstNonTextInlineBeforeCursor | PositionContentSearcher.getNearestNonTextInlineElement() | In package roosterjs-editor-dom |
cacheGetCursorEventData | cacheGetContentSearcher() | In package roosterjs-editor-core |
clearCursorEventDataCache | clearContentSearcherCache() | In package roosterjs-editor-core |
queryNodesWithSelection | nodeContainedByRangeOnly=true: Editor.queryElements(selector, QueryScope.InSelection, callback); nodeContainedByRangeOnly=false: Editor.queryElements(selector, QueryScope.OnSelection, callback) | In package roosterjs-editor-core |
replaceTextBeforeCursorWithNode | let searcher = Editor.getContentSearcherOfPosition(); let range = searcher.getRangeFromText(text, exactMatch); replaceWithNode(editor, range, node, exactMatch); | |
validateAndGetRangeForTextBeforeCursor | let searcher = Editor.getContentSearcherOfPosition(); let range = searcher.getRangeFromText(text, exactMatch); | |
replaceRangeWithNode | replaceWithNode() | |
getNodeAtCursor | Editor.getElementAtCursor() | In package roosterjs-editor-core |
cacheGetListElement | cacheGetElementAtCursor(editor, event, 'OL,UL') | |
cacheGetNodeAtCursor | cacheGetElementAtCursor() |
Name | Replacement | Comment |
---|---|---|
DefaultShortcut | N/A | All functionalities are integrated into ContentEdit plugin |
TableResize(isRtl) | TableResize() | The isRtl parameter is not used any more |
Name | Replacement | Comment |
---|---|---|
ImageResizePlugin | ImageResize |