Skip to content

Commit

Permalink
fix:修改tiptap
Browse files Browse the repository at this point in the history
  • Loading branch information
984507092 committed Nov 18, 2024
1 parent 9351c68 commit 62c74c7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/view/learningNotes/12.tiptap基本教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,13 +543,22 @@ export default {
if (newVal && this.contentValue) {
// this.showDialog = false;
this.content = this.contentValue
this.contentCopyText = this.contentValue.replace(/<br\s*\/?>/g, '\n')
}
}
}
},
mounted() {},
methods: {
handleInputEditor(e) {
this.contentCopyText = e
.split('</p>')
.filter(i => i)
.map(i => i.replace('<p class="custom-class">', '') + '<br/>')
.join('')
.replaceAll(',', '')
.replace(/<br\s*\/?>/g, '\n')
.trimEnd()
this.$emit('input', e)
},
Expand Down

0 comments on commit 62c74c7

Please sign in to comment.