Releases: microsoft/roosterjs
RoosterJs 9.10.0
What's Changed
- Export DefaultSanitizers to be available in roosterjs-content-model-plugins package by @vhuseinova-msft in #2739
- Fix #2741 by changing Id selectors from
#{id}
to[id="{id}"]
by @BryanValverdeU in #2742 - Fix #2734 by Setting List Metadata
applyListStyleFromLevel: true
when toggling a list by @BryanValverdeU in #2743 - Fix crop after selection by @juliaroldi in #2744
- Fix #2733 by changing the approach to announce repeated announce messages by @BryanValverdeU in #2745
- Bump Rooster main to 9.8.0 by @ianeli1 in #2746
- Create getSafeIdSelector and replace all Id selectors with it. by @BryanValverdeU in #2747
- Add AriaLiveMode to announce to let consumers change the ariaLive attribute of the announce container. by @BryanValverdeU in #2749
- Add LegacyImageSelection by @juliaroldi in #2748
- Rooster Patch 9.8.1 by @juliaroldi in #2750
- Add PasteTypeOrGetter so we can update the default paste type based on the content and clipboard items of the Paste Event by @BryanValverdeU in #2753
- Bump RoosterJS to 9.9.0 by @BryanValverdeU in #2756
- Fix ordinal trigger by @juliaroldi in #2759
- Fix default format on Android by @Rain-Zheng in #2762
- Do not trigger markdown inside a word. by @juliaroldi in #2765
- Do not increase list number that starts from 1 by @JiuqingSong in #2766
- Handle Up and Down in Table by @BryanValverdeU in #2767
- Bump RoosterJS 9.9.1 by @juliaroldi in #2769
- Bump Rooster to patch (#2784) by @BryanValverdeU in #2785
- RoosterJs 9.10.0 by @JiuqingSong in #2786
- Really do version bump to 9.10.0 by @JiuqingSong in #2789
Full Changelog: v9.7.0...v9.10.0
RoosterJs 9.7.0
Feature Improvements
- To make possible to disable the Tab Key handling, the option
handleTabKey
was added in the EditPlugin to turn off the plugin handling. (#2730 #2729)
What's Changed
- Support dark mode for WatermarkPlugin placeholder styles by @vhuseinova-msft in #2702
- Fixed WatermarkPlugin test build failure by @vhuseinova-msft in #2704
- Fix auto link event in create link by @juliaroldi in #2701
- Bump editor-adapter to 8.62.1 by @JiuqingSong in #2707
- Fix unstable test in tableMoverTest by @JiuqingSong in #2708
- Temporarily disable unstable test cases by @JiuqingSong in #2710
- Improve getDOMInsertPointRect by @JiuqingSong in #2705
- Bump ws from 6.2.1 to 6.2.3 by @dependabot in #2712
- Improve cache by @JiuqingSong in #2706
- Bump socket.io from 4.4.1 to 4.7.5 by @dependabot in #2715
- Remove span from image by @juliaroldi in #2716
- Add config for plugin by @juliaroldi in #2717
- Using Tab key on table selects the whole next cell by @Andres-CT98 in #2718
- Edit Image with image selection by @juliaroldi in #2713
- Remove plugin configuration by @juliaroldi in #2723
- Ensure focusNode exists when selectionChanges by @juliaroldi in #2724
- Only dismiss the Table Mover if the end of the drag is not in the Table Mover div by @BryanValverdeU in #2727
- Add option for Tab Key handling in EditPlugin by @Rain-Zheng in #2729
- Fix context menu for Image Edit menu by @juliaroldi in #2726
- Expose splittext api by @FrancisMengx in #2728
- Add Handle Tab Key setting to demo site by @BryanValverdeU in #2730
Full Changelog: v9.6.0...v9.7.0
RoosterJs 9.6.0
What's Changed
- Word "constructor" should not trigger auto list by @JiuqingSong in #2690
- Add back roosterjs-react by @JiuqingSong in #2689
- Do not merge Hyperlink text color by @BryanValverdeU in #2692
- Content Model cache improvement: Let Content model update cache for child list change by @JiuqingSong in #2613
- Patch Do not merge Hyperlink text color #2692 by @BryanValverdeU in #2693
- Fix insert entity issue by @JiuqingSong in #2694
- Bump RoosterJS Content-model to v9.6 by @juliaroldi in #2698
- Bump roosterjs-content-model-plugins to 9.6.1 to integrate #2702 by @JiuqingSong in #2703
RoosterJs 9.5.0
Breaking change notification
When upgrade to 9.5.0, you may see build time failure that complains some object is readonly. This is expected.
From 9.5.0, the API formatContentModel
will give you a readonly content model. To modify it, you need to call mutateBlock
to the blocks that you want to modify. For example:
const block = model.blocks[0]; // Assume we have a block here
block.format.direction = 'ltr'; // Error: Cannot modify readonly properties
const mutableBlock = mutateBlock(block);
mutableBlock.format.direction = 'ltr'; // OK
Similary, if you want to modify a segment under a block, you can do any of below:
function test1(para: ReadonlyContentModelParagraph) {
para.segments[0].format.fontSize = '10pt'; // Error, segments[0] is readonly
const mutableBlock = mutateBlock(para); // Once convert to mutable object, all its segments are also mutable now
mutableBlock.segments[0].format.fontSize = '10pt'; // OK
}
function test2(para: ReadonlyContentModelParagraph, segment: ReadonlyContentModelSegment) {
mutateSegment(para, segment, (mutablePara, mutableSegment) => {
mutableSegment.format.fontSize = '10pt'; // OK
}
}
With API mutateSegment
, it allows you convert a segment to be mutable without re-retrieving it from the paragraph.
Note that this API only work when thet given segment is actually a direct child of the given paragraph, otherwise
the callback will not be called.
There are some other functions that can also convert result to be mutable by adding a parameter, for example
const segments = getSelectedSegments(model, false /*includingFormatHolder*/, true /*mutate*/);
The 3rd parameter "true" makes the return value mutable. This parameter is also supported by the following functions:
- getSelectedSegmentsAndParagraphs
- getSelectedSegments
- getSelectedParagraphs
Please note that when convert a block to be mutable, it will lose its cached DOM element. So next time when rewrite to DOM tree,
it will need to be regenerated. So to improve performance (this need to turn on an experimental feature "PersistCache" for now),
try not convert object to be mutable until you really need to.
To enable the experimental feature to improve cache, do
const editor = new Editor(div, {
...
experimentalFeatures: ['PersistCache']
});
Bug fix
- Fix cut table issue (#2659)
- Fix paste narrow content issue (#2661)
- Fix scroll issue when press SHIFT+TAB in table (#2654)
- Table edit back fixes (#2664, #2678)
- Fix auto format trigger event (#2684)
Improvement
- Readonly types improvement (#2649, #2650, #2651)
- Fix line height issue when paste from Word (#2677)
- Port ImageEdit plugin (#2670, #2561)
- Merge Link & Image Format when using MergeModel (#2681)
- Provide our own implementation of
scrollCaretIntoView
(#2685) - Let Content Model handle ENTER key (#2610)
- Allow customization of color key generation (#2682)
- Skip same format from LI (#2683)
Engineering improvement
RoosterJs 9.4.0
Bug fix
- Do not apply Table selection if table is not editable (#2628)
- Fix #2633
scrollCaretIntoView
causes unexpected scroll (#2634) - Fix cursor jump issue when applying Gboard suggestions (#2638)
- Auto link for link preview (#2653)
- Fix Table first column (#2652)
Improvement
- Added tableCellSelectionBackgroundColor option (#2640)
- Add dark color handling for table and image selection (#2647)
- Content Model cache improvement (#2629, #2641, #2642, #2643, #2648)
- Optimise content model table fetching for Table Edit Plugins (#2656)
- Fix normalisation and First Column issues (#2657)
RoosterJs 9.3.0
New features
Improvement
- ImageEdit: keep wrapper SPAN for image selection (#2609)
- Updated watermark property access modifier to protected (#2614)
- Move Content Model type files into contentModel folder (#2602)
- Add undo snapshot when mouse down if there is new content after last undo snapshot (#2604)
- Scroll caret into view when call formatContentModel (#2617)
- Do not allow getting connected model (#2615)
- Updated isModelEmptyFast to consider changed indentation as not empty string (#2625)
Bug fix
- Hide watermark when input with IME (#2611)
- Fix the link hint still exists after deleting the picture with the link (#2600)
Engineering improvement
- Allow debug test cases in Firefox (#2620)
RoosterJs 9.2.0
Bug fix
- Fix the cursor jump issue after deleting an Entity on Android (#2577)
- Fix on webkit-based applications, the selection will become empty after copy, and focus will cause the window to scroll to the top (#2571)
- Preserve reverted selection info in Content Model (#2580)
- Fix empty text in markdown plugin (#2582)
- Allow Shift+Delete to Cut (#2585)
- Fix #2584: Safari context menu event causes selection to be expanded (#2584)
- Fix #2575 Entity delimiter cursor moving (#2581)
Improvement
- Port PickerPlugin to new editor (#2569)
- Port AnnouncePlugin step 1 (#2589, #2591, #2592)
- Port Custom Replace Plugin (#2594)
- Port Auto fraction and ordinals (#2595)
- Use percentage for max-width of newly inserted image (#2579)
- Improve AutoFormatPlugin (#2583)
- Trigger AutoLink (#2598)
- Select image after inserting it (#2593)
- Allow hotkey Ctrl-Shift-Z on Windows (#2607)
New feature
RoosterJs 9.1.0
Improvement
- Port MarkDown plugin (#2527, #2563)
- Port TAB key feature for table (#2536, #2529)
- Improve backspace on list (#2555)
- Image selection improvement (#2556, #2557, #2554)
- Port Hyperlink plugin (#2560)
- Export formatTextSegmentBeforeSelectionMarker (#2565)
Bug fix
- Fix bug in AutoFormatPlugin about auto list (#2549)
- Fix selection issue on void element (#2551)
- Prevent ScrollTop to be lost when the focus is done to the editor (#2564)
- Fix extra empty line generated when get plain text (#2566)
- Fix #2500 Hyperlink misses color (#2570)
Engineering improvement
RoosterJs 9.0.0
Start from RoosterJs 9.0.0, the editor is built based on a middle layer called "Content Model". All formatting behavior will happen on top of this middle layer, directly DOM operation will be avoided as much as possible.
For more information about migrating to 9.0.0, please see here
Content Model Editor improvement
- Enabled Content Model cache by default (#2498)
- Port plugin: WatermarkPlugin (#2503, #2546)
- Port plugin: TableCellSelection (#2506)
- Port plugin: ContentEdit
- fix convertGlobalCssToInlineCss() to process pseudo-classes correctly (#2493)
- Add setLogicalRoot API (#2492)
- Fix paste issue for repaste (#2516)
- Fix bug for auto complete (#2517, #2520)
- Remove a redundant parameter from domToContentModel (#2521)
- Do not update the segment format if it have a value when pasting from excel (#2532)
- Fix format button does not work in Safari when WatermarkPlugin is enabled (#2530)
- Fix exportContent to return the complete editor content even with custom logical root (#2531)
- Allow passing in sanitizing options when create Content Model from HTML (#2543)
- Leverage DOMInsertPoint, remove posContainer/offset (#2538)
- Allow insert entity to a specified position without changing selection (#2537)
- Remove parameter "reduced" from editor.getContentModelCopy (#2539)
- Set isSelected to false for formatHolder of list item (#2540)
- Fix a bug with cached model (#2547)
Code organization
- Move public type definitions into roosterjs-content-model-type package (#2502)
- Reorganize core API and core Plugin files (#2501)
- Move non-core files from
roosterjs-content-model-core
toroosterjs-content-model-dom
(#2518)
Roosterjs-react improvement
- Added iconProp for ContextMenuItem (#2526)
Engineering improvement
- Import model document into demo site (#2509)
- Add tabs to demo site and PresetPlugin (#2511)
- Add eslint rule to disallow default export (#2515)
- Prepare publish roosterjs v9 (#2490)
- Fix builddoc script to correctly build document for content model (#2544)
- Fix demo site js error in side pane (#2545)
- Auto bump
RoosterJs Content Model 0.28.0 and RoosterJs 8.61.0
Create a standalone editor on top of Content Model
- Reorganize source code (#2464)
- Add quote feature to Content Model editor (#2461)
- Add shortcut for arrow keys (#2470)
- Add function normalizeRect(#2482)
- Add AutoLink feature (#2479, #2485)
- Clean up core API (#2481)
Improvements
- Support "("+trigger character in PickerPlugin (#2478)
- Merge BlockFormat when merging the first paragraph (#2477)
- Remove LinkHeight limitation when pasting from Word (#2483)
- Respect "shouldPersist" from EntityOperationEvent
- Export content without selection (#2491)
- Fix TableEditPlugin anchorContainerSelector query (#2499)
- Add check for selected segments and paragraphs (#2476)
- Watermark plugin allows update watermark text (#2507)