mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05: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:
parent
41623a6512
commit
c8d4b89ac7
3 changed files with 11 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
||||||
"@tiptap/core": "^2.0.0-beta.182",
|
"@tiptap/core": "^2.0.0-beta.182",
|
||||||
"@tiptap/extension-blockquote": "^2.0.0-beta.29",
|
"@tiptap/extension-blockquote": "^2.0.0-beta.29",
|
||||||
"@tiptap/extension-document": "^2.0.0-beta.17",
|
"@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-link": "^2.0.0-beta.43",
|
||||||
"@tiptap/extension-paragraph": "^2.0.0-beta.26",
|
"@tiptap/extension-paragraph": "^2.0.0-beta.26",
|
||||||
"@tiptap/extension-placeholder": "^2.0.0-beta.53",
|
"@tiptap/extension-placeholder": "^2.0.0-beta.53",
|
||||||
|
|
|
@ -4,6 +4,7 @@ import Link from '@tiptap/extension-link';
|
||||||
import Paragraph from '@tiptap/extension-paragraph';
|
import Paragraph from '@tiptap/extension-paragraph';
|
||||||
import Document from '@tiptap/extension-document';
|
import Document from '@tiptap/extension-document';
|
||||||
import Blockquote from '@tiptap/extension-blockquote';
|
import Blockquote from '@tiptap/extension-blockquote';
|
||||||
|
import HardBreak from '@tiptap/extension-hard-break';
|
||||||
|
|
||||||
export function getEditorConfig({placeholder, autofocus = false, content = ''}) {
|
export function getEditorConfig({placeholder, autofocus = false, content = ''}) {
|
||||||
return {
|
return {
|
||||||
|
@ -17,7 +18,10 @@ export function getEditorConfig({placeholder, autofocus = false, content = ''})
|
||||||
Placeholder.configure({
|
Placeholder.configure({
|
||||||
placeholder
|
placeholder
|
||||||
}),
|
}),
|
||||||
Blockquote.configure({})
|
Blockquote.configure({}),
|
||||||
|
|
||||||
|
// Enable shift + enter to insert <br> tags
|
||||||
|
HardBreak.configure({})
|
||||||
],
|
],
|
||||||
content,
|
content,
|
||||||
autofocus,
|
autofocus,
|
||||||
|
|
|
@ -1779,6 +1779,11 @@
|
||||||
prosemirror-view "1.26.2"
|
prosemirror-view "1.26.2"
|
||||||
tippy.js "^6.3.7"
|
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":
|
"@tiptap/extension-link@^2.0.0-beta.43":
|
||||||
version "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"
|
resolved "https://registry.yarnpkg.com/@tiptap/extension-link/-/extension-link-2.0.0-beta.43.tgz#c123a2170dd50d075b9fe7fb91d86d23f778ffb0"
|
||||||
|
|
Loading…
Add table
Reference in a new issue