Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using HTML inline #109

Closed
ghost opened this issue Apr 10, 2020 · 5 comments
Closed

Using HTML inline #109

ghost opened this issue Apr 10, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Apr 10, 2020

Proposition closed. Finis.

@trendschau
Copy link
Member

trendschau commented Apr 11, 2020

Sorry, not sure what you mean exactly. The theme's custom css-field is for css only, of course. Do you mean the content-area with the raw markdown mode?

The library is capable of html as it is specified by markdown. But in Typemill this feature is turned off because of security concerns. To enable html in markdown editor, I have to do a lot of sanitizing.

There was a discussion about it in issue #83 already.

I have it on my list, together with a div-component to create custom elements. But both is low prio. Usually you should do all the html-markup and coding in the theme-files, not in the content area. As a dirty solution I could implement a html-on-setting without sanitizing, but I would add that only in the yaml-file, not in the admin-ui, so people who use it know what they do.

@ghost
Copy link
Author

ghost commented Apr 11, 2020

Thanks for responding quickly.
In the content area I would like to use html classes on the fly as the markdown seems not to support identation (typografical issue), centered, colouring of words or phrases, for example. This is sometimes essential for book pages.
Any chances to solve this?

@trendschau
Copy link
Member

Yes, that is indeed not supported by Markdown, there are other markup-languages like textile or restructuredText (?) that support formattings like that.

Typemill uses the safe mode for parsedown. There are two places in the code where it is activated. You can try to uncomment them as a quick workaround, but I am not sure if there are other places where html-input is checked again.

I can have a look into it for the next release and if it is easy, I can add a yaml-setting like described as a dirty and unsecure solution. I do not want to integrate html in the core of Typemill because you need an extra library like htmlpurifier to make it secure. This adds a lot of code and complexity that I do not want.

Maybe I can change the code in a way that someone can create a plugin to add htmlpurification for people who need that.

@trendschau trendschau added this to the 1.3.5 Consolidation milestone Apr 11, 2020
@timwasson
Copy link

Plus one to allow HTML inside content written in Typemill, whether that is allowed via yml or a setting in the UI, it'd allow a lot more advanced flexibility in editing content.

@trendschau
Copy link
Member

there is/was a html open/close plugin for typemill. I will think about a simple way to add tags in a different way. As I said, security concerns are more important and htmlpurifier is simply too big to add it to the core of Typemill. Not on my roadmap right now but contributions or plugins are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants