@atlaskit/editor-plugin-code-block-advanced
Version:
CodeBlockAdvanced plugin for @atlaskit/editor-core
35 lines • 1.54 kB
JavaScript
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
import _regeneratorRuntime from "@babel/runtime/regenerator";
import { withLazyLoading } from '@atlaskit/editor-common/lazy-node-view';
export var lazyCodeBlockView = function lazyCodeBlockView(props) {
return withLazyLoading({
nodeName: 'codeBlock',
getNodeViewOptions: function getNodeViewOptions() {},
loader: function () {
var _loader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
var _yield$import, getCodeBlockAdvancedNodeView;
return _regeneratorRuntime.wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return import( /* webpackChunkName: "@atlaskit-internal_editor-plugin-code-block-advanced-nodeview" */
'./codeBlockAdvanced');
case 2:
_yield$import = _context.sent;
getCodeBlockAdvancedNodeView = _yield$import.getCodeBlockAdvancedNodeView;
return _context.abrupt("return", function (node, view, getPos, _decs, _nodeViewOptions, innerDecorations) {
return getCodeBlockAdvancedNodeView(props)(node, view, getPos, innerDecorations);
});
case 5:
case "end":
return _context.stop();
}
}, _callee);
}));
function loader() {
return _loader.apply(this, arguments);
}
return loader;
}()
});
};