MCPcopy Create free account
hub / github.com/editablejs/editable / closeSlashDecorate

Function closeSlashDecorate

packages/plugins/toolbar/src/slash/utils.ts:5–14  ·  view source on GitHub ↗
(editor: Editor)

Source from the content-addressed store, hash-verified

3import { getSlashTriggerData, clearSlashTriggerData } from './weak-map'
4
5export const closeSlashDecorate = (editor: Editor) => {
6 SlashToolbar.setOpen(editor, false)
7 const triggerData = getSlashTriggerData(editor)
8 if (triggerData) {
9 triggerData.rangeRef.unref()
10 triggerData.startRef.unref()
11 SlashToolbar.setSearchValue(editor, '')
12 }
13 clearSlashTriggerData(editor)
14}

Callers 3

withSlashToolbarFunction · 0.90
SlashToolbarDecorateFunction · 0.90
SlashToolbarSearchFunction · 0.90

Calls 2

getSlashTriggerDataFunction · 0.90
clearSlashTriggerDataFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…