v0.35.0
v0.35.0 is a monthly release with much improved RTL bidirectional text support (#7727) and several bug fixes
Breaking Changes
All of the breaking changes in this release are related to the improved RTL bidirectional text support in #7727
ltr and rtl theme CSS classes removed
ltr and rtl theme CSS classes are no longer added to DOM elements. If you have custom CSS to set text-align (or any other properties) for bidirectional text, this can be removed. You can target elements that have customized their dir by targeting the attr in CSS, for example:
[dir=rtl] { text-align: right; }
$isParentElementRTL requires an active editor
$isParentElementRTL now relies on accessing the DOM to determine element direction, meaning there must be an active editor when calling the function. If you have code that calls $isParentElementRTL inside editorState.read(), you will need to pass in an editor argument. For example:
const isRTL = editorState.read(
() => {
const selection = $getSelection();
return $isRangeSelection(selection) && $isParentElementRTL(selection);
},
{editor}
);