Skip to content

Releases: microsoft/roosterjs

RoosterJs 9.16.0

18 Dec 19:18
3f4eb99
Compare
Choose a tag to compare

What's Changed

Full Changelog: v9.15.0...v9.16.0

RoosterJs 9.15.0

03 Dec 17:32
6044f40
Compare
Choose a tag to compare

What's Changed

Full Changelog: v9.13.0...v9.15.0

RoosterJs 9.13.0

01 Nov 18:39
a0a8ec3
Compare
Choose a tag to compare

What's Changed

Full Changelog: v9.11.0...v9.13.0

RoosterJs 9.11.0

04 Oct 20:28
d2ce6eb
Compare
Choose a tag to compare

What's Changed

Full Changelog: v9.10.0...v9.11.0

RoosterJs 9.10.0

06 Sep 16:04
5a9c925
Compare
Choose a tag to compare

What's Changed

Full Changelog: v9.7.0...v9.10.0

RoosterJs 9.7.0

01 Jul 18:30
288231d
Compare
Choose a tag to compare

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

Full Changelog: v9.6.0...v9.7.0

RoosterJs 9.6.0

14 Jun 18:54
739441d
Compare
Choose a tag to compare

What's Changed

RoosterJs 9.5.0

10 Jun 18:34
a681123
Compare
Choose a tag to compare

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

  • Fix test issue in TableEditPlugin (#2675)
  • Add readme file for roosterjs-editor-adapter package (#2674)
  • Delete legacy packages (#2660)

RoosterJs 9.4.0

28 May 19:32
10c1d9d
Compare
Choose a tag to compare

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

10 May 18:58
1822d18
Compare
Choose a tag to compare

New features

  • Move table (#2624, #2599)
  • Allow customization when convert from content model to plain text (#2605)

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)