SafeLearn Formatter

by UnterrainerInformatik
5
4
3
2
1
Score: 35/100

Description

Category: Learning & Knowledge Management

The SafeLearn plugin improves the editing experience when working with SafeLearn specific Markdown tags by adding clear visual cues. It highlights fragments that will appear incrementally in Reveal.js slides, making it easier to design step by step presentations. Permission blocks, marked for roles such as teachers or specific groups, are visually wrapped so they stand out while writing, helping authors keep track of content visibility. The plugin also enables side by side layouts for creating multicolumn slides, which is particularly useful for wide or comparative presentations. While it does not enforce permissions itself, it mirrors how SafeLearn will render content, giving authors immediate visual feedback inside their notes.

Reviews

No reviews yet.

Stats

1
stars
318
downloads
0
forks
372
days
0
days
0
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
3
total issues
3
open issues
0
closed issues
33
commits

RequirementsExperimental

Latest Version

18 hours ago

Changelog

Logging in could stop working, permanently, on a realm whose sessions are configured a certain way — and it stopped before you had typed anything. The browser opened on the sign-in page, the status bar said Logging in since …, and the plugin immediately reported that nothing came back. When the sign-in did complete, the answer was a login already given up on. Both messages pointed at the browser, which had done nothing wrong.

The plugin was giving a login in progress as long as the realm's last token response said a refresh token would live. That figure is not a measure of how long a person takes at a login page — near the end of a session Keycloak answers it with the seconds that are left, and one installation ended up storing 1. Every login was then over on the first tick after the browser opened, and nothing could overwrite the figure, because only a successful login would have.

A login now gets ten minutes, decided by the plugin and by nothing else: enough for a password, a second factor, and a moment of finding the phone the second factor is on.

If logging in had stopped working for you, updating is the whole fix. There is nothing to reset and nothing to configure — the stored figure is no longer consulted at all.

Also in this release: with Debug logging switched on, the login itself now shows up in the developer console — a login starting and the deadline it was given, a login ending at that deadline, and a callback arriving with what became of it. Enough to read the next problem of this shape off the log instead of reconstructing it. The values that tie a callback to its login are truncated, so a log stays safe to send to somebody while a login may still be in flight.

README file from

Github

SafeLearn Formatter for Obsidian

Shows what SafeLearn will do with your document while you write it.

SafeLearn is an open-source server that publishes a teacher's Markdown behind a school login. It reads a few tags of its own — who may read a block, what appears step by step in a presentation, what stands in columns. Those tags are instructions to the server, not text anyone is meant to read. This plugin takes them out of the way and puts what they mean in their place. It never changes your file.

GitHub Repo

Install

Settings → Community pluginsBrowse → search for SafeLearn FormatterInstall, then Enable.

Nothing to configure to use the tags below. The directory features further down are opt-in and need a safeLearn instance; everything else works with no settings, no account and no network.

Write the tags from the menu

Right-click in the editor and open SafeLearn. The same commands are in the command palette, under SafeLearn Formatter.

The editor's context menu

Command What it writes
Side-by-side block Two columns.
Side-by-side, n columns… Asks how many, defaults to three.
Fragment marker ##fragment above the block the cursor is in.
Semester table… Asks for a span, the weekdays the class meets and the subject columns, and writes a dated row for every lesson.
Restricted section per name… One restricted block per name — paste a class list.
Restrict selection… Wraps the selection in a directive.

With text selected, a side-by-side command encloses it whole and puts the separator after it. Every marker lands on a line of its own.

Restricted blocks — @@@

@@@ teacher opens a block only that reader sees, @@@ on its own closes it. The directive line stands as the block's heading, and every entry in it is shown as what it is:

Restricted blocks in the editor

