Plugins
dmarcuse opened this issue · 8 comments
Would be nice to have a kst/plugins
folder. Scripts would be loaded from it with access to some of the kristscape APIs to change behavior.
they should be able to add new tags tho, which might mean a need to change the way tags are handled (changing to a callback like registration of tags)
Time for another full rewrite?
only of ksml.lua
if we would go with a addTag("media",function(...) print(...) end)
design
That wouldn't require a full rewrite, even if they did add new tags. Which I think is sort of silly anyways - Chrome/Firefox plugins don't add tags to HTML.
i'm quite sure that they atleast extend a "object" tag or something a long those lines
If we went down that route, we could reserve a tag to hold data for plugins to parse, e.g. [META:<pluginname>]<plugindata>[/META]
So for a plugin that draws in big letters, we could do: [META:BIGFONT]Hello world![/META]
and the theoretical BIGFONT plugin would write Hello world! in big letters if it were installed
that would probably be a lot better than separate tags
We should put an [NOPLUG:<name>]
tag in, which can contain ksml that's only run when the plugin is missing, like this:
[KSML] [TITLE]My site![/TITLE] [NOPLUG:BIGFONT] You need to have bigfont installed! [/KSML] [/NOPLUG] [META:BIGFONT]Hello World![/META] [/KSML]