MCPcopy Index your code
hub / github.com/editablejs/editable / getStore

Function getStore

packages/editor/src/plugin/selection-drawing.ts:48–74  ·  view source on GitHub ↗
(editor: Editor)

Source from the content-addressed store, hash-verified

46>()
47
48const getStore = (editor: Editor) => {
49 let store = EDITOR_TO_SELECTION_DRAWING_STORE.get(editor)
50 if (!store) {
51 store = create<SelectionDrawingStore>(() => ({
52 style: {
53 focusColor: 'rgba(0,127,255,0.3)',
54
55 blurColor: 'rgba(136, 136, 136, 0.3)',
56
57 caretColor: '#000',
58
59 caretWidth: 1,
60
61 dragColor: 'rgb(37, 99, 235)',
62
63 touchWidth: 2,
64
65 touchColor: 'rgb(37, 99, 235)',
66 },
67 selection: null,
68 rects: null,
69 enabled: true,
70 }))
71 EDITOR_TO_SELECTION_DRAWING_STORE.set(editor, store)
72 }
73 return store
74}
75
76export const SelectionDrawing = {
77 getStore,

Callers 1

Calls 2

getMethod · 0.80
createFunction · 0.50

Tested by

no test coverage detected