Marking Meaning
Plain chip A permanent grant.
Dashed chip, stopwatch Carries a time window — the block appears or disappears with nobody editing it. It never changes with the clock: a window that has closed looks like one that has not opened.
Red chip, warning A window SafeLearn cannot read. It drops the window and keeps the entry, so the block is granted permanently. Nothing else anywhere tells you.
Italic chip, arrows A view switch (#exam, #practice, #answer) — a variant of the document, not an audience.
Struck through An entry SafeLearn discards entirely.

Windows are reproduced exactly as you wrote them, never restated in words — a readable restatement would make a window sound that the server throws away.

Put the cursor in the line and the characters are back, editable, while the other blocks keep their headings:

The directive line with the cursor in it

A directive on the first line gates the whole file. It has no closing marker, so its frame is drawn with the lower edge left off:

A whole-file directive

Reading view: the tags are gone, the headings remain.

Restricted blocks in the reading view

A section per student

Restricted section per name… takes a pasted class list and writes one block per person, each with a heading inside the block — a heading above it would show every student the names of all the others.

The class list dialog

The sections it writes

Five names are reserved (admin, teacher, teachers, student, students): SafeLearn reads them as roles, so a section for a student called Students is read by the whole school. The command writes your names unchanged and tells you when one of them was such a name.

Picking names from the directory

Restricted section per name… and Restrict selection… both open the same dialog, and where a safeLearn instance is configured and you are logged in, that dialog is a picker rather than a text area. Typing in the search field searches the school directory; typing in the class filter narrows a list of classes to check, and checking more than one shows matches from any of them.

Click anybody in the results to move them into the chosen list below, and click Add visible to move over everybody the results are currently showing in one action — which is how you take a whole class, however many people are in it. The chosen list is what gets inserted, and it is visible the whole time: click somebody there to take them back out, and somebody chosen under a filter that no longer shows them stays on it, counted, rather than disappearing. Choosing the same person twice leaves them on it once.

Somebody the directory has no entry for — a guest, or a student not yet enrolled — is written into the document afterwards rather than typed into the dialog.

If the directory cannot be reached, or a search fails on the server, this is shown above the search field as soon as it happens rather than looking like an empty match, and the plain text area appears below the picker so the dialog can still be answered.

With no instance configured, or with one configured but not logged in, this dialog is unchanged: the text area alone, one name per line, no search field and no network activity.

Directory settings and login

Open under Settings → SafeLearn Formatter.

Setting What it's for
safeLearn instance URL Your school's safeLearn server. Empty by default — everything below stays off until it is set.
Keycloak URL / Realm The identity provider your instance authenticates against. Both default to the project's shared identity provider and only need changing for a self-hosted Keycloak.
Log in Opens your realm's own login page in your system browser. No password is ever typed into Obsidian — the plugin only ever sees the token Keycloak hands back afterward.
Log out Discards that token.

Logging in also enables List classes in the command palette — a read-only, dismiss-when-read notice of every class-like value currently in the directory. (The server has no separate notion of "class" from any other role or group it tracks, so this is a best-effort reading of the same data the picker above uses, not an authoritative class list.)

Setting up the login (for whoever runs the safeLearn instance)

Logging in needs a Keycloak client that does not exist by default. In the safeLearn realm, create a public client (this project's own convention names it safelearn-plugin) with:

  • Standard Flow enabled, PKCE (S256) required
  • Direct Access Grants off — no password grant
  • No client secret
  • Valid Redirect URIs: obsidian://safelearn-formatter-auth
  • No client roles of its own — what a login is allowed to do comes from the roles already on that person's Keycloak account, the same way the safeLearn server itself checks them
  • Full Scope Allowed — so a role held as a client role on the main safeLearn client (e.g. admin) reaches this client's tokens too, without maintaining it a second time here
  • The same client scope that carries the ldap attribute mapper on the main safeLearn client, assigned to this client as well. It is a custom mapper, not part of Keycloak's default roles scope, so it is not picked up by Full Scope Allowed and has to be added explicitly — otherwise a person whose teacher/admin role comes only from the LDAP OU=... claim (the common case) passes login but the directory picker and "List classes" stay empty with no error shown, because the server's role check reads that claim the same way deriveRoles does for every other login

This is a one-time setup step for the person administering the Keycloak realm, not something the plugin or a person using it can do. Nobody using only the tags earlier in this document needs it.

Fragments — ##fragment

Content that appears one step at a time in a Reveal.js presentation. The tag is shown as an icon, and is its own characters again with the cursor in it.

Fragment markers in the editor

Columns — ##side-by-side-start

The block is drawn as the region it is while you write, and rebuilt as the columns the server makes of it when you read. (The widths are not Reveal's and are not meant to be.)

A side-by-side block in the editor

The same block in the reading view

Good to know

  • Obsidian 1.5.7 or later. No external dependencies, desktop and mobile.
  • The plugin enforces nothing. It is purely visual — every permission is decided by your SafeLearn server.
  • It marks exactly what the server acts on, no more: the rules are taken from SafeLearn's own parser, and a check in the SafeLearn repository runs both over the same directives. From a SafeLearn checkout: npm run test:obsidian.

License

The Unlicense

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Frontmatter Tag Sugest
5 years ago by Jonathan Miller
Autocompletes tags in Obsidian YAML frontmatter. No more deleting #!
AutoMOC
4 years ago by Diego Alcantara
FuzzyTag
4 years ago by Adrian
Base Tag Renderer
4 years ago by Darren Kuro
A lightweight obsidian plugin to render the basename of tags in preview mode.
Canvas Filter
4 years ago by Ivan Koshelev
Obsidian Canvas plugin that let's you show only pages / arrows with specific tags / colors / connections.
Reading comments
4 years ago by BumbrT
Reading comments, for consuming books or large articles in markdown with https://obsidian.md/.
Testing Vault
3 years ago by Michael Pedersen
Auto Classifier
3 years ago by Hyeonseo Nam
Auto classification plugin for Obsidian using ChatGPT.
EmoTagsTitler
3 years ago by Cyfine
Colored Tags
3 years ago by Pavel Frankov
Colorizes tags in different colors.
Multi Tag
3 years ago by fez-github
Obsidian plugin that allows the user to add a tag to all files in a folder. Not in active development. Now working on Multi-Properties, which covers most of this plugin's functionality.
Nested tags graph
3 years ago by drpilman
A small plugin for Obsidian that links nested tags in graph view
Tag Page
3 years ago by Matthew Sumpter
An Obsidian plugin to create and manage dedicated Markdown pages for tags, with features to automatically populate and refresh content based on user-defined settings.
Tags Overview
3 years ago by Christian Wannerstedt
Obsidian plugin which adds an extended tags panel where tagged files can be overviewed, filtered and accessed in an easy way.
Tag Breakdown Generator
3 years ago by Hananoshika Yomaru
Break down nested tags into multiple parent tags
Quick Tagger
3 years ago by Gorkycreator
Quick tagger for Obsidian.md
Colored Tags Wrangler
3 years ago by AndreasSasDev
Obsidian Plugin : Assign colors to tags. Has integrations with other plugins, like Kanban.
Tag Buddy
3 years ago by David Fasullo
Unlock powerful tag editing features in Reading Mode. Add, remove and edit tags across your vault. Use tag inboxes to level up any workflow with a powerful idea assembly line.
Smart Title
3 years ago by magooup
obsidian-plugin-smart-title
Tag Formatter
3 years ago by snsvrno
Configurable Obsidian plugin that hides parent tags.
Tag Links
2 years ago by Zacchary Dempsey-Plante
A plugin for Obsidian that allows tags to be opened as links using a hotkey.
Folder by tags distributor
2 years ago by RevoTale
Automatically group Obsidian notes into folder by tags specified in note.
Index Notes
2 years ago by Alejandro Daniel Noel
Plugin that automatically generates index blocks based on tags
Tags Routes
2 years ago by Ken
This is a plugin for obsidian, to visualize files and tags as nodes in 3D graph.
Note 2 Tag Generator
2 years ago by Augustin
Note Reviewer
2 years ago by Travis Linkey
An obsidian plugin to help review notes that have been taken
Tag Wrangler
6 years ago by PJ Eby
Rename, merge, toggle, and search tags from the Obsidian tag pane
Collapse All
5 years ago by Nathonius
Liquid Templates
5 years ago by Diomede Tripicchio
Define your templates with LiquidJS tags support
MetaEdit
5 years ago by Christian B. B. Houmann
MetaEdit for Obsidian
HTML Tags Autocomplete
5 years ago by bicarlsen
Autocomplete HTML formatting tags.
Metadata Auto Classifier
2 years ago by Beomsu Koh
AI-powered Obsidian plugin that automatically classifies and generates metadata (tags, frontmatter) for your notes.
Insta TOC
2 years ago by Nick C.
Generate, update, and maintain a table of contents for your notes while typing in real time.
Current File Tags
2 years ago by Trung Tran
Media Companion
2 years ago by Nick de Bruin
Generate Timeline
a year ago by Shanshuimei
An obsidian plugin to generate timelines from tags, folders, files or metadata automatically. 根据标签,文件夹,文件或者属性自动生成时间轴的插件。
Private Mode
a year ago by markusmo3
Related Notes by Tag
a year ago by Chris Howard
displays notes that share tags with your currently active note
Auto Close Tags
a year ago by k0src
Obsidian MD plugin to auto-close HTML tags.
QuickLink
a year ago by Jamba Hailar
On obsidian, use @ to quickly link files
Tag Group Manager
10 months ago by Stargazer-cc
Tag Group Manager is a plugin designed for Obsidian that helps manage tag groups and quickly insert tags.
Tag Timer
9 months ago by quantavil
The Tag Timer is a versatile plugin for Obsidian that allows you to seamlessly track the time you spend on specific tasks or sections within your notes.