Przeglądaj źródła

enhance(apis): add note for setBlockIcon method

charlie 1 tydzień temu
rodzic
commit
dc4c712089
2 zmienionych plików z 4 dodań i 1 usunięć
  1. 1 1
      libs/src/LSPlugin.core.ts
  2. 3 0
      libs/src/LSPlugin.ts

+ 1 - 1
libs/src/LSPlugin.core.ts

@@ -54,7 +54,7 @@ const DIR_PLUGINS = 'plugins'
 declare global {
   interface Window {
     LSPluginCore: LSPluginCore
-    DOMPurify: typeof DOMPurify
+    DOMPurify: any
     $$callerPluginID: string | undefined
   }
 }

+ 3 - 0
libs/src/LSPlugin.ts

@@ -789,6 +789,9 @@ export interface IEditorProxy extends Record<string, any> {
   removeTagExtends: (tagId: BlockIdentity, parentTagIdOrName: BlockIdentity) => Promise<void>
   addBlockTag: (blockId: BlockIdentity, tagId: BlockIdentity) => Promise<void>
   removeBlockTag: (blockId: BlockIdentity, tagId: BlockIdentity) => Promise<void>
+  /**
+   * @note Emoji icon name from https://learn.missiveapp.com/open/emoji-mart
+   * */
   setBlockIcon: (blockId: BlockIdentity, iconType: 'tabler-icon' | 'emoji', iconName: string) => Promise<void>
   removeBlockIcon: (blockId: BlockIdentity) => Promise<void>