Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions demo/scripts/controls/ContentModelEditorMainPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import * as React from 'react';
import * as ReactDOM from 'react-dom';
import ApiPlaygroundPlugin from './sidePane/apiPlayground/ApiPlaygroundPlugin';
import ContentModelEditorOptionsPlugin from './sidePane/editorOptions/ContentModelEditorOptionsPlugin';
import ContentModelFormatPainterPlugin from './contentModel/plugins/ContentModelFormatPainterPlugin';
import ContentModelFormatStatePlugin from './sidePane/formatState/ContentModelFormatStatePlugin';
import ContentModelPanePlugin from './sidePane/contentModel/ContentModelPanePlugin';
import ContentModelRibbon from './ribbonButtons/contentModel/ContentModelRibbon';
import EventViewPlugin from './sidePane/eventViewer/EventViewPlugin';
import FormatPainterPlugin from './contentModel/plugins/FormatPainterPlugin';
import getToggleablePlugins from './getToggleablePlugins';
import MainPaneBase from './MainPaneBase';
import SampleEntityPlugin from './sampleEntity/SampleEntityPlugin';
Expand Down Expand Up @@ -92,7 +92,7 @@ class ContentModelEditorMainPane extends MainPaneBase {
private pasteOptionPlugin: EditorPlugin;
private emojiPlugin: EditorPlugin;
private toggleablePlugins: EditorPlugin[] | null = null;
private formatPainterPlugin: FormatPainterPlugin;
private formatPainterPlugin: ContentModelFormatPainterPlugin;
private sampleEntityPlugin: SampleEntityPlugin;

constructor(props: {}) {
Expand All @@ -108,7 +108,7 @@ class ContentModelEditorMainPane extends MainPaneBase {
this.contentModelRibbonPlugin = new ContentModelRibbonPlugin();
this.pasteOptionPlugin = createPasteOptionPlugin();
this.emojiPlugin = createEmojiPlugin();
this.formatPainterPlugin = new FormatPainterPlugin();
this.formatPainterPlugin = new ContentModelFormatPainterPlugin();
this.sampleEntityPlugin = new SampleEntityPlugin();
this.state = {
showSidePane: window.location.hash != '',
Expand Down
4 changes: 0 additions & 4 deletions demo/scripts/controls/MainPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as ReactDOM from 'react-dom';
import ApiPlaygroundPlugin from './sidePane/apiPlayground/ApiPlaygroundPlugin';
import EditorOptionsPlugin from './sidePane/editorOptions/EditorOptionsPlugin';
import EventViewPlugin from './sidePane/eventViewer/EventViewPlugin';
import FormatPainterPlugin from './contentModel/plugins/FormatPainterPlugin';
import FormatStatePlugin from './sidePane/formatState/FormatStatePlugin';
import getToggleablePlugins from './getToggleablePlugins';
import MainPaneBase from './MainPaneBase';
Expand Down Expand Up @@ -102,7 +101,6 @@ class MainPane extends MainPaneBase {
private pasteOptionPlugin: EditorPlugin;
private emojiPlugin: EditorPlugin;
private toggleablePlugins: EditorPlugin[] | null = null;
private formatPainterPlugin: FormatPainterPlugin;
private sampleEntityPlugin: SampleEntityPlugin;
private mainWindowButtons: RibbonButton<RibbonStringKeys>[];
private popoutWindowButtons: RibbonButton<RibbonStringKeys>[];
Expand All @@ -118,7 +116,6 @@ class MainPane extends MainPaneBase {
this.ribbonPlugin = createRibbonPlugin();
this.pasteOptionPlugin = createPasteOptionPlugin();
this.emojiPlugin = createEmojiPlugin();
this.formatPainterPlugin = new FormatPainterPlugin();
this.sampleEntityPlugin = new SampleEntityPlugin();

this.mainWindowButtons = getButtons([
Expand Down Expand Up @@ -183,7 +180,6 @@ class MainPane extends MainPaneBase {
this.ribbonPlugin,
this.pasteOptionPlugin,
this.emojiPlugin,
this.formatPainterPlugin,
this.sampleEntityPlugin,
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface FormatPainterFormatHolder {
format: ContentModelSegmentFormat | null;
}

export default class FormatPainterPlugin implements EditorPlugin {
export default class ContentModelFormatPainterPlugin implements EditorPlugin {
private editor: IContentModelEditor | null = null;

getName() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import FormatPainterPlugin from '../../contentModel/plugins/FormatPainterPlugin';
import ContentModelFormatPainterPlugin from '../../contentModel/plugins/ContentModelFormatPainterPlugin';
import { isContentModelEditor } from 'roosterjs-content-model-editor';
import { RibbonButton } from 'roosterjs-react';

Expand All @@ -12,7 +12,7 @@ export const formatPainterButton: RibbonButton<'formatPainter'> = {
iconName: 'Brush',
onClick: editor => {
if (isContentModelEditor(editor)) {
FormatPainterPlugin.startFormatPainter(editor);
ContentModelFormatPainterPlugin.startFormatPainter(editor);
}
return true;
},
Expand Down