Skip to content

Commit 4acd03c

Browse files
authored
Merge pull request #1712 from microsoft/u/juliaroldi/bump-version-8.45.0
U/juliaroldi/bump version 8.45.0
2 parents 5b62515 + ae69ff5 commit 4acd03c

193 files changed

Lines changed: 10675 additions & 2892 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

demo/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
</head>
1919
<body>
2020
<div id="mainPane"></div>
21-
<script src="https://unpkg.com/react@16.14.0/umd/react.production.min.js"></script>
22-
<script src="https://unpkg.com/react-dom@16.14.0/umd/react-dom.production.min.js"></script>
21+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.14.0/umd/react.production.min.js"></script>
22+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.14.0/umd/react-dom.production.min.js"></script>
2323
<script src="https://cdnjs.cloudflare.com/ajax/libs/fluentui-react/8.60.1/fluentui-react.min.js"></script>
2424
<script src="rooster-min.js"></script>
2525
<script src="rooster-react-min.js"></script>

demo/scripts/controls/BuildInPluginState.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export interface BuildInPluginList {
2222
tableEditMenu: boolean;
2323
contextMenu: boolean;
2424
autoFormat: boolean;
25+
contentModelFormat: boolean;
26+
contentModelEdit: boolean;
2527
}
2628

2729
export default interface BuildInPluginState {

demo/scripts/controls/MainPane.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import SidePane from './sidePane/SidePane';
1414
import SnapshotPlugin from './sidePane/snapshot/SnapshotPlugin';
1515
import TitleBar from './titleBar/TitleBar';
1616
import { arrayPush } from 'roosterjs-editor-dom';
17-
import { ContentModelEditor, ContentModelPlugin } from 'roosterjs-content-model';
17+
import { ContentModelEditor } from 'roosterjs-content-model';
1818
import { ContentModelRibbonPlugin } from './ribbonButtons/contentModel/ContentModelRibbonPlugin';
1919
import { darkMode, DarkModeButtonStringKey } from './ribbonButtons/darkMode';
2020
import { EditorOptions, EditorPlugin } from 'roosterjs-editor-types';
@@ -127,7 +127,6 @@ class MainPane extends MainPaneBase {
127127
private emojiPlugin: EditorPlugin;
128128
private updateContentPlugin: UpdateContentPlugin;
129129
private toggleablePlugins: EditorPlugin[] | null = null;
130-
private contentModelPlugin: ContentModelPlugin;
131130
private formatPainterPlugin: FormatPainterPlugin;
132131
private mainWindowButtons: RibbonButton<RibbonStringKeys>[];
133132
private popoutWindowButtons: RibbonButton<RibbonStringKeys>[];
@@ -150,7 +149,6 @@ class MainPane extends MainPaneBase {
150149
this.pasteOptionPlugin = createPasteOptionPlugin();
151150
this.emojiPlugin = createEmojiPlugin();
152151
this.updateContentPlugin = createUpdateContentPlugin(UpdateMode.OnDispose, this.onUpdate);
153-
this.contentModelPlugin = new ContentModelPlugin();
154152
this.formatPainterPlugin = new FormatPainterPlugin();
155153
this.mainWindowButtons = getButtons([
156154
...AllButtonKeys,
@@ -438,7 +436,6 @@ class MainPane extends MainPaneBase {
438436
this.ContentModelPanePlugin.getInnerRibbonPlugin(),
439437
this.pasteOptionPlugin,
440438
this.emojiPlugin,
441-
this.contentModelPlugin,
442439
this.formatPainterPlugin,
443440
];
444441

demo/scripts/controls/contentModel/components/model/ContentModelBlockGroupView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as React from 'react';
22
import { ContentModelBlockGroup } from 'roosterjs-content-model';
33
import { ContentModelDocumentView } from './ContentModelDocumentView';
4+
import { ContentModelFormatContainerView } from './ContentModelFormatContainerView';
45
import { ContentModelGeneralView } from './ContentModelGeneralView';
56
import { ContentModelListItemView } from './ContentModelListItemView';
6-
import { ContentModelQuoteView } from './ContentModelQuoteView';
77
import { ContentModelTableCellView } from './ContentModelTableCellView';
88

99
export function ContentModelBlockGroupView(props: { group: ContentModelBlockGroup }) {
@@ -19,8 +19,8 @@ export function ContentModelBlockGroupView(props: { group: ContentModelBlockGrou
1919
case 'ListItem':
2020
return <ContentModelListItemView listItem={group} />;
2121

22-
case 'Quote':
23-
return <ContentModelQuoteView quote={group} />;
22+
case 'FormatContainer':
23+
return <ContentModelFormatContainerView container={group} />;
2424

2525
case 'TableCell':
2626
return <ContentModelTableCellView cell={group} />;

demo/scripts/controls/contentModel/components/model/ContentModelQuoteView.scss renamed to demo/scripts/controls/contentModel/components/model/ContentModelFormatContainerView.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.modelQuote {
1+
.modelFormatContainer {
22
background-color: #a8a;
33
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import * as React from 'react';
2+
import { BlockFormatView } from '../format/BlockFormatView';
3+
import { BlockGroupContentView } from './BlockGroupContentView';
4+
import { ContentModelFormatContainer, hasSelectionInBlock } from 'roosterjs-content-model';
5+
import { ContentModelView } from '../ContentModelView';
6+
import { SegmentFormatView } from '../format/SegmentFormatView';
7+
8+
const styles = require('./ContentModelFormatContainerView.scss');
9+
10+
export function ContentModelFormatContainerView(props: { container: ContentModelFormatContainer }) {
11+
const { container } = props;
12+
const getContent = React.useCallback(() => {
13+
return <BlockGroupContentView group={container} />;
14+
}, [container]);
15+
16+
const getFormat = React.useCallback(() => {
17+
return (
18+
<>
19+
<BlockFormatView format={container.format} />
20+
<SegmentFormatView format={container.format} />
21+
</>
22+
);
23+
}, [container]);
24+
25+
return (
26+
<ContentModelView
27+
title="FormatContainer"
28+
subTitle={container.tagName}
29+
className={styles.modelFormatContainer}
30+
hasSelection={hasSelectionInBlock(container)}
31+
jsonSource={container}
32+
getContent={getContent}
33+
getFormat={getFormat}
34+
/>
35+
);
36+
}

demo/scripts/controls/contentModel/components/model/ContentModelQuoteView.tsx

Lines changed: 0 additions & 60 deletions
This file was deleted.

demo/scripts/controls/getToggleablePlugins.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import BuildInPluginState, { BuildInPluginList, UrlPlaceholder } from './BuildInPluginState';
22
import { AutoFormat } from 'roosterjs-editor-plugins/lib/AutoFormat';
33
import { ContentEdit } from 'roosterjs-editor-plugins/lib/ContentEdit';
4+
import { ContentModelEditPlugin, ContentModelFormatPlugin } from 'roosterjs-content-model';
45
import { CustomReplace as CustomReplacePlugin } from 'roosterjs-editor-plugins/lib/CustomReplace';
56
import { CutPasteListChain } from 'roosterjs-editor-plugins/lib/CutPasteListChain';
67
import { EditorPlugin } from 'roosterjs-editor-types';
@@ -55,6 +56,8 @@ export default function getToggleablePlugins(initState: BuildInPluginState) {
5556
? createTableEditMenuProvider()
5657
: null,
5758
contextMenu: pluginList.contextMenu ? createContextMenuPlugin() : null,
59+
contentModelFormat: pluginList.contentModelFormat ? new ContentModelFormatPlugin() : null,
60+
contentModelEdit: pluginList.contentModelEdit ? new ContentModelEditPlugin() : null,
5861
};
5962

6063
return Object.values(plugins);

demo/scripts/controls/ribbonButtons/contentModel/setTableCellShadeButton.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const setTableCellShadeButton: RibbonButton<
1717
> = {
1818
dropDownMenu: {
1919
...originalBackgroundColorButton.dropDownMenu,
20-
allowLivePreview: false,
20+
allowLivePreview: true,
2121
},
2222
key: 'ribbonButtonSetTableCellShade',
2323
unlocalizedText: 'Set table shade color',

demo/scripts/controls/sidePane/editorOptions/ContentEditFeatures.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ const EditFeatureDescriptionMap: Record<keyof ContentEditFeatureSettings, string
5353
'Content edit feature to move the cursor from Delimiters around Entities when using Right or Left Arrow Keys',
5454
removeEntityBetweenDelimiters:
5555
'When using BACKSPACE or DELETE in a Readonly inline entity delimeter, trigger a Entity Operation',
56+
removeCodeWhenEnterOnEmptyLine: 'Remove code line when enter on empty line',
57+
removeCodeWhenBackspaceOnEmptyFirstLine: 'Remove code line when backspace on empty first line',
58+
indentWhenAltShiftRight: 'Indent list item using Alt + Shift + Right',
59+
outdentWhenAltShiftLeft: 'Outdent list item using Alt + Shift + Left',
5660
};
5761

5862
export interface ContentEditFeaturessProps {

0 commit comments

Comments
 (0)