Skip to content

Commit

Permalink
Merge pull request #6915 from nextcloud/fix/6871-smart-add-to-next-line
Browse files Browse the repository at this point in the history
fix/6871 smart add to next line
  • Loading branch information
max-nextcloud authored Feb 24, 2025
2 parents 293ad52 + 654f290 commit 815f27a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/plugins/currentLineMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ function menuForCurrentParagraph(editor) {
const { selection } = editor.state
const { textContent } = selection.$anchor.parent
const eol = selection.$anchor.end()
const contentToInsert = textContent.match(/(^| )$/) ? '/' : ' /'
editor.chain()
.focus()
.setTextSelection(eol)
.insertContent(contentToInsert)
.run()
const chain = editor.chain().focus().setTextSelection(eol)
if (textContent.trim() === '') {
chain.insertContent('/').run()
} else {
chain.splitBlock().insertContent('/').run()
}
})
return menu.$el
}
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ const config = createAppConfig({
}
},
},
server: {
allowedHosts: ['host.docker.internal', 'localhost', 'nextcloud.local'],
},
},
})

Expand Down

0 comments on commit 815f27a

Please sign in to comment.