typemill / typemill

Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible website and eBook creation using Markdown.
https://typemill.net
MIT License
427 stars 60 forks source link

Allow other url-schemes #123

Closed Tekl closed 3 years ago

Tekl commented 4 years ago

Hi,

I want to use some URLs like this: dict://Workload. This url scheme is registered for the Dictionary Application from macOS. Is there a way to configure the allowed schemes?

trendschau commented 4 years ago

unfortunately that is not possible and i won't implement something like that for Typemill.

But you can have a look into issue #72 As a quick idea: You can try to create a plugin, extend the slim-class URI and then manipulate the scheme. https://github.com/slimphp/Slim/blob/3.x/Slim/Http/Uri.php

Not sure if that works but maybe worth a try...

Tekl commented 4 years ago

Thanks for you answer. Creating a plugin is out of my reach at the moment. :-( I also tried to enter plain HTML but that seems not to be allowed in Typemill, right?

trendschau commented 3 years ago

Sorry, reading this again I misunderstood your issue: You want to enter an outside link to dict://... correct? That is not too hard, you have to extend the whitelist for links of the markdown parser (parsedown). https://github.com/parsedown/parsedown/blob/master/Parsedown.php

I can extend it for release 1.4.1 if it is still needed.

Tekl commented 3 years ago

A prebuild addition to the whitelist would be nice. If I do it myself is there a way to alter the whitelist without modifing the Parsedown.php? Otherwise I've to remember to alter the files with every update.

trendschau commented 3 years ago

I think it is possible as an additional developer setting, I will try.

trendschau commented 3 years ago

I had to postpone it, will try to implement with version 1.4.2

trendschau commented 3 years ago

published with version 1.4.2