-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(link): use isMarkActive in insertOrSetLink
This way we do not hand in the active state and avoid inconsistencies. Signed-off-by: Max <[email protected]>
- Loading branch information
1 parent
d705663
commit 2a26029
Showing
3 changed files
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,7 +200,7 @@ export default { | |
// Avoid issues when parsing urls later on in markdown that might be entered in an invalid format (e.g. "mailto: [email protected]") | ||
const href = url.replaceAll(' ', '%20') | ||
const chain = this.$editor.chain() | ||
chain.insertOrSetLink(this.state.active, text, { href }) | ||
chain.insertOrSetLink(text, { href }) | ||
chain.focus().run() | ||
}, | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters