@atlaskit/editor-plugin-engagement-platform
Version:
Engagement platform plugin for @atlaskit/editor-core“
29 lines • 1.09 kB
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 var engagementPlatformPlugin = function engagementPlatformPlugin(_ref) {
var config = _ref.config,
api = _ref.api;
return {
name: 'engagementPlatform',
actions: {
startMessage: startMessage(api, config.coordinationClient),
stopMessage: stopMessage(api, config.coordinationClient)
},
pmPlugins: function pmPlugins() {
return [{
name: 'engagementPlatformPmPlugin',
plugin: function plugin() {
return engagementPlatformPmPlugin(config);
}
}];
},
getSharedState: function getSharedState(editorState) {
if (!editorState) {
return undefined;
}
return engagementPlatformPmPluginKey.getState(editorState);
}
};
};