Releases: microsoft/roosterjs
RoosterJs 9.13.0
What's Changed
- Add a ID to the TempDiv, to be able to identify on blur was caused for copy/cut by @BryanValverdeU in #2813
- Clean info when delete image by @juliaroldi in #2817
- Remove style "white-space" from empty paragraph by @JiuqingSong in #2820
- Fix #2804 adjustLinkSelection does not select whole link by @JiuqingSong in #2821
- Fix image selection in range expanded selection by @juliaroldi in #2818
- Do not treat image without src as empty image by @JiuqingSong in #2823
- Patch #2823: Do not treat image without src as empty segment by @JiuqingSong in #2824
- [Mobile/Tablet] Make image edit features work with touch by @juliaroldi in #2822
- Bump Core, Plugins and Dom packages to 9.11.2 by @BryanValverdeU in #2826
- Auto format list on TAB by @juliaroldi in #2827
- Trigger ordinals after link by @juliaroldi in #2828
- Fix #2835 Ignore HTML align when there is CSS text-align by @JiuqingSong in #2836
- Fix #2832 Support auto link when press Enter by @JiuqingSong in #2837
- Fix #2825: Keep B/I/U style when delete expanded selection by @JiuqingSong in #2839
- Do not handle ENTER key when CTRL is pressed by @JiuqingSong in #2842
- Fix ZoomScaleChangedEvent no longer being triggered in EditorAdapter by @BryanValverdeU in #2843
- Add
preferSource
andpreferTarget
merge options to mergeModel API. by @BryanValverdeU in #2844 - Version bump to main 9.12.0 and legacyAdapter 8.62.2 by @vinguyen12 in #2847
- Bump version to 9.13.0 by @JiuqingSong in #2856
Full Changelog: v9.11.0...v9.13.0
RoosterJs 9.11.0
What's Changed
- Fix Image range selection by @juliaroldi in #2768
- Add
<del>
elements to default processors and use knownElementProcessor for this type of element. by @BryanValverdeU in #2770 - Fix drag and drop by @juliaroldi in #2772
- Dont remove the MarginTop/Bottom from lists when pasting from Word Online by @BryanValverdeU in #2778
- Reconcile table and image selection for cache by @JiuqingSong in #2714
- Set segmentFormat text color to black when creating the model of the clipboard content and using Keep source formatting paste type by @BryanValverdeU in #2773
- Bump webpack from 5.84.1 to 5.94.0 by @dependabot in #2780
- Fix image selection in tables by @juliaroldi in #2781
- Resolve null sheet in convertInlineCss by @BryanValverdeU in #2784
- Update paste code to add a paragraph when the clipboard contains atleast a block element by @BryanValverdeU in #2777
- Fix 300391: [Mail] The numbers will become a continuous sequence afte… by @JiuqingSong in #2782
- Pressing Tab inside a table should select all node contents of the next cell by @Andres-CT98 in #2764
- fix list by @juliaroldi in #2791
- Fix findEditingImage by @juliaroldi in #2794
- Bump RoosterJs Plugins to 9.10.1 by @juliaroldi in #2796
- Do not remove image selection when copy by @juliaroldi in #2792
- Fix #2755 After modifying the list type and the indentation, the list types within the same list may be inconsistent. by @JiuqingSong in #2795
- Use a different change source for keyboard formatting event by @JiuqingSong in #2799
- Bump dompurify from 2.3.0 to 2.5.4 by @dependabot in #2800
- Bump express from 4.19.2 to 4.21.0 by @dependabot in #2801
- Fix #2699 If there is a list in a quote, clearFormat can't clear the quote by @JiuqingSong in #2797
- Bump body-parser from 1.20.1 to 1.20.3 by @dependabot in #2802
- Auto link enhancements by @juliaroldi in #2798
- Let DOM Helper return a cloned root by @JiuqingSong in #2805
- Fix mergeTable when pasting by @BryanValverdeU in #2810
- Fix #2807 Handle selection in BR by @JiuqingSong in #2809
- Use a separate experimental feature for Enter key by @JiuqingSong in #2811
- [Image Edit] When the image is in edit mode, hide the text caret by @juliaroldi in #2815
- Make the imageEditInfo protected by @juliaroldi in #2812
- Bump packages to
9.11.0
by @BryanValverdeU in #2814 - Patch and bump RoosterJS core package to
9.11.1
by @BryanValverdeU in #2816 - Patch fix RoosterJS Plugins package by @juliaroldi in #2819
Full Changelog: v9.10.0...v9.11.0
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)