2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

🐛 Added line break on Shift + Enter

refs https://github.com/TryGhost/Team/issues/1793

Included in the @tiptap/extension-hard-break extension.
This commit is contained in:
Simon Backx 2022-08-15 12:32:59 +02:00
parent 41623a6512
commit c8d4b89ac7
3 changed files with 11 additions and 1 deletions

View file

@ -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",

View file

@ -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 <br> tags
HardBreak.configure({})
],
content,
autofocus,

View file

@ -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"