Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Standard Notes Blazor WASM editor template

License

Notifications You must be signed in to change notification settings

crookm/sn-blazor-editor-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: This project no longer works, as Standard Notes containerised the frame in which editor extensions are loaded (as of ~August 2023). This prevents Blazor WASM from using the cache, which it does so explicitly during boot with no way of turning it off (that I am aware of).

If these limitations change at any point (either by SN or by Blazor), I will update this project to work again.

Standard Notes Blazor Editor Template

This template repository contains the framework for building a Standard Notes editor using Blazor WebAssembly, a .NET web application framework.

Getting started

Requirements

  • .NET 8 SDK
  • Node v20+ (LTS)

To get started with this repo, fork or click the 'use template' button at the top of the Github page to create a copy for you to modify.

Modify the extension definition in the file src/StandardNotesEditor.App/wwwroot/ext.json to suit your project (identifier, name, and version will likely need to be adjusted).

Build and run the StandardNotesEditor.App project, and browse to http://localhost:5207 to see a limited preview outside of the Standard Notes app. To view within the app, browse to settings > plugins > install custom plugin (at the bottom of the list). Input the address http://localhost:5207/ext.json into the input box and click install. When editing a note, selecting an editor should display your new extension in the list.

Depending on how your editor is storing data, you may wish to change plaintext to html or json on L36 of src/StandardNotesEditor.App/frontend/src/index.js.

Notable files

  • src/StandardNotesEditor.App/Pages/Index.razor

    • Contains the editor elements and the trigger to save the note content
  • src/StandardNotesEditor.App/Services/NoteService.cs

    • Contains the code which bridges between .NET and JS
  • src/StandardNotesEditor.App/frontend/src/index.js

    • Contains the code which interacts with the Standard Notes editor API
  • src/StandardNotesEditor.App/frontend/src/stylesheet.scss

    • Contains the global styles for the application, including the Standard Notes stylekit
  • src/StandardNotesEditor.App/wwwroot/ext.json

    • Contains the definition of the Standard Notes extension, which will need to be modified to suit your project

Publishing

Please refer to the Standard Notes documentation for information about publishing your editor.

Contributing

Contributions to this project are welcome, please create an issue to propose any changes before opening a pull request.

Note that all changes must be licensed under the AGPL-3.0 license, as this project integrates with the Standard Notes APIs and SDKs, which make use of this license.

About

Standard Notes Blazor WASM editor template

Resources

License

Stars

Watchers

Forks

Releases

No releases published