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

how to use html / iframe in page editor? #300

Closed turbopixel closed 2 years ago

turbopixel commented 2 years ago

I want to insert a google maps iframe into my page content. But how?

grafik

maybe a feature request: add a iframe (like youtube)

grafik

trendschau commented 2 years ago

Hi Nico, the editor only accepts pure markdown, no html, and the markdown parser (parsedown) is used with safe mode (see here: https://github.com/erusev/parsedown#security).

But you could write a small plugin to integrate maps with the new shortcode-feature.

turbopixel commented 2 years ago

Hi Sebastian, I create a google maps plugin: https://github.com/turbopixel/typemill-googlemaps. Works fine!

Do you want to share the plugin in your plugin directory? (https://plugins.typemill.net/)

trendschau commented 2 years ago

Hi Nico,

very cool, I tested it and it works fine, I will add it to the directory this evening or tomorrow !!!

trendschau commented 2 years ago

It is live now: https://plugins.typemill.net/

jasonday commented 1 year ago

@trendschau I do think it would be useful to have the HTML sanitization be user configurable (on/off) for those of use that are operating our own site. I realize I can achieve a two column layout with shortcodes, but it's a bit clunky

trendschau commented 1 year ago

I thought about it, but the htmlpurifier is nearly as large as typemill and I don't want to add a big library like that to the typemill core. I am also not super happy to switch off the safemode for the markdown parser. I will think about it again in Typemill V2. Maybe there is a way to allow html tags and to add the purifier with a plugin then.