Repository navigation
Add how-to: Writing your own plug-ins, and a Plug-ins reference - #138
Merged
Merged
Conversation
A quick reference for extending Fontra: the two kinds of plug-ins (editor plug-ins in JavaScript, server plug-ins through entry points), how the editor loads a plug-in, a boilerplate sidebar panel, an undoable edit, a visualization layer and an edit tool, with the Reference font panel, Fontra Hive, fontra-glyphs and fontra-rcjk as examples, and the current limitations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dooi2T8UfPUkFLghsNJJ6A
- Caching: Fontra dates static files at server start and answers 304, so edits under /localplugins/ need a restart or "Disable cache". - fontra.views is informational only (listed in Server info). - fontra.webcontent serves a fixed set of file extensions. - src/fontra/localplugins/ must be created in a fresh checkout. - zIndex range is 0–700; glyphsBySelectionMode also has `notediting`. - Note that the open sidebar tab is restored before plug-ins load. - order 4801, between Draw and Documentation like the listing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nf3n8emopjyVojDEVQHXNN
Information-oriented counterpart of the how-to: plugin.json keys, address rules and localStorage key, loading sequence and errors, the editor object, the sidebar panel, edit tool and visualization layer contracts, and the server entry-point groups. Listed in the Reference index; the how-to links to it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nf3n8emopjyVojDEVQHXNN
…es yes, github.com and raw no) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxEmy3FvG5zLs8YjwYnVyp
…jsDelivr needs a tag, what fails and how) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxEmy3FvG5zLs8YjwYnVyp
… lower case Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxEmy3FvG5zLs8YjwYnVyp
…ge after tagging Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxEmy3FvG5zLs8YjwYnVyp
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxEmy3FvG5zLs8YjwYnVyp
Member
|
@JeremieHornus, I am not sure why publishing with GH pages is recommended on this page. It is not needed to get a working plugin. We tested the initial proof of concept from Fatih: https://github.com/fatih-erikli/fontra-plugin-demo. Using the GH path to the repo is enough, in this case This demo now fails for other reasons (it was made before Fontra was bundled with webpack), but from the error you can see that loading the plugin does work: it fails on an import in the start script. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A quick reference for extending Fontra, in two pages:
How-to › Extending Fontra › Writing your own plug-ins: the two kinds of plug-ins (editor plug-ins in JavaScript, server plug-ins through entry points), how the editor loads a plug-in, a boilerplate sidebar panel to copy, then an undoable edit, a visualization layer and an edit tool, with the Reference font panel, Fontra Hive, fontra-glyphs and fontra-rcjk as examples, and the current limitations.
Reference › Plug-ins: the facts only — plugin.json keys, address rules, loading sequence and console errors, the editor object, the panel / tool / layer contracts, and the entry-point groups.