Angular markdown component/directive/pipe/service to parse static, dynamic or remote content to HTML with syntax highlight and more...
🥇 Thanks to @robertIsaac for his contribution to add support for standalone components.
Library has been updated to support Angular 17.
It is recommended to stick with ngx-markdown v16.x.x if you are using Angular 16.
marked
lib to ^9.0.0mermaid.js
optional dependency to ^10.6.0emoji-toolkit
optional dependency to ^8.0.0 which supports unicode 15.0srcRelativeLink
input property is removed as the baseUrl
option has been removed from marked, use https://www.npmjs.com/package/marked-base-url insteadMarkdownService.parse()
method now returns Promise<string>
instead of string
, because marked parsing is doing soMarkdownPipe
now returns Promise<string>
instead of string
and will need to be combined with async
pipe to work correctlymarkedOptions
and clipboardOptions
configuration properties used in the MarkdownModule.forRoot(config: MarkdownModuleConfig)
method now require to be provided with the MARKED_OPTIONS
and CLIPBOARD_OPTIONS
injection token.@types/marked
dependency is no longer needed and needs to be removedmarked.min.js
file in the scripts
section of the angular.json
when using @angular\cli
is no longer needed and can safely be removed as it is automatically imported.🥇 Thanks to @json-derulo for his contribution to update Angular 17.
🥇 Thanks to @robertIsaac for his contribution to update marked
library and adding support for extensions.
🥇 Thanks to @sarfudheen for his contribution to update mermaid.js
library.
Library has been updated to support Angular 16.
It is recommended to stick with ngx-markdown v15.x.x if you are using Angular 15.
README.md
disableSanitizer: boolean
option as an input property to MarkdownComponent
and as a parameter to MarkdownPipe
, allowing to bypass the DOM sanitizer (default is false
) (#430) (434b9c1) @paviad @jfceresrcRelativeLink: boolean
input property to MarkdownComponent
to support relative links for remotely loaded markdown (default is false
) (#431) (1dd4951) @datumgeek @jfcere🥇 Thanks to paviad for his contribution to adding the disableSanitizer
option.
🥇 Thanks to datumgeek for his contribution to adding the srcRelativeLink
option.
Library has been updated to support Angular 15.
It is recommended to stick with ngx-markdown v14.x.x if you are using Angular 14.
The library dependencies have been removed and set as peer/optional dependencies instead to avoid having unused packages installed locally and avoid conflicts for projects that already use any of those dependencies.
Once you have updated ngx-markdown you will need to manually install your required peer/optional dependencies following the updated installation section of the README.md
.
dependencies
to optionalDependencies
for plugin integrationsemoji-toolkit
optional dependencies to v7.0.0 which support Unicode 14.