EditorJS 1.0.1.5
This package was the initial publish and the README.md did not reflect the intention of the first release.
See the version list below for details.
dotnet add package EditorJS --version 1.0.1.5
NuGet\Install-Package EditorJS -Version 1.0.1.5
<PackageReference Include="EditorJS" Version="1.0.1.5" />
paket add EditorJS --version 1.0.1.5
#r "nuget: EditorJS, 1.0.1.5"
// Install EditorJS as a Cake Addin #addin nuget:?package=EditorJS&version=1.0.1.5 // Install EditorJS as a Cake Tool #tool nuget:?package=EditorJS&version=1.0.1.5
Blazor / EditorJS
A Blazor component implementation for EditorJS.io a block styled editor.
@using EditorJS
<Editor Id="editorjs-blazor" Name="editorjs-blazor" Value="EditorValue" ValueChanged="OnEditorValueChanged" Tools="EditorTools" Style="margin-top: 20px; border: thin dashed grey; padding: 0 20px 0 20px;" />
The value EdtorTools
is a csharp JsonObject containing the following in the code-behind:
string editor_tools_json = """
{"Header":{"LoadActions":{"OptionsNamingScheme":"CamelCase"}},"LinkTool":{"LoadActions":{"OptionsNamingScheme":"CamelCase"}},"NestedList":{"LoadActions":{"OptionsNamingScheme":"CamelCase","OverrideOptionsKey":"list"}},"Marker":{"LoadActions":{"OptionsNamingScheme":"CamelCase"}},"Warning":{"LoadActions":{"OptionsNamingScheme":"CamelCase"}},"Checklist":{"LoadActions":{"OptionsNamingScheme":"CamelCase"}},"CodeTool":{"LoadActions":{"OptionsNamingScheme":"CamelCase","OverrideOptionsKey":"code"}},"Delimiter":{"LoadActions":{"OptionsNamingScheme":"CamelCase"}},"SimpleImage":{"LoadActions":{"OptionsNamingScheme":"CamelCase","OverrideOptionsKey":"image"}},"Embed":{"LoadActions":{"OptionsNamingScheme":"CamelCase"},"options":{"config":{"services":{"instagram":true,"youtube":true,"vimeo":true,"imgur":true,"twitter":true,"facebook":true}}}},"InlineCode":{"LoadActions":{"OptionsNamingScheme":"CamelCase"}},"Quote":{"LoadActions":{"OptionsNamingScheme":"CamelCase"}},"Table":{"LoadActions":{"OptionsNamingScheme":"CamelCase"}}}
""";
EditorTools = JsonObject.Parse(editor_tools_json)?.AsObject() ?? new();
To load all the available plugins (bundled)
<script src="/_content/EditorJs/lib/editorjs-bundle.js" asp-append-version="true"></script>
Or load only the plugins that is required (editorjs/dist/editor.js mandatory)
<script src="/_content/EditorJs/lib/editorjs/editorjs/dist/editor.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/checklist/dist/bundle.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/code/dist/bundle.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/delimiter/dist/bundle.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/embed/dist/bundle.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/header/dist/bundle.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/nested-list/dist/bundle.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/inline-code/dist/bundle.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/marker/dist/bundle.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/quote/dist/bundle.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/simple-image/dist/bundle.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/table/dist/table.js" asp-append-version="true"></script>
<script src="/_content/EditorJs/lib/editorjs/warning/dist/bundle.js" asp-append-version="true"></script>
Supporting tool loading options from component
{
"LinkTool": {
"LoadActions": {
"LoadProviderClassFunctionDefault": "LinkTool", // This can just be null or undefined, if you want to use the provider options below. Otherwise this value will override the options by looking in the browser's DOM for that existing value.
"OptionsNamingScheme": "CamelCase", // PascalCase and SnakeCase // this will convert the class name, the root name identifier here is "LinkTool", and convert this in the string name that is used as the key for the final configuration options.
"OverrideOptionsKey": "linkTools" // When not null this will override the `OptionsNamingScheme` and the value coming in from the root name identifier, and use this exactly how it is defined here.
},
"options": null
}
}
With the above config, the output might look a litle like this:
{
"linkTools": {
"Class": LinkTool
}
}
{
"List": {
"LoadActions": {
"OptionsNamingScheme": "CamelCase"
},
"options": {
"inlineToolbar": true,
"shortcut": "CMD+SHIFT+L"
}
}
}
With the above config, the output might look a litle like this:
{
"list": {
"Class": List,
"inlineToolbar": true,
"shortcut": "CMD+SHIFT+L"
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net7.0
- Microsoft.AspNetCore.Components.Web (>= 7.0.2)
- Microsoft.Web.LibraryManager.Build (>= 2.1.175)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.2.0.22 | 231 | 7/17/2024 | |
1.2.0.1 | 267 | 2/11/2024 | |
1.0.1.17 | 356 | 11/26/2023 | |
1.0.1.16 | 156 | 11/24/2023 | |
1.0.1.15 | 161 | 11/24/2023 | |
1.0.1.14 | 144 | 11/21/2023 | |
1.0.1.13 | 133 | 11/21/2023 | |
1.0.1.12 | 180 | 11/21/2023 | |
1.0.1.11 | 163 | 11/10/2023 | |
1.0.1.10 | 414 | 1/21/2023 | |
1.0.1.9 | 311 | 1/21/2023 | |
1.0.1.8 | 377 | 1/21/2023 | |
1.0.1.7 | 369 | 1/21/2023 | |
1.0.1.6 | 335 | 1/20/2023 | |
1.0.1.5 | 334 | 1/20/2023 |