UNPKG

@atlaskit/editor-plugin-synced-block

Version:

SyncedBlock plugin for @atlaskit/editor-core

17 lines 842 B
import React from 'react'; import { useHandleContentChanges } from '@atlaskit/editor-synced-block-provider'; import { SyncBlockLabel } from './SyncBlockLabel'; // Delete this file when cleaning up platform_synced_block_use_new_source_nodeview export var BodiedSyncBlockWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) { var node = _ref.node, syncBlockStore = _ref.syncBlockStore; // TODO: EDITOR-2429 - this should be debounced (either here or in the data provider) to avoid excessive API writes useHandleContentChanges(syncBlockStore, node); return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", { "data-testid": "bodied-sync-block-wrapper", ref: ref }), /*#__PURE__*/React.createElement(SyncBlockLabel, { isSource: true, localId: node.attrs.localId })); });