diff --git a/apps/comments-ui/package.json b/apps/comments-ui/package.json index 72b9c20f49..9329a73a88 100644 --- a/apps/comments-ui/package.json +++ b/apps/comments-ui/package.json @@ -20,6 +20,7 @@ "@tiptap/core": "^2.0.0-beta.182", "@tiptap/extension-blockquote": "^2.0.0-beta.29", "@tiptap/extension-document": "^2.0.0-beta.17", + "@tiptap/extension-hard-break": "^2.0.0-beta.33", "@tiptap/extension-link": "^2.0.0-beta.43", "@tiptap/extension-paragraph": "^2.0.0-beta.26", "@tiptap/extension-placeholder": "^2.0.0-beta.53", diff --git a/apps/comments-ui/src/utils/editor.js b/apps/comments-ui/src/utils/editor.js index 725291cef1..d4a5527e2d 100644 --- a/apps/comments-ui/src/utils/editor.js +++ b/apps/comments-ui/src/utils/editor.js @@ -4,6 +4,7 @@ import Link from '@tiptap/extension-link'; import Paragraph from '@tiptap/extension-paragraph'; import Document from '@tiptap/extension-document'; import Blockquote from '@tiptap/extension-blockquote'; +import HardBreak from '@tiptap/extension-hard-break'; export function getEditorConfig({placeholder, autofocus = false, content = ''}) { return { @@ -17,7 +18,10 @@ export function getEditorConfig({placeholder, autofocus = false, content = ''}) Placeholder.configure({ placeholder }), - Blockquote.configure({}) + Blockquote.configure({}), + + // Enable shift + enter to insert
tags + HardBreak.configure({}) ], content, autofocus, diff --git a/apps/comments-ui/yarn.lock b/apps/comments-ui/yarn.lock index 5ae61d8ac0..8a9f76c1f0 100644 --- a/apps/comments-ui/yarn.lock +++ b/apps/comments-ui/yarn.lock @@ -1779,6 +1779,11 @@ prosemirror-view "1.26.2" tippy.js "^6.3.7" +"@tiptap/extension-hard-break@^2.0.0-beta.33": + version "2.0.0-beta.33" + resolved "https://registry.yarnpkg.com/@tiptap/extension-hard-break/-/extension-hard-break-2.0.0-beta.33.tgz#e2f355a22aaaec6e831cf2880c52aa5b0b860573" + integrity sha512-41xf0vSV9hcyTFd01ItLq/CjhjgmOFLCrO3UWN/P2E/cIxuDTyXcvjTE/KXeqRCOV3OYd9fVr0wO91hc8Ij1Yg== + "@tiptap/extension-link@^2.0.0-beta.43": version "2.0.0-beta.43" resolved "https://registry.yarnpkg.com/@tiptap/extension-link/-/extension-link-2.0.0-beta.43.tgz#c123a2170dd50d075b9fe7fb91d86d23f778ffb0"