Skip to content
Next Next commit
remove old link when editing
Signed-off-by: grnd-alt <[email protected]>
  • Loading branch information
grnd-alt committed Mar 19, 2025
commit 9fbd73bf855ad40ba7937bca02bf6865bb5bb1b7
3 changes: 3 additions & 0 deletions src/components/Menu/ActionInsertLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ export default {
const chain = this.$editor.chain()
// Check if any text is selected, if not insert the link using the given text property
if (this.$editor.view.state?.selection.empty) {
if (this.state.active) {
chain.deleteNode('paragraph')
}
chain.insertContent({
type: 'paragraph',
content: [{
Expand Down