forked from microsoft/roosterjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Perf step 0: Do not allow getting connected model (microsoft#2615)
* Perf: Do not allow getting connected model * fix build * fix build
- Loading branch information
1 parent
9b86a06
commit ea719e1
Showing
12 changed files
with
91 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 13 additions & 10 deletions
23
demo/scripts/controlsV2/sidePane/contentModel/buttons/refreshButton.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { ContentModelPanePlugin } from '../ContentModelPanePlugin'; | ||
import { RibbonButton } from '../../../roosterjsReact/ribbon'; | ||
|
||
export const refreshButton: RibbonButton<'buttonNameRefresh'> = { | ||
key: 'buttonNameRefresh', | ||
unlocalizedText: 'Refresh', | ||
iconName: 'Refresh', | ||
onClick: editor => { | ||
editor.triggerEvent('contentChanged', { | ||
source: 'RefreshModel', | ||
}); | ||
}, | ||
}; | ||
export function getRefreshButton( | ||
plugin: ContentModelPanePlugin | ||
): RibbonButton<'buttonNameRefresh'> { | ||
return { | ||
key: 'buttonNameRefresh', | ||
unlocalizedText: 'Refresh', | ||
iconName: 'Refresh', | ||
onClick: () => { | ||
plugin.onModelChange(true /*force*/); | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.