Feature Request: Pre-render hook
JohnArrowwood opened this issue · comments
I need to be able to hook into the preview of the contents, and interpolate values before the Markdown is interpreted.
For example, if the contents looks something like this:
This is my little document, and {{variable}}
should be replaced with the contents of `variable`
Then I want the value of {{variable}}
to be interpolated to <span class=variable-value>theValue</span>
before the Markdown processing begins.
I'd like to request the ability to specify [preRender]="myFilter"
to have my function called on the value of the markdown text prior to passing it to the markdown renderer.
I will consider this carefully.
I will support this feature soon
@JohnArrowwood Please use ngx-makdown-editor@1.1.6
Usage:
[preRender]="preRender"
preRender(content) {
return (content || '').replace(/Taks/g, 'dasdad');
}