macedigital / angular-markdown-it Goto Github PK
View Code? Open in Web Editor NEWAngular 1.x directive for rendering markdown with markdown-it.
License: MIT License
Angular 1.x directive for rendering markdown with markdown-it.
License: MIT License
As far as I can tell, only CommonMark is supported. I know you said support for plugins is planned but not yet implemented so I am curious if there is a work around to use them until then.
Enabling the linikify & typographer options don't seem to work for me.
.config(['markdownItConverterProvider', function(markdownItConverter) {
markdownItConverter.config('commonmark', {
breaks: true,
linkify: true,
typographer: true
});
}])
Line breaks work using this config, but linkify & typographer do nothing.
Testing with (c) (C) (r) (R) (tm) (TM) (p) (P) +-
&
Any ideas?
When I have config like the following:
.config(['markdownItConverterProvider', function(markdownItConverter) {
markdownItConverter.config('default', {
breaks: true,
linkify: true,
typographer: true
});
}])
an iframe tag inside the markdown is printed in the output as though it were a text string.
When enabling html: true
in the options, like so:
.config(['markdownItConverterProvider', function(markdownItConverter) {
markdownItConverter.config('default', {
breaks: true,
linkify: true,
typographer: true,
html: true,
});
}])
I'd hoped angular-markdown-it would render the iframe as HTML, but instead what I am seeing is that the iframe is completely removed from the document. Inspecting the document source, the iframe tag is simply gone.
I had a look at the issue queue for markdown-it, but the only issue that I found that seems pertinent is markdown-it/markdown-it#133 , & there it seems to indicate that iframes should work with markdown-it.
Any ideas?
I've configured my angular app using the default instructions but the resultant html is enclosed within <pre><code>
tags:
I must be doing something wrong - can you enlighten me please? I'm using angular 1.6.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.