MCPcopy Create free account
hub / github.com/docusealco/docuseal / toggleLink

Method toggleLink

app/javascript/elements/markdown_editor.js:348–359  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

346 }
347
348 toggleLink () {
349 if (this.editor.isActive('link')) {
350 this.linkTooltip.hide()
351 this.editor.chain().focus().extendMarkRange('link').unsetLink().run()
352 this.updateToolbarState()
353 } else {
354 const { from } = this.editor.state.selection
355
356 this.linkTooltip.hide()
357 this.linkTooltip.show(this.editor.getAttributes('link').href, from, { focus: true })
358 }
359 }
360
361 insertVariable (e) {
362 const variable = e.target.closest('[data-variable]')?.dataset.variable

Callers 2

connectedCallbackMethod · 0.45
linkSelectionMethod · 0.45

Calls 3

hideMethod · 0.80
updateToolbarStateMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected