editor fixed
This commit is contained in:
parent
e875212ae7
commit
a39190e2b1
1049
package-lock.json
generated
1049
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
70
package.json
70
package.json
|
@ -37,40 +37,40 @@
|
|||
"@solidjs/meta": "^0.29.4",
|
||||
"@solidjs/router": "^0.14.1",
|
||||
"@solidjs/start": "^1.0.6",
|
||||
"@tiptap/core": "^2.5.5",
|
||||
"@tiptap/extension-blockquote": "^2.5.5",
|
||||
"@tiptap/extension-bold": "^2.5.5",
|
||||
"@tiptap/extension-bubble-menu": "^2.5.5",
|
||||
"@tiptap/extension-bullet-list": "^2.5.5",
|
||||
"@tiptap/extension-character-count": "^2.5.5",
|
||||
"@tiptap/extension-collaboration": "^2.5.5",
|
||||
"@tiptap/extension-collaboration-cursor": "^2.5.5",
|
||||
"@tiptap/extension-document": "^2.5.5",
|
||||
"@tiptap/extension-dropcursor": "^2.5.5",
|
||||
"@tiptap/extension-floating-menu": "^2.5.5",
|
||||
"@tiptap/extension-focus": "^2.5.5",
|
||||
"@tiptap/extension-gapcursor": "^2.5.5",
|
||||
"@tiptap/extension-hard-break": "^2.5.5",
|
||||
"@tiptap/extension-heading": "^2.5.5",
|
||||
"@tiptap/extension-highlight": "^2.5.5",
|
||||
"@tiptap/extension-history": "^2.5.5",
|
||||
"@tiptap/extension-horizontal-rule": "^2.5.5",
|
||||
"@tiptap/extension-image": "^2.5.5",
|
||||
"@tiptap/extension-italic": "^2.5.5",
|
||||
"@tiptap/extension-link": "^2.5.5",
|
||||
"@tiptap/extension-list-item": "^2.5.5",
|
||||
"@tiptap/extension-ordered-list": "^2.5.5",
|
||||
"@tiptap/extension-paragraph": "^2.5.5",
|
||||
"@tiptap/extension-placeholder": "^2.5.5",
|
||||
"@tiptap/extension-strike": "^2.5.5",
|
||||
"@tiptap/extension-text": "^2.5.5",
|
||||
"@tiptap/extension-underline": "^2.5.5",
|
||||
"@tiptap/extension-youtube": "^2.5.5",
|
||||
"@tiptap/core": "^2.5.8",
|
||||
"@tiptap/extension-blockquote": "^2.5.8",
|
||||
"@tiptap/extension-bold": "^2.5.8",
|
||||
"@tiptap/extension-bubble-menu": "^2.5.8",
|
||||
"@tiptap/extension-bullet-list": "^2.5.8",
|
||||
"@tiptap/extension-character-count": "^2.5.8",
|
||||
"@tiptap/extension-collaboration": "^2.5.8",
|
||||
"@tiptap/extension-collaboration-cursor": "^2.5.8",
|
||||
"@tiptap/extension-document": "^2.5.8",
|
||||
"@tiptap/extension-dropcursor": "^2.5.8",
|
||||
"@tiptap/extension-floating-menu": "^2.5.8",
|
||||
"@tiptap/extension-focus": "^2.5.8",
|
||||
"@tiptap/extension-gapcursor": "^2.5.8",
|
||||
"@tiptap/extension-hard-break": "^2.5.8",
|
||||
"@tiptap/extension-heading": "^2.5.8",
|
||||
"@tiptap/extension-highlight": "^2.5.8",
|
||||
"@tiptap/extension-history": "^2.5.8",
|
||||
"@tiptap/extension-horizontal-rule": "^2.5.8",
|
||||
"@tiptap/extension-image": "^2.5.8",
|
||||
"@tiptap/extension-italic": "^2.5.8",
|
||||
"@tiptap/extension-link": "^2.5.8",
|
||||
"@tiptap/extension-list-item": "^2.5.8",
|
||||
"@tiptap/extension-ordered-list": "^2.5.8",
|
||||
"@tiptap/extension-paragraph": "^2.5.8",
|
||||
"@tiptap/extension-placeholder": "^2.5.8",
|
||||
"@tiptap/extension-strike": "^2.5.8",
|
||||
"@tiptap/extension-text": "^2.5.8",
|
||||
"@tiptap/extension-underline": "^2.5.8",
|
||||
"@tiptap/extension-youtube": "^2.5.8",
|
||||
"@types/cookie": "^0.6.0",
|
||||
"@types/cookie-signature": "^1.1.2",
|
||||
"@types/node": "^20.14.11",
|
||||
"@types/node": "^20.14.13",
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
"@urql/core": "^5.0.4",
|
||||
"@urql/core": "^5.0.5",
|
||||
"bootstrap": "^5.3.3",
|
||||
"clsx": "^2.1.1",
|
||||
"cookie": "^0.6.0",
|
||||
|
@ -90,16 +90,16 @@
|
|||
"prosemirror-view": "^1.33.9",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "1.76.0",
|
||||
"solid-js": "^1.8.18",
|
||||
"solid-js": "^1.8.19",
|
||||
"solid-popper": "^0.3.0",
|
||||
"solid-tiptap": "0.7.0",
|
||||
"solid-transition-group": "^0.2.3",
|
||||
"stylelint": "^16.7.0",
|
||||
"stylelint": "^16.8.1",
|
||||
"stylelint-config-recommended": "^14.0.1",
|
||||
"stylelint-config-standard-scss": "^13.1.0",
|
||||
"stylelint-order": "^6.0.4",
|
||||
"stylelint-scss": "^6.4.1",
|
||||
"swiper": "^11.1.5",
|
||||
"swiper": "^11.1.8",
|
||||
"throttle-debounce": "^5.0.2",
|
||||
"tslib": "^2.6.3",
|
||||
"typescript": "^5.5.4",
|
||||
|
@ -108,7 +108,7 @@
|
|||
"vinxi": "^0.4.1",
|
||||
"vite-plugin-mkcert": "^1.17.5",
|
||||
"vite-plugin-node-polyfills": "^0.22.0",
|
||||
"vite-plugin-sass-dts": "^1.3.24",
|
||||
"vite-plugin-sass-dts": "^1.3.25",
|
||||
"y-prosemirror": "1.2.9",
|
||||
"yjs": "13.6.18"
|
||||
},
|
||||
|
|
|
@ -235,9 +235,9 @@ export const EditorComponent = (props: Props) => {
|
|||
const isEmptyTextBlock =
|
||||
doc.textBetween(from, to).length === 0 && isTextSelection(selection)
|
||||
if (isEmptyTextBlock) {
|
||||
e.chain().focus().removeTextWrap({ class: 'highlight-fake-selection' }).run()
|
||||
e?.chain().focus().removeTextWrap({ class: 'highlight-fake-selection' }).run()
|
||||
}
|
||||
setIsCommonMarkup(e.isActive('figcaption'))
|
||||
setIsCommonMarkup(e?.isActive('figcaption'))
|
||||
const result =
|
||||
(view.hasFocus() &&
|
||||
!empty &&
|
||||
|
|
|
@ -46,7 +46,7 @@ export const EditorFloatingMenu = (props: FloatingMenuProps) => {
|
|||
// TODO: add support instagram embed (blockquote)
|
||||
const emb = await embedData(value)
|
||||
props.editor
|
||||
.chain()
|
||||
?.chain()
|
||||
.focus()
|
||||
.insertContent({
|
||||
type: 'figure',
|
||||
|
@ -83,7 +83,7 @@ export const EditorFloatingMenu = (props: FloatingMenuProps) => {
|
|||
return
|
||||
}
|
||||
case 'horizontal-rule': {
|
||||
props.editor.chain().focus().setHorizontalRule().run()
|
||||
props.editor?.chain().focus().setHorizontalRule().run()
|
||||
setSelectedMenuItem()
|
||||
return
|
||||
}
|
||||
|
|
|
@ -29,13 +29,13 @@ export const InsertLinkForm = (props: Props) => {
|
|||
)
|
||||
const handleClearLinkForm = () => {
|
||||
if (currentUrl()) {
|
||||
props.editor.chain().focus().unsetLink().run()
|
||||
props.editor?.chain().focus().unsetLink().run()
|
||||
}
|
||||
}
|
||||
|
||||
const handleLinkFormSubmit = (value: string) => {
|
||||
props.editor
|
||||
.chain()
|
||||
?.chain()
|
||||
.focus()
|
||||
.setLink({ href: checkUrl(value) })
|
||||
.run()
|
||||
|
|
|
@ -58,11 +58,11 @@ export const EditSettingsView = (props: Props) => {
|
|||
() => props.shout,
|
||||
(shout) => {
|
||||
if (shout) {
|
||||
console.debug(`[EditView] shout is loaded: ${shout}`)
|
||||
// console.debug(`[EditView] shout is loaded: ${shout}`)
|
||||
setShoutTopics((shout.topics as Topic[]) || [])
|
||||
const stored = getDraftFromLocalStorage(shout.id)
|
||||
if (stored) {
|
||||
console.info(`[EditView] got stored shout: ${stored}`)
|
||||
// console.info(`[EditView] got stored shout: ${stored}`)
|
||||
setDraft(stored)
|
||||
} else {
|
||||
if (!shout.slug) {
|
||||
|
@ -113,11 +113,11 @@ export const EditSettingsView = (props: Props) => {
|
|||
const resp = await client()?.query(getMyShoutQuery, { shout_id: shoutId })
|
||||
const result = resp?.data?.get_my_shout
|
||||
if (result) {
|
||||
console.debug('[EditView] getMyShout result: ', result)
|
||||
// console.debug('[EditView] getMyShout result: ', result)
|
||||
const { shout: loadedShout, error } = result
|
||||
setDraft(loadedShout)
|
||||
console.debug('[EditView] loadedShout:', loadedShout)
|
||||
console.log(error)
|
||||
// console.debug('[EditView] loadedShout:', loadedShout)
|
||||
error && console.log(error)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -92,11 +92,11 @@ export const EditView = (props: Props) => {
|
|||
() => props.shout,
|
||||
(shout) => {
|
||||
if (shout) {
|
||||
console.debug(`[EditView] shout is loaded: ${shout}`)
|
||||
// console.debug(`[EditView] shout is loaded: ${shout}`)
|
||||
setShoutTopics((shout.topics as Topic[]) || [])
|
||||
const stored = getDraftFromLocalStorage(shout.id)
|
||||
if (stored) {
|
||||
console.info(`[EditView] got stored shout: ${stored}`)
|
||||
// console.info(`[EditView] got stored shout: ${stored}`)
|
||||
setDraft(stored)
|
||||
} else {
|
||||
if (!shout.slug) {
|
||||
|
@ -147,11 +147,11 @@ export const EditView = (props: Props) => {
|
|||
const resp = await client()?.query(getMyShoutQuery, { shout_id: shoutId })
|
||||
const result = resp?.data?.get_my_shout
|
||||
if (result) {
|
||||
console.debug('[EditView] getMyShout result: ', result)
|
||||
// console.debug('[EditView] getMyShout result: ', result)
|
||||
const { shout: loadedShout, error } = result
|
||||
setDraft(loadedShout)
|
||||
console.debug('[EditView] loadedShout:', loadedShout)
|
||||
console.log(error)
|
||||
// console.debug('[EditView] loadedShout:', loadedShout)
|
||||
error && console.log(error)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user