1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 07:09:43 +02:00
documize/gui/app/components/section
Maximilian Bosch 444b4fd1f7
Render HTML in Markdown during previews as well
When having e.g. a markdown-based section in a document where you
reference another document, a HTML-link is generated. However when
previewing changes, the raw HTML is shown.

With setting `html: true` in the configuration for `markdownit`[1],
HTML is detected and properly parsed (Also markup tags such as `<h1>`
are rendered properly just like when using `blackfriday` to request a rendered
section).

Regarding probably harmful side-effects: setting e.g. `<style>* { display:
none !important; }</style>` causes a white page with `markdownit` as
well as with `blackfriday`. `<script>` tags aren't affected since
`handlebars` mostly breaks with `<script>` tags within variables that
are substituted using `{{{var}}}` into the DOM[3].

Please note that I didn't commit the modifications in `embed/bindata.go`
as it seemed to me after looking at the history that those updates are
only done when preparing a release.

[1] 1ad3aec204/lib/presets/default.js (L6-L9)
[2] https://github.com/documize/blackfriday/blob/master/markdown.go#L105-L146
[3] https://github.com/wycats/handlebars.js/issues/531
2019-08-01 21:02:35 +02:00
..
airtable upgraded Ember and Bootstrap, merged changes 2018-01-22 10:31:03 +00:00
code Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
flowchart Upgrade UI framework to Ember v3.10.0 2019-05-16 12:49:27 +01:00
gemini Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
github Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
jira Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
markdown Render HTML in Markdown during previews as well 2019-08-01 21:02:35 +02:00
papertrail Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
pdf Complete PDF section type 2019-04-19 11:30:40 +01:00
plantuml Resolve lint issues 2018-02-08 17:23:17 +00:00
table Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
tabular Upgrade to Tiny editor v5 2019-05-13 12:47:38 +01:00
trello Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
wysiwyg Fix TinyMCE toolbar 2019-05-16 11:14:34 +01:00
base-editor-inline.js Enable PDF section editor 2019-04-18 15:42:18 +01:00
base-editor.js Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
base-renderer.js upgraded Ember and integrated Bootstrap 4 2017-11-16 13:28:05 +00:00