Skip to content

Commit

Permalink
fix: fix delete line issues
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Nov 22, 2023
1 parent 3657bfa commit fe2ce1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion components/editor/intelli/ai-block-extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export const createAiBlock = () => {
return {
'Mod-/': (state, dispatch, view) => {
isEditInChild = true
this.editor.commands.insertContent([
{
type: 'paragraph',
content: [],
}
])
this.editor.setEditable(false)
this.editor.commands.toggleAiBlock()
},
Expand All @@ -62,7 +68,7 @@ export const createAiBlock = () => {
return false
},
Escape: () => {
console.log("Escape")
console.log('Escape')
if (isEditInChild === true) {
this.editor.setEditable(true)
this.editor.commands.focus()
Expand Down
2 changes: 1 addition & 1 deletion components/editor/intelli/ai-block-view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useRef } from 'react'
import { NodeViewWrapper } from '@tiptap/react'
import { AiBlockEditor } from './ai-block-editor'

const AiBlockView = ( props ) => {
const AiBlockView = (props) => {
const $container = useRef()

return (
Expand Down

0 comments on commit fe2ce1b

Please sign in to comment.