From 461e988aa2ade941cfb95fb1562eb9254e59ae6c Mon Sep 17 00:00:00 2001 From: Juri Leino Date: Sat, 12 Jul 2025 16:49:50 +0000 Subject: [PATCH] feat(editor): allow setting of schema attribute refs #60 adding ```json { "features": { "schema": "url/to/myschema.json" } } ``` will add the schema attribute to the jinn-tap element and load it. --- profiles/jinntap/templates/editor.html | 59 +++++++++++++++++++------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/profiles/jinntap/templates/editor.html b/profiles/jinntap/templates/editor.html index e4940b6a..262ee25c 100644 --- a/profiles/jinntap/templates/editor.html +++ b/profiles/jinntap/templates/editor.html @@ -10,10 +10,10 @@ }, "register": { "enabled": false - }, - "metadata-editor": { - "enabled": true - } + }, + "metadata-editor": { + "enabled": true + } }, "templating": { "extends": "templates/layouts/base.html", @@ -141,22 +141,36 @@ - + [% endtemplate %] - [% template after %] -
- [% endtemplate %] + [% template after %] +
+ [% endtemplate %]
[% let $url = if (map:contains($context, 'doc')) then $context-path || "/api/document/" || $context?doc?path else () %] - [% if $features?collab?enable %] + [% if ($features?collab?enable and $features?schema) %] + + +
  • + + + +
  • +
  • + + + +
  • +
    + [% elif $features?collab?enable %] + token="[[ jt:jwt-token() ]]" server="[[ $features?collab?server ]]" sidebar="#attributes-panel">
  • @@ -168,11 +182,24 @@
  • -
    + + [% elif $features?schema %] + + +
  • + + + +
  • +
  • + + + +
  • +
    [% else %] - +