通用评论

index.js 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _button = require("antd/es/button");
  6. var _button2 = _interopRequireDefault(_button);
  7. var _popover = require("antd/es/popover");
  8. var _popover2 = _interopRequireDefault(_popover);
  9. var _icon = require("antd/es/icon");
  10. var _icon2 = _interopRequireDefault(_icon);
  11. var _message2 = require("antd/es/message");
  12. var _message3 = _interopRequireDefault(_message2);
  13. var _input = require("antd/es/input");
  14. var _input2 = _interopRequireDefault(_input);
  15. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  16. require("antd/es/button/style");
  17. require("antd/es/popover/style");
  18. require("antd/es/icon/style");
  19. require("antd/es/message/style");
  20. require("antd/es/input/style");
  21. var _react = require("react");
  22. var _react2 = _interopRequireDefault(_react);
  23. var _propTypes = require("prop-types");
  24. var _propTypes2 = _interopRequireDefault(_propTypes);
  25. var _classnames = require("classnames");
  26. var _classnames2 = _interopRequireDefault(_classnames);
  27. var _reactIntlUniversal = require("react-intl-universal");
  28. var _reactIntlUniversal2 = _interopRequireDefault(_reactIntlUniversal);
  29. var _dayjs = require("dayjs");
  30. var _dayjs2 = _interopRequireDefault(_dayjs);
  31. var _shortid = require("shortid");
  32. var _shortid2 = _interopRequireDefault(_shortid);
  33. var _constant = require("../../constant");
  34. var _helper = require("../../helper");
  35. var _Upload = require("./Upload");
  36. var _Upload2 = _interopRequireDefault(_Upload);
  37. var _Emoji = require("./Emoji");
  38. var _Emoji2 = _interopRequireDefault(_Emoji);
  39. var _Comment = require("../../Comment");
  40. var _Comment2 = _interopRequireDefault(_Comment);
  41. require("./index.css");
  42. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  43. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  44. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  45. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  46. var TextArea = _input2.default.TextArea;
  47. var client = function client(oss) {
  48. return new window.OSS.Wrapper({
  49. accessKeyId: oss.access_key_id,
  50. accessKeySecret: oss.access_key_secret,
  51. stsToken: oss.security_token,
  52. endpoint: _constant.OSS_ENDPOINT, //常量,你可以自己定义
  53. bucket: _constant.OSS_BUCKET
  54. });
  55. };
  56. var uploadPath = function uploadPath(path, file) {
  57. return path + "/" + (0, _dayjs2.default)().format("YYYYMMDD") + "/" + _shortid2.default.generate() + "." + file.type.split("/")[1];
  58. };
  59. var UploadToOss = function UploadToOss(oss, path, file) {
  60. var url = uploadPath(path, file);
  61. return new Promise(function (resolve, reject) {
  62. client(oss).multipartUpload(url, file).then(function (data) {
  63. resolve(data);
  64. }).catch(function (error) {
  65. reject(error);
  66. });
  67. });
  68. };
  69. var Editor = function (_React$Component) {
  70. _inherits(Editor, _React$Component);
  71. function Editor(props) {
  72. _classCallCheck(this, Editor);
  73. var _this = _possibleConstructorReturn(this, (Editor.__proto__ || Object.getPrototypeOf(Editor)).call(this, props));
  74. _this.state = {
  75. showUpload: false,
  76. value: props.value || "", // 编辑器里面的值
  77. fileList: props.fileList || [], // 图片列表
  78. fileMap: {}, // 已经上传的图片路径和 uid 的映射 { uid: path }
  79. uploadVisible: false
  80. };
  81. _this.handleChange = _this.handleChange.bind(_this);
  82. _this.handleClickEmoji = _this.handleClickEmoji.bind(_this);
  83. _this.handleChangeFileList = _this.handleChangeFileList.bind(_this);
  84. _this.handleShowUpload = _this.handleShowUpload.bind(_this);
  85. _this.handleUpload = _this.handleUpload.bind(_this);
  86. _this.handleSubmit = _this.handleSubmit.bind(_this);
  87. _this.handlePaste = _this.handlePaste.bind(_this);
  88. _this.resetState = _this.resetState.bind(_this);
  89. _this.handleEmojiScroll = _this.handleEmojiScroll.bind(_this);
  90. _this.handlePressEnter = _this.handlePressEnter.bind(_this);
  91. return _this;
  92. }
  93. _createClass(Editor, [{
  94. key: "componentDidMount",
  95. value: function componentDidMount() {
  96. var _props = this.props,
  97. app = _props.app,
  98. onRef = _props.onRef;
  99. if (app.currentUser && (app.currentUser.user_id > 0 || app.currentUser.id > 0)) {
  100. app.sOssSts();
  101. }
  102. if ((0, _helper.isFunction)(onRef)) {
  103. onRef(this);
  104. }
  105. }
  106. }, {
  107. key: "handleEmojiScroll",
  108. value: function handleEmojiScroll(e) {
  109. if (!this.emoji) {
  110. return;
  111. }
  112. e.preventDefault();
  113. if (e.deltaY > 0) {
  114. this.emoji.next();
  115. } else if (e.deltaY < 0) {
  116. this.emoji.prev();
  117. }
  118. }
  119. /**
  120. * 编辑器的值改变事件
  121. * 将最新的值存储到 state 中
  122. * @param {string} value 输入的值
  123. */
  124. }, {
  125. key: "handleChange",
  126. value: function handleChange(value) {
  127. this.setState({ value: value });
  128. if (this.props.onChange) {
  129. this.props.onChange(value);
  130. }
  131. }
  132. /**
  133. * 点击 emoji 的事件
  134. * 点击后,需要将改 emoji 插入到编辑器中
  135. * 插入的值为 [emoji chinese name]
  136. * 参数 emoji 即为 emoji chinese name
  137. * @param {string}} emoji emoji 的中文,如 微笑
  138. */
  139. }, {
  140. key: "handleClickEmoji",
  141. value: function handleClickEmoji(emoji) {
  142. var value = this.props.value || this.state.value;
  143. value += "[" + emoji + "]";
  144. this.handleChange(value);
  145. }
  146. /**
  147. * 监听文件列表改变事件
  148. * @param {Array} fileList 文件列表
  149. */
  150. }, {
  151. key: "handleChangeFileList",
  152. value: function handleChangeFileList(fileList) {
  153. var list = fileList;
  154. if (fileList.length > this.props.maxUpload) {
  155. list = fileList.slice(0, this.props.maxUpload);
  156. }
  157. this.props.handleChangeFileList(list);
  158. this.setState({ fileList: list });
  159. }
  160. /**
  161. * 控制上传 Popover 的显示和隐藏
  162. * @param {boolean} showUpload 是否显示上传的 Popover
  163. */
  164. }, {
  165. key: "handleShowUpload",
  166. value: function handleShowUpload(showUpload) {
  167. if (typeof showUpload === "boolean") {
  168. this.setState({ showUpload: showUpload });
  169. } else {
  170. this.setState({ showUpload: !this.state.showUpload });
  171. }
  172. }
  173. /**
  174. * 上传文件
  175. * @param {object} param 文件对象
  176. */
  177. }, {
  178. key: "handleUpload",
  179. value: function handleUpload(_ref) {
  180. var uid = _ref.uid,
  181. path = _ref.path;
  182. var fileMap = this.state.fileMap;
  183. var fileList = this.state.fileList;
  184. fileMap[uid] = path;
  185. fileList = fileList.map(function (item) {
  186. if (item.uid === uid) {
  187. item.thumbUrl = _constant.OSS_LINK + path;
  188. }
  189. return item;
  190. });
  191. this.props.handleChangeFileList(fileList);
  192. this.setState({ fileMap: fileMap, fileList: fileList });
  193. }
  194. /**
  195. * 粘贴回调
  196. */
  197. }, {
  198. key: "handlePaste",
  199. value: function handlePaste(e) {
  200. var _this2 = this;
  201. if (this.state.fileList.length >= this.props.maxUpload) {
  202. return;
  203. }
  204. var items = e.clipboardData && e.clipboardData.items;
  205. var file = null;
  206. if (items && items.length) {
  207. for (var i = 0; i < items.length; i++) {
  208. if (items[i].type.indexOf("image") !== -1) {
  209. file = items[i].getAsFile();
  210. break;
  211. }
  212. }
  213. if (file === null) return;
  214. }
  215. this.setState({
  216. uploadVisible: true
  217. });
  218. var reader = new FileReader();
  219. reader.readAsDataURL(file);
  220. reader.onloadend = function () {
  221. // DRIVER_LICENSE_PATH oss 的存储路径位置
  222. UploadToOss(_this2.props.app.oss, _constant.DRIVER_LICENSE_PATH, file).then(function (data) {
  223. var fileList = _this2.state.fileList.concat({
  224. url: _constant.OSS_LINK + data.name,
  225. thumbUrl: _constant.OSS_LINK + data.name,
  226. type: file.type,
  227. uid: new Date().valueOf()
  228. });
  229. _this2.props.handleChangeFileList(fileList);
  230. _this2.setState({
  231. fileList: fileList
  232. });
  233. }).catch(function (e) {
  234. var msg = e.message || _constant.ERROR_DEFAULT;
  235. if (_this2.props.showError) {
  236. _message3.default.error(msg);
  237. }
  238. if (_this2.props.onError) {
  239. _this2.props.onError(msg, { response: e.response });
  240. }
  241. });
  242. };
  243. }
  244. /**
  245. * 提交编辑器内容
  246. * 提交功能,交给父组件来实现
  247. * 需要父组件传入 onSubmit
  248. */
  249. }, {
  250. key: "handleSubmit",
  251. value: function handleSubmit() {
  252. var _this3 = this;
  253. var maxLength = this.props.maxLength;
  254. var _state = this.state,
  255. value = _state.value,
  256. fileMap = _state.fileMap,
  257. fileList = _state.fileList;
  258. if (value.length > maxLength) {
  259. // message.error(`字数不得超过${maxLength}字`);
  260. _message3.default.error(_reactIntlUniversal2.default.get("editor.maxLength", { maxLength: maxLength }));
  261. return;
  262. }
  263. var files = [];
  264. if (fileList.length) {
  265. fileList.forEach(function (item) {
  266. if (item.url) {
  267. files.push(item.url);
  268. return;
  269. }
  270. if (!fileMap[item.uid]) {
  271. return;
  272. }
  273. files.push("" + _constant.OSS_LINK + fileMap[item.uid]);
  274. });
  275. }
  276. if (this.props.beforeSubmit) {
  277. Promise.resolve(this.props.beforeSubmit({ text: value, files: files })).then(function (res) {
  278. if (!(res === false)) {
  279. _this3.props.onSubmit({ text: value, files: files }, function (res, action) {
  280. _this3.resetState();
  281. if (action === "comment" && _this3.props.onCommentSuccess) {
  282. _this3.props.onCommentSuccess(res);
  283. }
  284. });
  285. }
  286. });
  287. } else {
  288. this.props.onSubmit({ text: value, files: files }, function (res, action) {
  289. _this3.resetState();
  290. if (action === "comment" && _this3.props.onCommentSuccess) {
  291. _this3.props.onCommentSuccess(res);
  292. }
  293. });
  294. }
  295. }
  296. }, {
  297. key: "resetState",
  298. value: function resetState() {
  299. this.handleChange("");
  300. this.handleChangeFileList([]);
  301. this.setState({
  302. showUpload: false,
  303. value: "",
  304. fileList: [],
  305. fileMap: {}
  306. });
  307. }
  308. }, {
  309. key: "checkDisabledSubmit",
  310. value: function checkDisabledSubmit() {
  311. var _props2 = this.props,
  312. btnDisabled = _props2.btnDisabled,
  313. value = _props2.value,
  314. fileList = _props2.fileList;
  315. if (btnDisabled) {
  316. return true;
  317. }
  318. if (value && value !== "") {
  319. return false;
  320. }
  321. if (this.state.value && this.state.value !== "") {
  322. return false;
  323. }
  324. if (fileList && fileList.length > 0) {
  325. return false;
  326. }
  327. if (this.state.fileList.length > 0) {
  328. return false;
  329. }
  330. return true;
  331. }
  332. /**
  333. * **处理Enter事件**
  334. * 1. `allowEnterSubmit`为true时enter触发submit事件
  335. * 2. `e.preventDefault`为了防止enter事件后仍触发换行
  336. * 3. enter事件开启后,仍可以用`shift + enter`触发换行
  337. * -- evo 20200222
  338. */
  339. }, {
  340. key: "handlePressEnter",
  341. value: function handlePressEnter(e) {
  342. if (this.props.allowEnterSubmit) {
  343. if (!e.shiftKey) {
  344. e.preventDefault();
  345. this.handleSubmit();
  346. }
  347. }
  348. }
  349. }, {
  350. key: "render",
  351. value: function render() {
  352. var _this4 = this;
  353. var _props3 = this.props,
  354. value = _props3.value,
  355. rows = _props3.rows,
  356. showEmoji = _props3.showEmoji,
  357. showUpload = _props3.showUpload,
  358. multiple = _props3.multiple,
  359. emojiPopoverPlacement = _props3.emojiPopoverPlacement,
  360. uploadPopoverPlacement = _props3.uploadPopoverPlacement,
  361. uploadOverlayClassName = _props3.uploadOverlayClassName,
  362. fileList = _props3.fileList,
  363. maxUpload = _props3.maxUpload,
  364. btnLoading = _props3.btnLoading,
  365. button = _props3.button,
  366. emojiToolIcon = _props3.emojiToolIcon,
  367. imageToolIcon = _props3.imageToolIcon,
  368. maxLength = _props3.maxLength,
  369. autoFocus = _props3.autoFocus,
  370. app = _props3.app;
  371. var placeholder = this.props.placeholder || _reactIntlUniversal2.default.get("editor.placeholder");
  372. var btnSubmitText = this.props.btnSubmitText || _reactIntlUniversal2.default.get("editor.SubmitBtn");
  373. var handleSubmit = this.handleSubmit;
  374. var disabledSubmit = this.checkDisabledSubmit();
  375. var inputValue = value || this.state.value;
  376. var uploadFileList = fileList || this.state.fileList;
  377. var isLogin = app.currentUser && (app.currentUser.user_id > 0 || app.currentUser.id > 0);
  378. return _react2.default.createElement(
  379. "div",
  380. { className: "comment-editor-container", onPaste: this.handlePaste },
  381. isLogin ? _react2.default.createElement(
  382. _react.Fragment,
  383. null,
  384. _react2.default.createElement("div", {
  385. className: (0, _classnames2.default)({
  386. "comment-editor-toolbar": true,
  387. "comment-editor-toolbar-error": inputValue.length > maxLength
  388. })
  389. }),
  390. _react2.default.createElement(
  391. "div",
  392. { className: "comment-editor" },
  393. _react2.default.createElement(TextArea, {
  394. value: inputValue,
  395. onChange: function onChange(e) {
  396. _this4.handleChange(e.target.value);
  397. },
  398. rows: rows,
  399. placeholder: placeholder,
  400. autoFocus: autoFocus,
  401. onPressEnter: this.handlePressEnter
  402. }),
  403. _react2.default.createElement(
  404. "div",
  405. { className: "comment-toolbar" },
  406. _react2.default.createElement(
  407. "div",
  408. { className: "comment-toolbar-left" },
  409. showEmoji && _react2.default.createElement(
  410. _popover2.default,
  411. {
  412. trigger: "click",
  413. placement: emojiPopoverPlacement,
  414. autoAdjustOverflow: false,
  415. overlayStyle: { zIndex: 9999 },
  416. content: _react2.default.createElement(
  417. "div",
  418. {
  419. style: { width: 240, height: 205 },
  420. onWheel: this.handleEmojiScroll
  421. },
  422. _react2.default.createElement(_Emoji2.default, {
  423. onClick: this.handleClickEmoji,
  424. ref: function ref(node) {
  425. _this4.emoji = node;
  426. },
  427. emojiList: this.props.app.emojiList
  428. })
  429. ),
  430. overlayClassName: "comment-emoji-popover"
  431. },
  432. emojiToolIcon || _react2.default.createElement(_icon2.default, { type: "smile-o", className: "comment-toolbar-icon" })
  433. ),
  434. showUpload ? _react2.default.createElement(
  435. _popover2.default,
  436. {
  437. trigger: "click"
  438. // TODO: 针对非 react.js,直接使用 click 事件来控制展开或关闭
  439. , visible: this.state.uploadVisible,
  440. placement: uploadPopoverPlacement,
  441. overlayClassName: uploadOverlayClassName,
  442. autoAdjustOverflow: false,
  443. overlayStyle: { zIndex: 9999 },
  444. onVisibleChange: function onVisibleChange(visible) {
  445. _this4.setState({
  446. uploadVisible: visible
  447. });
  448. },
  449. content: _react2.default.createElement(
  450. "div",
  451. {
  452. style: {
  453. width: 336, // 一行显示3张
  454. minHeight: 100,
  455. margin: "0 auto"
  456. }
  457. },
  458. _react2.default.createElement(_Upload2.default, {
  459. onRef: function onRef(node) {
  460. return _this4.uploadRef = node;
  461. },
  462. multiple: multiple,
  463. onChangeFileList: this.handleChangeFileList,
  464. onUpload: this.handleUpload,
  465. maxUpload: maxUpload,
  466. fileList: uploadFileList,
  467. showError: this.props.showError,
  468. onError: this.props.onError
  469. }),
  470. _react2.default.createElement("div", { className: "clearfix" })
  471. ),
  472. title: _react2.default.createElement(
  473. "div",
  474. { style: { margin: "5px auto" } },
  475. _react2.default.createElement(
  476. "span",
  477. null,
  478. _reactIntlUniversal2.default.get("editor.uploadTip"),
  479. maxUpload >= 2 ? _react2.default.createElement(
  480. "span",
  481. { style: { color: "#666", fontWeight: 400 } },
  482. _reactIntlUniversal2.default.get("editor.uploadCount", {
  483. count: maxUpload - uploadFileList.length
  484. })
  485. ) : null
  486. )
  487. )
  488. },
  489. imageToolIcon ? _react2.default.cloneElement(imageToolIcon, {
  490. onClick: function onClick() {
  491. return _this4.handleShowUpload(true);
  492. }
  493. }) : _react2.default.createElement(_icon2.default, {
  494. type: "picture",
  495. className: "comment-toolbar-icon",
  496. style: { marginLeft: 20 },
  497. onClick: function onClick() {
  498. return _this4.handleShowUpload(true);
  499. }
  500. })
  501. ) : null
  502. ),
  503. _react2.default.createElement(
  504. "div",
  505. { className: "comment-toolbar-right" },
  506. button ? _react2.default.cloneElement(button, {
  507. onClick: button.props.onClick || handleSubmit
  508. }) : _react2.default.createElement(
  509. _button2.default,
  510. {
  511. onClick: function onClick() {
  512. return _this4.handleSubmit();
  513. },
  514. type: "primary",
  515. loading: btnLoading,
  516. disabled: disabledSubmit
  517. },
  518. btnSubmitText
  519. )
  520. )
  521. )
  522. )
  523. ) : _react2.default.createElement(
  524. _react.Fragment,
  525. null,
  526. _react2.default.createElement(
  527. "div",
  528. { className: "comment-unlogin-tip" },
  529. _reactIntlUniversal2.default.get("comment.unlogin")
  530. ),
  531. _react2.default.createElement(
  532. "div",
  533. { className: "comment-unlogin-button" },
  534. _react2.default.createElement(
  535. _button2.default,
  536. {
  537. type: "primary",
  538. onClick: function onClick() {
  539. window.location.href = app.LOGINLINK + "?f=" + window.location.href;
  540. }
  541. },
  542. _reactIntlUniversal2.default.get("account.login")
  543. )
  544. )
  545. )
  546. );
  547. }
  548. }]);
  549. return Editor;
  550. }(_react2.default.Component);
  551. Editor.propTypes = {
  552. rows: _propTypes2.default.number,
  553. placeholder: _propTypes2.default.string,
  554. showEmoji: _propTypes2.default.bool,
  555. emojiPopoverPlacement: _propTypes2.default.string,
  556. showUpload: _propTypes2.default.bool,
  557. uploadPopoverPlacement: _propTypes2.default.string,
  558. uploadOverlayClassName: _propTypes2.default.string,
  559. multiple: _propTypes2.default.bool,
  560. closeUploadWhenBlur: _propTypes2.default.bool,
  561. maxUpload: _propTypes2.default.number,
  562. value: _propTypes2.default.string,
  563. onChange: _propTypes2.default.func,
  564. onSubmit: _propTypes2.default.func,
  565. beforeSubmit: _propTypes2.default.func,
  566. btnSubmitText: _propTypes2.default.string,
  567. btnLoading: _propTypes2.default.bool,
  568. btnDisabled: _propTypes2.default.bool,
  569. button: _propTypes2.default.node,
  570. emojiToolIcon: _propTypes2.default.node,
  571. imageToolIcon: _propTypes2.default.node,
  572. showError: _propTypes2.default.bool,
  573. onError: _propTypes2.default.func,
  574. maxLength: _propTypes2.default.number,
  575. // Enter事件相关
  576. allowEnterSubmit: _propTypes2.default.bool
  577. };
  578. Editor.defaultProps = {
  579. rows: 5,
  580. // placeholder: "说点什么吧",
  581. showEmoji: true,
  582. showUpload: true,
  583. multiple: true,
  584. emojiPopoverPlacement: "bottomLeft",
  585. closeUploadWhenBlur: false,
  586. uploadPopoverPlacement: "bottomLeft",
  587. uploadOverlayClassName: "",
  588. maxUpload: 1,
  589. // btnSubmitText: "发表",
  590. btnLoading: false,
  591. btnDisabled: false,
  592. showError: true,
  593. maxLength: 5000,
  594. app: {},
  595. handleChangeFileList: function handleChangeFileList() {},
  596. // Enter事件相关
  597. allowEnterSubmit: false
  598. };
  599. exports.default = (0, _Comment2.default)(Editor);
  600. //# sourceMappingURL=index.js.map