sqlalchemy / mako

Mako Templates for Python
https://www.makotemplates.org
MIT License
353 stars 60 forks source link

Is there a WYSIWYG editor that supports mako? #382

Open oriolpiera opened 10 months ago

oriolpiera commented 10 months ago

I don't know if is the right place to put that question. I apologize if it is the case.

We use mako templates, but we are affraid of users to beak python code in the template, so we edit all the changes in the template (even typos).

So, are there some WYSIWYG web editors (like CKEditor) that supports mako template language, to block edition of mako tags <% %> and allow to modify all other html text?

Thanks,

zzzeek commented 10 months ago

I'm not familiar with a tool like that. Truth be told this seems like you would do better with jinja templates instead, which have very limited logic within them. Mako as you might have noticed is pretty niche at this point :)

jvanasco commented 6 months ago

I suggest using Dust. It's originally a javascript templating library, but is implemented in Python via Ashes for serverside rendering. I have a few projects where user-generated dust templates are rendered in Ashes and the output is placed into Mako templates. I believe some WYSIWYG editors supported it, and others had hooks to support it.