Doc restructuring Plugin Install using core Libraries and with Node.js (#6722)

* Doc restructuring Plugin Install using core Libraries and with Node.js

* fixing typos and concerns raised by Jeremy
This commit is contained in:
Mario Pietsch 2022-06-20 14:55:12 +02:00 committed by GitHub
parent 10bc84ba6c
commit 8af7054efa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 310 additions and 114 deletions

View File

@ -1,7 +1,9 @@
created: 201308252136
modified: 201308252136
created: 20130825213600000
modified: 20220613145033713
tags: Concepts
title: TiddlyWiki5
type: text/vnd.tiddlywiki
~TiddlyWiki5 is a reboot of TiddlyWiki for the next 25 years. It is a complete interactive wiki in JavaScript that can be run in the browser or on the server under [[Node.js]].
The ~TiddlyWiki repository can be found at GitHub.

View File

@ -1,13 +1,15 @@
created: 20131129094739786
modified: 20140211195455541
modified: 20220612091858504
tags: Definitions
title: Node.js
type: text/vnd.tiddlywiki
''Node.js'' is a downloadable application for your PC, Mac or Linux computer that lets it run JavaScript applications. Unlike ~JavaScript applications running in a web browser, Node.js code has full access to the file system and other resources of the computer, enabling it to perform the roles that have traditionally been the preserve of languages like Java, PHP and Python. See http://nodejs.org for more details.
''Node.js'' is a downloadable application for your PC, Mac or Linux computer that lets it run JavaScript applications. Unlike ~JavaScript applications running in a web browser, Node.js code has full access to the file system and other resources of the computer, enabling it to perform the roles that have traditionally been the preserve of languages like Java, PHP and Python.
For ~TiddlyWiki, Node.js means that we can have a single code base that can run in the browser or on the server, giving great flexibility in how it is used.
For end users, Node.js is no more complicated to install than a web browser, but unlocks powerful capabilities such as the ability to run ~TiddlyWiki as a web server that you can connect to from other devices.
See [[TiddlyWiki on Node.js]] for more details.
''Node.js'' is a ''trademark'' of the ~OpenJS Foundation. See: https://nodejs.org fore more details.
[[TiddlyWiki on Node.js]] will give an overview about the possibilities using a client-server configuration.

View File

@ -1,5 +1,5 @@
created: 20130826122000000
modified: 20190928082000464
modified: 20220613124446953
tags: Mechanisms
title: PluginMechanism
type: text/vnd.tiddlywiki

View File

@ -1,5 +1,5 @@
created: 20140617211749290
modified: 20211104172343220
modified: 20220613114121229
tags: [[TiddlyWiki on Node.js]]
title: Environment Variables on Node.js
type: text/vnd.tiddlywiki
@ -11,15 +11,15 @@ type: text/vnd.tiddlywiki
* `TIDDLYWIKI_LANGUAGE_PATH` - Search path for languages
* `TIDDLYWIKI_EDITION_PATH` - Search path for editions (used by the InitCommand)
''Note 1'': The delimiter may vary between operating systems. While on Windows a semicolon `;` is used, Linux implements a colon `:`.
''Note 2'': On Linux systems, it may be necessary to //''export''// the variable as well as to define it.
<$macrocall $name=".note" _="""''1.'' The delimiter may vary between operating systems. While on Windows a semicolon `;` is used, Linux implements a colon `:`.<br><br>''2.'' On Linux systems, it may be necessary to //''export''// the variable as well as to define it.
"""/>
The additional paths should each point to folders structured like the equivalent directories in the TiddlyWiki5 GitHub repository: the plugin, theme and language directories contain `publisher/pluginname/<files>` while the edition directories contain `editionname/<files>`
The additional paths should each point to folders structured like the equivalent directories in the ~TiddlyWiki5 GitHub repository: the plugin, theme and language directories contain `publisher/pluginname/<files>` while the edition directories contain `editionname/<files>`
For example:
```
TIDDLYWIKI_PLUGIN_PATH=~/MyPluginStore
export TIDDLYWIKI_PLUGIN_PATH=~/MyPluginStore
tiddlywiki mywiki --build index
```

View File

@ -1,27 +1,19 @@
created: 20191022095653896
modified: 20191102131824766
tags: [[TiddlyWiki on Node.js]]
modified: 20220617130125173
tags: [[TiddlyWiki on Node.js]] PluginsCS
title: Installing custom plugins on Node.js
type: text/vnd.tiddlywiki
There are several ways in which custom plugins that are not part of TiddlyWiki's plugin library can be installed when using TiddlyWiki under Node.js. (See [[Installing a plugin from the plugin library]] for instructions on installing plugins from the library).
\rules except wikilink
* Arrange the PluginFolders containing the plugins in a convenient shared location and then use [[environment variables|Environment Variables on Node.js]] to tell TiddlyWiki to search those folders. The plugins can be referenced in `tiddlywiki.info` by their name (e.g. `tiddlytools/magic`)
* Place the PluginFolders containing the plugins in a `plugins` folder within the [[wiki folder|TiddlyWikiFolders]]. TiddlyWiki will attempt to include every subfolder as a plugin. Do not add the plugin names to `tiddlywiki.info`. Do not add the PluginFolders under a specific namespace:<br><pre>.
├── plugins
│   ├── relink
│   │   ├── js
│   │   ├── plugin.info
│   │   └── tiddlers
│   └── relink-markdown
│   ├── js
│   ├── plugin.info
│   └── readme.tid
├── tiddlers
└── tiddlywiki.info
</pre>
* Depending on how TiddlyWiki itself has been installed, plugins can also be installed by copying the plugin folders into the `plugins` folder of the repository. This is only recommended if working with a forked copy of the repo. It is not recommended if TiddlyWiki has been installed with npm because npm is liable to overwrite the installation when performing an update
! Introduction
Note that including a plugin as an ordinary tiddler (e.g. by dragging and dropping a plugin into the browser) will result in the plugin only being active in the browser, and not available under Node.js.
There are several ways in which official plugins and custom plugins can be installed when using TiddlyWiki with a Node.js client-server configuration.
<$macrocall $name=".note" _="""For instructions on installing plugins from libraries to ''single-file'' wikis learn more at [[Plugins]].
"""/>
!! Plugin Load Order
{{Plugin Ordering}}

View File

@ -0,0 +1,40 @@
created: 20220611123344385
modified: 20220617132351460
tags: [[TiddlyWiki on Node.js]] PluginsCS
title: Installing official plugins on Node.js
type: text/vnd.tiddlywiki
Follow these instructions when using TiddlyWiki with a client-server Node.js configuration:
# Identify the plugins you want to install using the ''Plugins'' tab of <<controlPanel-plugin-link>> (''don't'' install the plugins from here, though)
#* Plugins are identified by their type (ie language, theme or plugin) and their publisher and title. For example, the plugin `$:/plugins/tiddlywiki/internals` is referred to as ''tiddlywiki/internals''
# Quit the server if it is running
# Edit the `tiddlywiki.info` file (it is in JSON format) and locate the `plugins`, `themes` or `languages` section (see below)
# Add entries corresponding to the plugins you wish to add
#* Take care to retain ''commas ''to separate items
#* Do ''not'' terminate the last item in a list with a comma
# Restart the server
```
{
"plugins": [
"tiddlywiki/codemirror"
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
],
"languages": [
"es-ES",
"fr-FR",
"en-EN"
]
}
```
<$macrocall $name=".note" _="An overview of working with plugins can be found at [[Plugins]].<br>Also see: [[Installing custom plugins on Node.js]]."/>

View File

@ -0,0 +1,9 @@
created: 20220612082924589
list: [[Installing custom plugins on Node.js]] [[Installing official plugins on Node.js]] [[Uninstalling a plugin with Node.js]]
modified: 20220617124533352
title: PluginsCS
type: text/vnd.tiddlywiki
This tiddler is used as a tag in the [[Plugins]] tiddler to create a sorted list
<<list-links-draggable>>

View File

@ -1,15 +1,20 @@
created: 20131129094353704
modified: 20200318115527226
modified: 20220617114433107
tags: Platforms
title: TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
\rules except wikilink
Running TiddlyWiki on [[Node.js]] brings several important benefits over and above the single file version:
* You can edit your content on any suitably compatible HTML5 browser, including smartphones and tablets
* Individual tiddlers are stored in separate files, which you can organise as you wish
* The ability to build multiple wikis that blend different combinations of shared and unique content
* You can edit your content on any modern browser, including smartphones and tablets
<<.warning """Note that TiddlyWiki on Node.js doesn't currently support directly modifying the tiddler files via the file system while it is running. The server must be restarted in order to for changes to take effect. The recommended way to interact with a running wiki is via the HTTP or JavaScript APIs.""">>
For more information see:

View File

@ -0,0 +1,31 @@
created: 20220611125113040
modified: 20220617133704286
tags: [[TiddlyWiki on Node.js]] PluginsCS
title: Uninstalling a plugin with Node.js
type: text/vnd.tiddlywiki
Follow these instructions when using TiddlyWiki with client-server Node.js configuration:
# Quit the server if it is running
# Edit the `tiddlywiki.info` file (it is in JSON format) and locate the `plugins` and `themes` section (see below)
# Remove the entries corresponding to the plugins you wish to remove
#* Take care to retain ''commas'' to separate items
#* Do ''not'' terminate the last item in a list with a comma
# Restart the server
```
{
"plugins": [
"tiddlywiki/codemirror"
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
]
}
```
<$macrocall $name=".note" _="An overview of working with plugins can be found at [[Plugins]]"/>

View File

@ -1,18 +1,18 @@
created: 20131219100520659
modified: 20200523092939199
modified: 20220613172345723
tags: [[TiddlyWiki on Node.js]]
title: Using TiddlyWiki on Node.js
type: text/vnd.tiddlywiki
TiddlyWiki5 includes a set of [[Commands]] for use on the command line to perform an extensive set of operations based on TiddlyWikiFolders, TiddlerFiles and TiddlyWikiFiles.
~TiddlyWiki5 includes a set of commands for use on the command line to perform an extensive set of operations based on TiddlyWikiFolders, TiddlerFiles.
For example, the following command loads the tiddlers from a TiddlyWiki HTML file and then saves one of them in static HTML:
For example, the following command loads the tiddlers from a ~TiddlyWiki HTML file and then saves one of them in static HTML:
```
tiddlywiki --verbose --load mywiki.html --rendertiddler ReadMe ./readme.html
```
Running `tiddlywiki` from the command line boots the TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.
Running `tiddlywiki` from the command line boots the ~TiddlyWiki kernel, loads the core plugins and establishes an empty wiki store. It then sequentially processes the command line arguments from left to right. The arguments are separated with spaces.
<<.from-version "5.1.20">> First, there can be zero or more plugin references identified by the prefix `+` for plugin names or `++` for a path to a plugin folder. These plugins are loaded in addition to any specified in the [[TiddlyWikiFolder|TiddlyWikiFolders]].

View File

@ -1,51 +1,38 @@
created: 20160107222352710
modified: 20191022095637710
tags: [[TiddlyWiki on Node.js]] Plugins
modified: 20220617122143911
tags: Plugins
title: Installing a plugin from the plugin library
type: text/vnd.tiddlywiki
! Standalone Configuration
\rules except wikilink
Follow these instructions when using TiddlyWiki as a standalone HTML file:
If you want to follow the steps //side by side// you can <<open-tiddler-in-window>>.
Follow these instructions when using TiddlyWiki as a standalone, single file wiki.
# Create a backup of your current TiddlyWiki HTML file ([[just in case|The First Rule of Using TiddlyWiki]])
# Open your TiddlyWiki in a browser
# Open the [[control panel|$:/ControlPanel]] <<.icon $:/core/images/options-button>>, click on the ''Plugins'' tab and then the <<.icon $:/core/images/download-button>> ''Get more plugins'' button
# Create a backup of your current wiki file ([[just in case|The First Rule of Using TiddlyWiki]])
# Open the <<controlPanel-plugin-link>>
#* Click on the ''Plugins'' tab and then the
#*<<.icon $:/core/images/download-button>> ''Get more plugins'' button
# Click <<.icon $:/core/images/chevron-right>> ''open plugin library'' to open the official plugin library
# When the library listing is loaded:
## Use the tab to select between ''plugins'', ''themes'' and ''languages''
## Use the ''search'' box to search the plugin details
# Click the ''install'' button to install a plugin
# Save your TiddlyWiki <<.icon $:/core/images/save-button>>
# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin <<.icon $:/core/images/refresh-button>>
#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details
#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See the [[PluginMechanism]] for more details
# The plugin should now be available for use
! Client-Server Configuration
Follow these instructions when using TiddlyWiki under Node.js:
# Identify the plugins you want to install using the ''Plugins'' tab of [[control panel|$:/ControlPanel]] (''don't'' install the plugins from here, though). Plugins are identified by their type (ie language, theme or plugin) and their publisher and title. For example, the plugin `$:/plugins/tiddlywiki/internals` is referred to as ''tiddlywiki/internals''
# Quit the server if it is running
# Edit the `tiddlywiki.info` file (it is in JSON format) and locate the `plugins`, `themes` or `languages` section (see below)
# Add entries corresponding to the plugins you wish to add. Take care to retain commas to separate items, but do not terminate the last item in a list with a comma
# Restart the server
```
{
"plugins": [
"tiddlywiki/codemirror"
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
],
"languages": [
"es-ES",
"fr-FR",
"en-EN"
]
}
```
See also [[Installing custom plugins on Node.js]].
<$macrocall $name=".note" _="""If you use TiddlyWiki with ''Node.js'' have a closer look at [[Installing official plugins on Node.js]]<br>An overview can be found at [[Plugins]]"""/>

View File

@ -1,14 +1,29 @@
created: 20160107222430613
modified: 20190927205631648
modified: 20220617115930635
tags: Plugins
title: Manually installing a plugin
type: text/vnd.tiddlywiki
\rules except wikilink
If you want to follow the steps //side by side// you can <<open-external-window "https://tiddlywiki.com/plugins/tiddlywiki/katex">>.
# Create a backup of your current TiddlyWiki HTML file ([[just in case|The First Rule of Using TiddlyWiki]])
# Open your TiddlyWiki in a browser
# In another browser window, find a link to the plugin, e.g. [[$:/plugins/tiddlywiki/example]]. You will typically find these links on the home page of the plugin (for example, https://tiddlywiki.com/plugins/tiddlywiki/katex/)
# Drag the link [[$:/plugins/tiddlywiki/example]] to the browser window containing your TiddlyWiki
# In another browser window, find a link to the plugin, e.g. https://tiddlywiki.com/plugins/tiddlywiki/katex. You will typically find these links on the home page of the plugin
# Drag the link similar to `$:/plugins/tiddlywiki/example` to the browser window containing your TiddlyWiki
# Import the new plugin shown in the $:/Import tiddler
# Save your TiddlyWiki (<<.icon $:/core/images/save-button>>)
# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin <<.icon $:/core/images/refresh-button>>
#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details
# The plugin should now be available for use
# The plugin should now be available for use
<$macrocall $name=".note" _="More information about installing a plugin form the official plugin library, can be found at [[Installing a plugin from the plugin library]]<br>An overview can be found at [[Plugins]]"/>

View File

@ -1,5 +1,5 @@
created: 20170210075109635
modified: 20170210075709809
modified: 20220612082350537
tags: Plugins
title: OfficialPlugins
type: text/vnd.tiddlywiki
@ -7,3 +7,5 @@ type: text/vnd.tiddlywiki
The official TiddlyWiki plugin library contains the plugins that are part of the [[main TiddlyWiki 5 GitHub repository|Working with the TiddlyWiki5 repository]]. Install them from [[the plugin library|Installing a plugin from the plugin library]]. Plugins from the official plugin library are automatically updated as part of the [[upgrade process|UpgradeMechanism]].
<<list-links "[tag[OfficialPlugins]]">>
<$macrocall $name=".note" _="An overview, how to handle plugins can be found at: [[Plugins]]"/>

View File

@ -0,0 +1,47 @@
created: 20220613115453346
modified: 20220617133125115
tags: PluginMechanism
title: Plugin Ordering
type: text/vnd.tiddlywiki
Using the Node.js client-server configuration plugins are activated in the following order:
# Plugins found using the OS environment variables
#* See: [[PluginFolders]]
#* and: [[Environment Variables on Node.js]]
# Plugins stored in the wiki `/plugin` path
#* See: [[PluginFolders]]
# Plugins specified in the command line
#* See: [[Using TiddlyWiki on Node.js]] ... the notes about <<.from-version "5.1.20">>
# Plugins imported by drag and drop as wiki content
#* See: [[Installing a plugin from the plugin library]] or [[Manually installing a plugin]]
''Important:''
* ''Elements lower in the list take precedence''
*Including a plugin as an ordinary tiddler by drag and drop into the browser, will result in the plugin only being active in the browser
** It will not be available under Node.js
Option 1:
* Using a Node.js configuration option 1 is the most common one
* It lowers maintenence, because all plugins can be updated in one go
Option 2:
* Option 2 is preferred if you want to work with a fixed configuration
* Plugin updates only effect the corresponding wiki
Option 3:
* This option allows to ''add and start'' an edition without the need to overwrite an existing `tiddlywiki.info` file
* It allows you to start any edition as a client-server edition, even if the tiddlywiki.info file didn't specify it.
Option 4:
* Is the exact same mechanism used for a single-file wiki
* This mechanism should only be used in a Node.js configuration for ''testing and debugging'' purposes, since the plugins are stored in the `tiddlers/` directory

View File

@ -1,9 +1,35 @@
created: 20161015113519246
modified: 20190927172743140
modified: 20220613123551803
tags: PluginMechanism
title: PluginFolders
type: text/vnd.tiddlywiki
! Working with Plugin Folders
* Arrange the [[PluginFolders]] containing the plugins in a convenient shared location
* Use [[environment variables|Environment Variables on Node.js]] to tell TiddlyWiki to search those folders.
*The plugins can be referenced in `tiddlywiki.info` by their name (e.g. `tiddlytools/magic`)
* Place the PluginFolders containing the plugins in a `plugins` folder within the [[wiki folder|TiddlyWikiFolders]]. TiddlyWiki will attempt to include every subfolder as a plugin. Do not add the plugin names to `tiddlywiki.info`. Do not add the PluginFolders under a specific namespace:
```
├── plugins/
│ ├── relink/
│ │ ├── js/
│ │ ├── tiddlers/
│ │ └── plugin.info
│ └── relink-markdown/
│ ├── js/
│ ├── plugin.info
│ └── readme.tid
├── tiddlers/
└── tiddlywiki.info
```
! Plugin.info File
On the server, plugins can be stored as ordinary JSON tiddlers but it is often more convenient to store them as separate tiddler files within folders. Plugin folders must contain a `plugin.info` file that contains the metadata for the plugin. It can also optionally identify files external to the plugin folder that should be loaded as tiddlers.
The `plugin.info` file should contain the following JSON structure:

View File

@ -1,18 +1,30 @@
created: 20140910215514237
modified: 20190108000000000
list: [[Installing a plugin from the plugin library]] [[Uninstalling a plugin]] [[Manually installing a plugin]] OfficialPlugins
modified: 20220617133819755
tags: Concepts TableOfContents
title: Plugins
type: text/vnd.tiddlywiki
Plugins in TiddlyWiki5 can be used to distribute optional components that customise and extend TiddlyWiki. You can install them from the [[official plugin library|Installing a plugin from the plugin library]] or from [[community sites|Resources]].
! Introduction
{{$:/core/ui/ControlPanel/Plugins/AddPlugins}}
Plugins in TiddlyWiki5 can be used to distribute optional components that customise and extend wiki. You can install them from the official plugin library or from community sites.
Internally, plugins are a bundle of tiddlers packaged together as a single tiddler that can be installed, copied or deleted as a unit. The individual tiddlers within a plugin appear as ShadowTiddlers. See the PluginMechanism discussion for more details about how plugins are implemented internally.
Internally, plugins are a bundle of tiddlers packaged together as a single tiddler that can be installed, copied, disabled or deleted as a unit. The individual tiddlers within a plugin appear as shadow tiddlers.
Plugins can contain JavaScript modules, style sheets, and templates. Plugins can also be used to distribute ordinary text, images or any other content.
Plugins can contain ~JavaScript modules, style sheets, and templates. Plugins can also be used to distribute ordinary text, images or any other content.
! Handling Plugins with a Single File Wiki
<<list-links "[tag[Plugins]]">>
<<list-links "[tag[Plugins]] -[has[draft.of]]">>
<$macrocall $name=".note" _="There is a plugin called $:/core that contains the main core code of ~TiddlyWiki. It is always present, and it is the source of default [[Shadow tiddlers|ShadowTiddlers]]. You can see the details of this in the <<.button control-panel>> on the <<.controlpanel-tab Plugins>> sub-tab.">
! Handling Plugins with a Client - Server Configuration (Node.js)
<<list-links "[tag[PluginsCS]] -[has[draft.of]]">>
! Plugin Mechanism
The PluginMechanism tiddler contains more details about how plugins are implemented internally.
You can open the plugin details in the <<controlPanel-plugin-link>> on the <<.controlpanel-tab Plugins>> sub-tab.
There is a plugin called $:/core that contains the main core code of TiddlyWiki. It is always present, and it is the source of default ShadowTiddlers.

View File

@ -1,40 +1,30 @@
created: 20160107222504269
modified: 20190927205509760
modified: 20220617132957241
tags: Plugins
title: Uninstalling a plugin
type: text/vnd.tiddlywiki
! Standalone Configuration
\rules except wikilink
Follow these instructions when using TiddlyWiki as a standalone HTML file:
If you want to follow the steps //side by side// you can <<open-tiddler-in-window>>.
Follow these instructions when using TiddlyWiki as a standalone, single file wiki.
# Create a backup of your current TiddlyWiki HTML file ([[just in case|The First Rule of Using TiddlyWiki]])
# Open the [[control panel|$:/ControlPanel]] and go to the ''Plugins'' tab
# Open the <<controlPanel-plugin-link>> and go to the ''Plugins'' tab
# Click on the plugin you want to delete to open it as a standalone tiddler
# Click the <<.icon $:/core/images/down-arrow>> ''more'' button and <<.icon $:/core/images/delete-button>> ''delete'' the tiddler
# Save your TiddlyWiki <<.icon $:/core/images/save-button>>
# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completely removes the plugin <<.icon $:/core/images/refresh-button>>
#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details
#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See [[PluginMechanism]] for more details
# The plugin should no longer be active or available
! Client-Server Configuration
Follow these instructions when using TiddlyWiki under Node.js:
# Quit the server if it is running
# Edit the `tiddlywiki.info` file (it is in JSON format) and locate the `plugins` and `themes` section (see below)
# Remove the entries corresponding to the plugins you wish to remove. Take care to retain commas to separate items, but do not terminate the last item in a list with a comma
# Restart the server
```
{
"plugins": [
"tiddlywiki/codemirror"
],
"themes": [
"tiddlywiki/vanilla",
"tiddlywiki/snowwhite"
]
}
```
<$macrocall $name=".note" _="""If you use TiddlyWiki with node.js have a closer look at [[Uninstalling a plugin with Node.js]]<br>An overview of working with plugins can be found at [[Plugins]]"""/>

View File

@ -1,5 +1,6 @@
code-body: yes
created: 20150117152612000
modified: 20211230150725145
modified: 20220617125128201
tags: $:/tags/Stylesheet
title: $:/editions/tw5.com/doc-styles
type: text/vnd.tiddlywiki

View File

@ -1,9 +1,46 @@
code-body: yes
created: 20150117184156000
modified: 20220227210152153
modified: 20220617122915793
tags: $:/tags/Macro
title: $:/editions/tw5.com/wikitext-macros
type: text/vnd.tiddlywiki
\define activatePluginTab()
<$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Plugins"/>
<$action-navigate $to="$:/ControlPanel"/>
\end
\define activateTiddlerWindow()
<$action-sendmessage $message="tm-open-window"
$param=<<currentTiddler>> windowTitle="Side by Side View"
width="800" height="600" />
\end
\define controlPanel-plugin-link()
<$button actions=<<activatePluginTab>> class="tc-btn-invisible tc-tiddlylink">
{{$:/core/images/options-button}} ~ControlPanel
</$button>
\end
\define open-tiddler-in-window()
<$button actions=<<activateTiddlerWindow>> class="tc-btn-invisible tc-tiddlylink">
open ''this'' tiddler in a new window
</$button>
\end
\define activateEditionWindow(url)
<$action-sendmessage $message="tm-open-external-window"
$param="""$url$""" windowName="_edition"
windowFeatures="width=800 height=600" />
\end
\define open-external-window(url)
<$button actions=<<activateEditionWindow """$url$""">> class="tc-btn-invisible tc-tiddlylink">
open the ''example edition'' in a new window
</$button>
\end
\define wikitext-example(src)
<div class="doc-example">
@ -64,5 +101,3 @@ $$$
<<tw-code $tiddler$>>
\end
<pre><$view field="text"/></pre>