Liking cljdoc? Tell your friends :D

run.avelino.logseq-libs.core

Core namespace for Logseq plugin API wrapper

Core namespace for Logseq plugin API wrapper
raw docstring

before-unload!cljs

(before-unload! callback)

Register before unload handler

Register before unload handler
sourceraw docstring

exportscljs

source

get-user-configscljs

source

get-user-configs!cljs

(get-user-configs!)

Get Logseq user configurations. Returns a promise that resolves to a map containing user configs like:

  • :preferred-language - User's preferred language
  • :preferred-date-format - User's preferred date format
  • :preferred-workflow - User's preferred workflow
  • :preferred-theme - User's preferred theme
  • :preferred-format - User's preferred format (markdown/org) And many other Logseq app configurations.
Get Logseq user configurations.
Returns a promise that resolves to a map containing user configs like:
- :preferred-language - User's preferred language
- :preferred-date-format - User's preferred date format
- :preferred-workflow - User's preferred workflow
- :preferred-theme - User's preferred theme
- :preferred-format - User's preferred format (markdown/org)
And many other Logseq app configurations.
sourceraw docstring

logseqcljs

source

on-settings-changed!cljs

(on-settings-changed! callback)

Register settings change handler

Register settings change handler
sourceraw docstring

provide-model!cljs

(provide-model! model)

Provide a model object to Logseq

Provide a model object to Logseq
sourceraw docstring

provide-style!cljs

(provide-style! styles)

Provide CSS styles to Logseq

Provide CSS styles to Logseq
sourceraw docstring

provide-ui!cljs

(provide-ui! ui)

Provide UI elements to Logseq

Provide UI elements to Logseq
sourceraw docstring

ready!cljs

(ready! callback)
(ready! model callback)

Initialize plugin and register model

Initialize plugin and register model
sourceraw docstring

register-command-palettecljs

source

register-command-palette!cljs

(register-command-palette! command)

Register a command in the Logseq command palette. The command configuration should include:

  • :key - Unique identifier for the command
  • :label - Display label in the command palette
  • :keybinding - Optional keyboard shortcut (e.g. 'mod+shift+p')
  • :callback - Function to execute when command is triggered Example: {:key "plugin-command" :label "My Plugin Command" :keybinding "mod+shift+p" :callback #(js/console.log "Command executed!")}
Register a command in the Logseq command palette.
The command configuration should include:
- :key - Unique identifier for the command
- :label - Display label in the command palette
- :keybinding - Optional keyboard shortcut (e.g. 'mod+shift+p')
- :callback - Function to execute when command is triggered
Example:
{:key "plugin-command"
 :label "My Plugin Command"
 :keybinding "mod+shift+p"
 :callback #(js/console.log "Command executed!")}
sourceraw docstring

update-settings!cljs

(update-settings! settings)

Update plugin settings

Update plugin settings
sourceraw docstring

use-settings-schemacljs

source

use-settings-schema!cljs

(use-settings-schema! schema)

Define the settings schema for the plugin. The schema should be a map of setting keys to their configurations. Each configuration can include:

  • type: The type of setting (string, number, boolean, enum, etc.)
  • default: The default value
  • title: Display title for the setting
  • description: Description of what the setting does
  • enumChoices: For enum type, the possible choices Example: {:theme {:type :enum :default "light" :title "Theme" :description "Select the theme for the plugin" :enumChoices ["light" "dark"]}}
Define the settings schema for the plugin.
The schema should be a map of setting keys to their configurations.
Each configuration can include:
- type: The type of setting (string, number, boolean, enum, etc.)
- default: The default value
- title: Display title for the setting
- description: Description of what the setting does
- enumChoices: For enum type, the possible choices
Example:
{:theme {:type :enum
        :default "light"
        :title "Theme"
        :description "Select the theme for the plugin"
        :enumChoices ["light" "dark"]}}
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close