ITiddlyWiki
tw5-typed / boot / ITiddlyWiki
Interface: ITiddlyWiki
Defined in: src/boot/index.d.ts:87
Properties
boot
boot:
IBoot
Defined in: src/boot/index.d.ts:97
browser
browser:
object
Defined in: src/boot/index.d.ts:99
is?
optionalis:object
is.android?
optionalandroid:boolean
is.bada?
optionalbada:boolean
is.blackberry?
optionalblackberry:boolean
is.chrome?
optionalchrome:boolean
is.firefox?
optionalfirefox:boolean
is.firefoxos?
optionalfirefoxos:boolean
is.gecko?
optionalgecko:boolean
is.ios?
optionalios:boolean
is.ipad?
optionalipad:boolean
is.iphone?
optionaliphone:boolean
is.mobile?
optionalmobile:boolean
is.name?
optionalname:boolean
is.opera?
optionalopera:boolean
is.phantomjs?
optionalphantomjs:boolean
is.safari?
optionalsafari:boolean
is.sailfish?
optionalsailfish:boolean
is.seamonkey?
optionalseamonkey:boolean
is.silk?
optionalsilk:boolean
is.tizen?
optionaltizen:boolean
is.version?
optionalversion:boolean
is.webkit?
optionalwebkit:boolean
is.webos?
optionalwebos:boolean
is.windowsphone?
optionalwindowsphone:boolean
isFirefox
isFirefox:
boolean
Deprecated
Install $:/plugins/tiddlywiki/browser-sniff to use browser.is
isIE
isIE:
boolean
Deprecated
Install $:/plugins/tiddlywiki/browser-sniff to use browser.is
config
config:
IConfig
Defined in: src/boot/index.d.ts:136
crypto
crypto:
Crypto
Defined in: src/boot/index.d.ts:137
dragInProgress?
optionaldragInProgress:boolean
Defined in: src/boot/index.d.ts:142
Check for this window being the source of the drag. If true, some drop target widget will stop responding to the drop event, so you can handle drop event in your own widget.
Used by DropZoneWidget.prototype.handleDropEvent
fakeDocument
fakeDocument:
IFakeDocument
Defined in: src/boot/index.d.ts:143
hooks
hooks:
IHooks
Defined in: src/boot/index.d.ts:161
Global Hooks mechanism which allows plugins to modify default functionality
keyboardManager
keyboardManager:
KeyboardManager
Defined in: src/boot/index.d.ts:162
language
language:
ILanguage
Defined in: src/boot/index.d.ts:163
locationHash
locationHash:
string
Defined in: src/boot/index.d.ts:248
macros
macros:
Record<string,IMacro>
Defined in: src/boot/index.d.ts:250
modal
modal:
Modal
Defined in: src/boot/index.d.ts:252
modules
modules:
IModules
Defined in: src/boot/index.d.ts:254
node
node:
Record<string,unknown>
Defined in: src/boot/index.d.ts:257
NodeJS features, if tw isn't running on a NodeJS environment, the value will be null
nodeWebKit
nodeWebKit:
Record<string,unknown>
Defined in: src/boot/index.d.ts:259
Broswer features, if tw isn't running on a browser environment, the value will be null
notifier
notifier:
Notifier
Defined in: src/boot/index.d.ts:260
packageInfo
packageInfo:
Record<string,unknown>
Defined in: src/boot/index.d.ts:261
passwordPrompt
passwordPrompt:
PasswordPrompt
Defined in: src/boot/index.d.ts:262
platform
platform:
object
Defined in: src/boot/index.d.ts:263
isLinux
isLinux:
boolean
isMac
isMac:
boolean
isWindows
isWindows:
boolean
preloadTiddlers
preloadTiddlers:
Record<string,Record<string,unknown>>
Defined in: src/boot/index.d.ts:281
External JavaScript can populate this array before calling boot.js in order to preload tiddlers
rootWidget
rootWidget:
Widget
Defined in: src/boot/index.d.ts:282
safeMode
safeMode:
boolean
Defined in: src/boot/index.d.ts:283
Story
Story: typeof
Story
Defined in: src/boot/index.d.ts:88
syncadaptor?
optionalsyncadaptor:SyncAdaptor
Defined in: src/boot/index.d.ts:284
syncer?
optionalsyncer:Syncer
Defined in: src/boot/index.d.ts:289
Presents when we have $tw.syncadaptor
Syncer()
Syncer: () =>
Syncer
Defined in: src/boot/index.d.ts:89
Returns
Tiddler
Tiddler: typeof
Tiddler
Defined in: src/boot/index.d.ts:90
utils
utils:
IUtilities
Defined in: src/boot/index.d.ts:290
version
version:
string
Defined in: src/boot/index.d.ts:291
wiki
wiki:
Wiki
Defined in: src/boot/index.d.ts:292
Wiki
Wiki: typeof
Wiki
Defined in: src/boot/index.d.ts:91
Methods
addUnloadTask()
addUnloadTask(
task):void
Defined in: src/boot/index.d.ts:96
Add another unload task
Parameters
task
() => void
Function to be called on unload
Returns
void
findLibraryItem()
findLibraryItem(
name,paths):string
Defined in: src/boot/index.d.ts:150
Find a library item (plugin/theme/language) by name in the given search paths
Parameters
name
string
Name of the library item to find
paths
string[]
Array of file paths to search for it
Returns
string
The path of the library item folder, or null if not found
getLibraryItemSearchPaths()
getLibraryItemSearchPaths(
libraryPath,environmentVariable?):string[]
Defined in: src/boot/index.d.ts:157
Get the search paths for library items (plugins/themes/languages)
Parameters
libraryPath
string
Path of library folder relative to core path
environmentVariable?
string
Optional environment variable name for additional paths
Returns
string[]
Array of search paths
loadMetadataForFile()
loadMetadataForFile(
filepath):ITiddlerFields
Defined in: src/boot/index.d.ts:169
Load the metadata fields in the .meta file corresponding to a particular file
Parameters
filepath
string
The path to the file
Returns
The metadata fields or null if no .meta file exists
loadPlugin()
loadPlugin(
name,paths):void
Defined in: src/boot/index.d.ts:175
Load a plugin by name from the given search paths
Parameters
name
string
Name of the plugin (e.g., "tiddlywiki/filesystemadaptor")
paths
string[]
Array of file paths to search for it
Returns
void
loadPluginFolder()
loadPluginFolder(
filepath,excludeRegExp?):IPluginInfo
Defined in: src/boot/index.d.ts:182
Load the tiddlers from a plugin folder, and package them up into a proper JSON plugin tiddler
Parameters
filepath
string
Path to the plugin folder
excludeRegExp?
RegExp
Optional regex for files to exclude
Returns
Plugin info object or null if not a valid plugin
loadPlugins()
loadPlugins(
plugins,libraryPath,environmentVariable?):void
Defined in: src/boot/index.d.ts:192
Load multiple plugins
Parameters
plugins
string[]
Array of plugin names (e.g., ["tiddlywiki/filesystemadaptor"])
libraryPath
string
Path of library folder for these plugins (relative to core path)
environmentVariable?
string
Environment variable name for these plugins
Returns
void
loadTiddlersBrowser()
loadTiddlersBrowser():
void
Defined in: src/boot/index.d.ts:196
Load tiddlers in browser environment
Returns
void
loadTiddlersFromFile()
loadTiddlersFromFile(
filepath,defaultFields?):ITiddlersInFile
Defined in: src/boot/index.d.ts:203
Load the tiddlers contained in a particular file (and optionally extract fields from the accompanying .meta file)
Parameters
filepath
string
The path to the file to load
defaultFields?
Record<string, unknown>
Optional default fields to apply to loaded tiddlers
Returns
Object containing filepath, type, tiddlers array, and hasMetaFile flag
loadTiddlersFromPath()
loadTiddlersFromPath(
filepath,excludeRegExp?):ITiddlersInFile[]
Defined in: src/boot/index.d.ts:214
Load all the tiddlers recursively from a directory, including honouring tiddlywiki.files files for drawing in external files
Parameters
filepath
string
The path to load from
excludeRegExp?
RegExp
Optional regex for files to exclude
Returns
Array of objects containing filepath, type, tiddlers array, and hasMetaFile flag
Description
Note that no file information is returned for externally loaded tiddlers, just the tiddlers property.
loadTiddlersFromSpecification()
loadTiddlersFromSpecification(
filepath,excludeRegExp?):ITiddlersInFile[]
Defined in: src/boot/index.d.ts:224
Load all the tiddlers defined by a tiddlywiki.files specification file
Parameters
filepath
string
Pathname of the directory containing the specification file
excludeRegExp?
RegExp
Optional regex for files to exclude
Returns
Array of objects containing filepath, type, tiddlers array, and hasMetaFile flag
loadTiddlersNode()
loadTiddlersNode():
void
Defined in: src/boot/index.d.ts:233
Load tiddlers in Node.js environment
Returns
void
Description
Load boot tiddlers, core tiddlers, extra plugins, and wiki tiddlers
loadWikiTiddlers()
loadWikiTiddlers(
wikiPath,options?):IWikiInfo
Defined in: src/boot/index.d.ts:243
Load wiki tiddlers from a wiki directory
Parameters
wikiPath
string
Path to the wiki directory
options?
Options for loading
parentPaths?
string[]
Array of parent paths that we mustn't recurse into
readOnly?
boolean
True if the tiddler file paths should not be retained
Returns
Wiki info object or null if no tiddlywiki.info file exists
preloadTiddler()
preloadTiddler(
fields):void
Defined in: src/boot/index.d.ts:273
Convenience function for pushing a tiddler onto the preloading array.
Parameters
fields
Record<string, unknown>
The fields of the tiddler to push.
Returns
void
Description
方便地将一个 tiddler 推入预加载数组中。
preloadTiddlerArray()
preloadTiddlerArray(
fieldsArray):void
Defined in: src/boot/index.d.ts:279
Convenience function for pushing an array of tiddlers onto the preloading array.
Parameters
fieldsArray
Record<string, unknown>[]
The array of tiddlers to push.
Returns
void
Description
方便地将若干 tiddler 数组推入预加载数组中。