@atlaskit/editor-plugin-engagement-platform
Version:
Engagement platform plugin for @atlaskit/editor-core“
28 lines • 940 B
JavaScript
import { startMessage } from './editor-actions/startMessage';
import { stopMessage } from './editor-actions/stopMessage';
import { engagementPlatformPmPlugin } from './pm-plugins/engagementPlatformPmPlugin/engagementPlatformPmPlugin';
import { engagementPlatformPmPluginKey } from './pm-plugins/engagementPlatformPmPlugin/engagementPlatformPmPluginKey';
export const engagementPlatformPlugin = ({
config,
api
}) => {
return {
name: 'engagementPlatform',
actions: {
startMessage: startMessage(api, config.coordinationClient),
stopMessage: stopMessage(api, config.coordinationClient)
},
pmPlugins() {
return [{
name: 'engagementPlatformPmPlugin',
plugin: () => engagementPlatformPmPlugin(config)
}];
},
getSharedState(editorState) {
if (!editorState) {
return undefined;
}
return engagementPlatformPmPluginKey.getState(editorState);
}
};
};