UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

9 lines 758 B
// Primary toolbar doesn't actually use plugin state so the state selector doesn't update as intended // We need a proper API to deal with non-prosemirror based state in plugins but until then we can retrieve // the latest export var getPrimaryToolbarComponents = function getPrimaryToolbarComponents(editorAPI, components) { var _editorAPI$primaryToo; return { components: components !== null && components !== void 0 ? components : editorAPI === null || editorAPI === void 0 || (_editorAPI$primaryToo = editorAPI.primaryToolbar) === null || _editorAPI$primaryToo === void 0 || (_editorAPI$primaryToo = _editorAPI$primaryToo.sharedState.currentState()) === null || _editorAPI$primaryToo === void 0 ? void 0 : _editorAPI$primaryToo.components }; };