TightWiki.Plugin
2.34.3
See the version list below for details.
dotnet add package TightWiki.Plugin --version 2.34.3
NuGet\Install-Package TightWiki.Plugin -Version 2.34.3
<PackageReference Include="TightWiki.Plugin" Version="2.34.3" />
<PackageVersion Include="TightWiki.Plugin" Version="2.34.3" />
<PackageReference Include="TightWiki.Plugin" />
paket add TightWiki.Plugin --version 2.34.3
#r "nuget: TightWiki.Plugin, 2.34.3"
#:package TightWiki.Plugin@2.34.3
#addin nuget:?package=TightWiki.Plugin&version=2.34.3
#tool nuget:?package=TightWiki.Plugin&version=2.34.3
TightWiki.Plugin
TightWiki.Plugin is a package that provides boilerplate artifacts for the TightWiki plugins.
It allows developers to create and integrate custom plugins to extend the functionality of TightWiki.
Installation
Plugins built (the .DLL) needs to be placed into the Plugins folder of the TightWiki installation directory. After placing the plugin, it will be automatically loaded by TightWiki when the site is next started.
Usage
Decorate your class with the TwPlugin attribute to define a plugin, and decorate your methods with the one of the TightWiki function attributes to define functions that can be called from TightWiki pages.
[TwPlugin("My Custom Plugin", "Custom functions written by me.", 1)]
public class MyCustomPlugin
{
[TwStandardFunctionPlugin("Hello function", "Writes hello to the page.", 1)]
public async Task<TwPluginResult> HelloWorld(ITwEngineState state, int count)
{
var stringBuilder = new StringBuilder();
for(int i = 0; i < count; i++)
{
stringBuilder.AppendLine($"Hello World {i + 1}!");
}
return new TwPluginResult(stringBuilder.ToString());
}
}
Method Attributes
Functions
- TwPostProcessingInstructionFunctionPlugin
- Function called when a post-processing instruction has been parsed in the wiki markup.
- TwProcessingInstructionFunctionPlugin
- Function called when a processing instruction has been parsed in the wiki markup.
- TwScopeFunctionPlugin
- Function called when a scope function has been parsed in the wiki markup.
- TwStandardFunctionPlugin
- Function called when a standard function has been parsed in the wiki markup.
Handlers
- TwCommentPluginHandler
- Function called when a comment has been parsed in the wiki markup.
- TwCompletionPluginHandler
- Function called when the wiki engine has completed processing a page.
- TwEmojiPluginHandler
- Function called when an emoji has been parsed in the wiki markup.
- TwExceptionPluginHandler
- Function called when an exception has been encountered during processing.
- TwExternalLinkPluginHandler
- Function called when an external link has been parsed in the wiki markup.
- TwHeadingPluginHandler
- Function called when a heading has been parsed in the wiki markup.
- TwInternalLinkPluginHandler
- Function called when an internal link has been parsed in the wiki markup.
- TwMarkupPluginHandler
- Function called when a markup element has been parsed in the wiki markup.
Contributing
Contributions to TightWiki.Plugin are welcome! If you have an idea for a new feature or have found a bug, please open an issue or submit a pull request on the GitHub repository.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Magick.NET-Q16-AnyCPU (>= 14.11.1)
- Microsoft.AspNetCore.Html.Abstractions (>= 2.3.9)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.9)
- Microsoft.AspNetCore.Http.Features (>= 5.0.17)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 10.0.5)
- Microsoft.Extensions.Localization (>= 10.0.5)
- NTDLS.Helpers (>= 1.3.19)
- NTDLS.SqliteDapperWrapper (>= 1.4.2)
- SixLabors.ImageSharp (>= 3.1.12)
- System.Runtime.Caching (>= 10.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release.