Private
_basePrivate
Optional
_beforeunloadPrivate
handler of before unload plugin
Private
_callerPrivate
_connectedPrivate
_debugPrivate
_mPrivate
_mPrivate
_mPrivate
Optional
_settingsPrivate
_uiui frame identities
Private
_versionStatic
prefixedThe plugin configurations from package.json
Duplex message caller
Connection status with the main app
The plugin user settings
Internal
Optional
tag: UserProxyTagsRest
...args: any[]Optional
context: anyCalls each of the listeners registered for a given event.
Rest
...args: any[]Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Optional
fn: ((...args: any[]) => void)Rest
...args: any[]Optional
context: anyOptional
once: booleanAdd a listener for a given event.
Rest
...args: any[]Optional
context: anyAdd a one-time listener for a given event.
Rest
...args: any[]Optional
context: anyCreate a object to hold the methods referenced in provideUI
logseq.provideModel({
openCalendar () {
console.log('Open the calendar!')
}
})
Inject custom css for the main Logseq app
https://github.com/logseq/logseq-plugin-samples/tree/master/logseq-awesome-fonts
logseq.provideStyle(`
@import url("https://at.alicdn.com/t/font_2409735_r7em724douf.css");
)
Set the theme for the main Logseq app
Inject custom UI at specific DOM node.
Event handlers can not be passed by string, so you need to create them in provideModel
https://github.com/logseq/logseq-plugin-samples/tree/master/logseq-a-translator
logseq.provideUI({
key: 'open-calendar',
path: '#search',
template: `
<a data-on-click="openCalendar" onclick="alert('abc')' style="opacity: .6; display: inline-flex; padding-left: 3px;'>
<i class="iconfont icon-Calendaralt2"></i>
</a>
`
})
Remove all listeners, or those of the specified event.
Optional
event: LSPluginUserEventsRemove the listeners of a given event.
Optional
fn: ((...args: any[]) => void)Rest
...args: any[]Optional
context: anyOptional
once: booleanSet the style for the plugin's UI
https://github.com/logseq/logseq-plugin-samples/tree/master/logseq-awesome-fonts
logseq.setMainUIInlineStyle({
position: 'fixed',
zIndex: 11,
})
https://github.com/logseq/logseq-plugin-samples/tree/master/logseq-awesome-fonts
Generated using TypeDoc
User plugin instance from global namespace
logseq
.Example