dimpu / ngx-md Goto Github PK
View Code? Open in Web Editor NEWAngular(ngx) directive for parsing markdown content in your web application.
Home Page: https://dimpu.github.io/ngx-md/
Angular(ngx) directive for parsing markdown content in your web application.
Home Page: https://dimpu.github.io/ngx-md/
<textarea rows="10" cols="50" [(ngModel)]="textInput">
</textarea>
<markdown>
{{textInput}}
</markdown>
Is it possible to have something like this working ?
I don't think this is working.
Version available in npm repository doesn't support Angular 4 and it would be great to have it updated
<markdown [path]="publicationHead.publicationUrl">
The tags should show nothing while the website is loading
this is the live example
http://naktan.yakanda.mx/blog/publications/BgMPAQUIAQw
I do not know why, but while it loads it shows the index of the website.
I'm trying to create a markdown editor in my angular2 project with this package and I have this important issue : " marked " is not a function . The error comes from those lines :
// comple markdown to html
public compile(data: string) {
return marked(data);
}
Do you have any idea what can I do to fix the issue ?
That's the way I create my markdown input in my component :
<textarea [(ngModel)]="textData" [ngModelOptions]="{standalone: true}"></textarea> <markdown [data]="textData"></markdown>
We want to use formula inside the markdown.. is it possible to add mathjax with this plugin which can render formulas too?
Thanks
Following your instructions, I get the above error when running my project. Given this is the first 3rd party angular 2 library I'm using, I'm sure the issue is related to a lack of understanding on my part, but any guidance would be highly appreciated.
Thanks in advance!
Good morning,
is there a way to prefetch remote markdown files i.e. on application startup and cache them to display later without another GET?
In my app main loading time is no big issue and i want to show those resources as fast as possible.
Cheers,
midzer
Hello,
I followed the instructions in the README but I get this error in the browser:
Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/angular2-markdown
I mapped
'angular2-markdown': 'node_modules/:angular2-markdown/index.ts',
in my systemjs.config.js but then I get another error
Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/node_modules/angular2-markdown/src/app/markdown/markdown.module
I tried adding the relevant map to systemjs.config.ts but it didn't work.
Thanks
Check your example demo page for an example.
I want to use the markdown module inside my node_modules folder to parse some README.md files in some reusable components inside an external module. I tried to import the MarkdownModule
with import {MarkdownModule} from "angular2-markdown";
inside my external.module.ts file in the node_modules folder. I also added the MarkdownModule.forRoot()
to my imports inside the @NgModule
decorator. When I use <markdown> ##Example## </markdown>
inside an HTML file in my module, i receive the following error:
Unhandled Promise rejection: Template parse errors:
'markdown' is not a known element:
1. If 'markdown' is an Angular component, then verify that it is part of this module.
2. If 'markdown' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
Pointing to my Tag
Is it possible to use the markdown module inside the node_modules folder or do I have to find another way to parse my README.md files?
I develop a site with Angular-CLI and will publish that on GitHub pages. the link to my project is https://heinpauwelyn.github.io.
I've installed a package named angular2-markdown to render markdown files on my HTML pages. Below you see my code:
<div class="container">
<div class="row">
<div class="col-md-8">
<h2>Internship</h2>
<!-- Below you see the `markdown` tag to render the markdown file -->
<markdown path="/reports/intro.md"></markdown>
</div>
<div class="col-md-4">
<app-reportslist></app-reportslist>
</div>
</div>
</div>
To test the site on localhost I use this command:
ng serve
This command gives no problem and render the markdown files good.
An error will be throw when I use command below to deploy my website on GitHub pages.
ng github-pages:deploy
This gives me next error:
ERROR in
MarkdownModule
is not anNgModule
Here is my code in my app.module.ts
:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { MarkdownModule } from 'angular2-markdown';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
MarkdownModule
],
bootstrap: [AppComponent],
})
export class AppModule { }
I know on the guide stands that I must use MarkdownModule.forRoot()
. If I use now ng serve
, I've got this error:
ERROR in Error encountered resolving symbol values statically. Calling function
MarkdownModule
, function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbolAppModule
inC:/***/heinpauwelyn.github.io/src/app/app.module.ts
.ERROR in
C:/***/heinpauwelyn.github.io/src/app/app.module.ts
: PropertyforRoot
does not exist on typetypeof MarkdownModule
.
If I comment the line export class AppModule()
like in the guide, I got this error:
ERROR in
C:/***/heinpauwelyn.github.io/src/main.ts
: ModuleC:/***/heinpauwelyn.github.io/src/app/app.module.ts
has no exported memberAppModule
.ERROR in
C:/***/heinpauwelyn.github.io/src/app/app.module.ts
: Declaration expected.
What is normal of course.
How could I solve this problem?
Note: See also my question on Stack Overflow
Thanks in advance.
Given that your using marked.js and it's designed to be extended it would be beneficial to have direct access to the renderer (via the service). So maybe export the service and give an accessor to the direct renderer so users can extend the rendering functionality (for example I need to have more control over image rendering which I can do in marked via the renderer by extending the image syntax).
Angular2-Markdown: 1.3.8 (latest)
Node Version: 7.4.0
NPM Version: 4.0.5
Webpack Version: 2.2.1
resolve './src/app/markdown/markdown.module' in '/home/site/public_html/client/node_modules/angular2-markdown/bundles'
using description file: /home/site/public_html/client/node_modules/angular2-markdown/package.json (relative path: ./bundles)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /home/site/public_html/client/node_modules/angular2-markdown/package.json (relative path: ./bundles)
using description file: /home/site/public_html/client/node_modules/angular2-markdown/package.json (relative path: ./bundles/src/app/markdown/markdown.module)
as directory
/home/site/public_html/client/node_modules/angular2-markdown/bundles/src/app/markdown/markdown.module doesn't exist
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/site/public_html/client/node_modules/angular2-markdown/bundles/src/app/markdown/markdown.module doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/home/site/public_html/client/node_modules/angular2-markdown/bundles/src/app/markdown/markdown.module.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/site/public_html/client/node_modules/angular2-markdown/bundles/src/app/markdown/markdown.module.js doesn't exist
.css
Field 'browser' doesn't contain a valid alias configuration
/home/site/public_html/client/node_modules/angular2-markdown/bundles/src/app/markdown/markdown.module.css doesn't exist
.html
Field 'browser' doesn't contain a valid alias configuration
/home/site/public_html/client/node_modules/angular2-markdown/bundles/src/app/markdown/markdown.module.html doesn't exist
.scss
Field 'browser' doesn't contain a valid alias configuration
/home/site/public_html/client/node_modules/angular2-markdown/bundles/src/app/markdown/markdown.module.scss doesn't exist
Any idea how I can resolve this? The src/ folder that used to be pulled in with the package is missing in this version, causing errors.
The only "fix" I have found so far is by changing routes or reloading the page. Not entirely sure what is causing it, but I feel like it has to do with it not executing prism correctly.
well i need some help
i don t understand doc
where a i can find a a new string markedown after editing a generated table by angular2- mardown.
angular-cli: 1.0.0-beta.26
node: 7.4.0
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/compiler-cli: 2.4.7
angular2-markdown 1.3.10
I get the following errors when trying to build:
ERROR in Error encountered resolving symbol values statically. Calling function 'MarkdownModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in ......
Secondary list like this
Hi. Looking into network tab of Chromium development console, it appears remote markdown files are fetched twice:
It was included single time via <markdown [path]="'assets/markdown/index.md'"></markdown>
.
Using line <div Markdown [path]="'assets/markdown/index.md'"></div>
had same effect.
Is it an issue in zone.js
?
Cheers,
midzer
Nested md list not nesting html correctly
* Parent li
* Child li
This example should become:
<li>
Parent li
<ul>
<li>Child li</li>
</ul>
</li>
But instead it becomes
<ul>
<li>
Parent li
</li>
<ul>
<ul>
<li>Child li</li>
</ul>
ionic2 use this add
imports: [
BrowserModule,
MarkdownModule.forRoot(),
]
Module build failed: Error: ENOENT: no such file or directory, open '/Users/zhengbin/Documents/Workspace/Ionic/cutePuppyPics/node_modules/angular2-markdown/index.js'
at Error (native)
The import statement works:
import { MarkdownModule } from 'angular2-markdown';
However as soon as I add:
MarkdownModule.forRoot(),
to my imports, I get this error:
Uncaught Error: Cannot find module 'angular2-markdown'
Where the error happens when tracing it back:
// This function will be called whenever a module identifier that hasn't // 20
// been installed is required. For backwards compatibility, and so that we
// can require binary dependencies on the server, we implement the // 22
// fallback in terms of Npm.require. // 23
options.fallback = function (id, parentId, error) { // 24
// For simplicity, we honor only top-level module identifiers here. // 25
// We could try to honor relative and absolute module identifiers by // 26
// somehow combining `id` with `dir`, but we'd have to be really careful
// that the resulting modules were located in a known directory (not // 28
// some arbitrary location on the file system), and we only really need // 29
// the fallback for dependencies installed in node_modules directories. // 30
if (topLevelIdPattern.test(id)) { // 31
if (typeof Npm === "object" && // 32
typeof Npm.require === "function") { // 33
return Npm.require(id); // 34
} // 35
} // 36
// 37
throw error; // 38
};
At line #38, so topLevelIdPattern.test(id)
is false!
Any hints on how to fix it? :)
Hi,
i like this project. Tried to use it with Angular and Material2 Beta. I'd like to show the markup in an MdDialog in the content area.
This is the preview from my Visual Studio Markup Addin:
This is the result in the application:
Someone any idea what i'm doing wrong. The 'mat-dialog-content' style has only set the margins set.
Many thanks in advance.
Regards Jens.
I think this could be quite useful.
I have a markdown file that uses sometimes 4 whitespaces to indent code blocks.
When I feed this directly to marked, I get the desired results. But with the MarkdownComponent
of this project, the code blocks are not rendered. After debugging through the code, I found the prepare
method which removes the whitespaces and with it the whole intentional formatting.
In the closed issues, there seem to be several issues that are probably related, but it was always pointed to marked, when in fact the prepare
method is the cause.
Examples: #47, #41, #38 , #36 , #35
Suggestion: Just return raw
instead of modifying the text.
The purpose of the fenced code block in markdown is to designate language formatting and keep exact spacing and formatting.
When the markdown is compiled, the spacing within my code blocks is removed. This spacing is used to indent the lines and without it the code block is virtually useless.
Below is the code block using the Github markdown in this comment text:
function fancyAlert(arg) {
if(arg) {
$.facebox({div:'#foo'})
}
}
Below is an image of what the code block looks like after being compiled with Angular2-Markdown:
As you can see, the Github formatted markdown keeps the spacing, while the Angular2-Markdown formatted markdown does not contain the spaces.
Am I missing a setting, or is this a bug as I have suspected?
I also posted this issue on the marked repo: markedjs/marked#885
Thanks.
Hi again,
i want to style my markdown files in a custom way.
For code syntax i would prefer any prism.css
for sure. In my case i want to treat some <a>
in a special way.
How do i achieve that?
Including an own markdownstyle.css
globally with
a {
text-decoration: none;
}
for example would override any <a>
in my whole app.
Thanks for your support and have a friendly weekend,
midzer
ERROR in ./~/angular2-markdown/src/app/markdown/markdown.service.ts
Module not found: Error: Can't resolve 'rxjs/RX' in 'project/node_modules/angular2-markdown/src/app/markdown'
@ ./~/angular2-markdown/src/app/markdown/markdown.service.ts 12:0-17
@ ./~/angular2-markdown/src/app/markdown/markdown.module.ts
@ ./~/angular2-markdown/index.ts
@ ./src/app/app.module.ts
@ ./src/app/index.ts
@ ./src/main.ts
@ multi main
No ideia why i am getting this.
Hi.
It appears instructions to use markdown differ from README and Website:
<div Markdown [path]="/path/to/readme.md"></div>
<markdown [path]="/path/to/code.cpp"></markdown>
<markdown [path]="/path/to/code.java"></markdown>
versus
<markdown [path]="'/assets/files/demo.md'"> </markdown>
<div Markdown [path]="'/assets/files/demo.html'"> </div>
<div Markdown [path]="'/assets/files/demo.cpp'"> </div>
<div Markdown [path]="'/assets/files/demo.java'"> </div>
Either way my files are parsed but dont show translation from markdown language to HTML (i.e. #
to <h1>
). I followed tutorial at https://github.com/dimpu/angular2-markdown/blob/master/docs/getting-started/ng-cli.md carefully and there are no errors. Someone got a clue what am i missing?
Cheers,
midzer
I install the model via npm and added it to app.module.ts. But after this my hole up crashed. After removing it from imports in app.module everything runs fine again. Do I miss something or is it an error inside angular2-markdown? Without the markdown lib everything runs without an error message.
`Error: (SystemJS) expected expression, got '<'
@http://localhost:3000/app/app.module.js:15:27
@http://localhost:3000/app/app.module.js:1:31
@http://localhost:3000/app/app.module.js:1:2
@http://localhost:3000/app/main.js:7:20
@http://localhost:3000/app/main.js:1:31
@http://localhost:3000/app/main.js:1:2
ZoneDelegate.prototype.invoke@http://localhost:3000/node_modules/zone.js/dist/zone.js:391:17
Zone.prototype.run@http://localhost:3000/node_modules/zone.js/dist/zone.js:141:24
scheduleResolveOrReject/<@http://localhost:3000/node_modules/zone.js/dist/zone.js:831:52
ZoneDelegate.prototype.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:424:17
Zone.prototype.runTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:191:28
drainMicroTaskQueue@http://localhost:3000/node_modules/zone.js/dist/zone.js:595:25
ZoneTask.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:502:21
invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:1364:9
globalZoneAwareCallback@http://localhost:3000/node_modules/zone.js/dist/zone.js:1382:17
Evaluating http://localhost:3000/angular2-markdown
Evaluating http://localhost:3000/app/app.module.js
Evaluating http://localhost:3000/app/main.js
Error loading http://localhost:3000/app/main.js
Stack trace:
(SystemJS) expected expression, got '<'
@http://localhost:3000/app/app.module.js:15:27
@http://localhost:3000/app/app.module.js:1:31
@http://localhost:3000/app/app.module.js:1:2
@http://localhost:3000/app/main.js:7:20
@http://localhost:3000/app/main.js:1:31
@http://localhost:3000/app/main.js:1:2
ZoneDelegate.prototype.invoke@http://localhost:3000/node_modules/zone.js/dist/zone.js:391:17
Zone.prototype.run@http://localhost:3000/node_modules/zone.js/dist/zone.js:141:24
scheduleResolveOrReject/<@http://localhost:3000/node_modules/zone.js/dist/zone.js:831:52
ZoneDelegate.prototype.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:424:17
Zone.prototype.runTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:191:28
drainMicroTaskQueue@http://localhost:3000/node_modules/zone.js/dist/zone.js:595:25
ZoneTask.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:502:21
invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:1364:9
globalZoneAwareCallback@http://localhost:3000/node_modules/zone.js/dist/zone.js:1382:17
Evaluating http://localhost:3000/angular2-markdown
Evaluating http://localhost:3000/app/app.module.js
Evaluating http://localhost:3000/app/main.js
Error loading http://localhost:3000/app/main.js`
Hi, I am trying to use this directive module in my little project, but when I import and compile with angular-cli, it shows:
ERROR in [default] node_modules/angular2-markdown/src/app/markdown/markdown.directive.ts:5:23
File 'node_modules/@types/PrismJS/index.d.ts' is not a module.
I have tried to make prism type be a module with:
export = Prism;
It can be compiled, BUT it can't work either.
In the console:
Uncaught Error: Unexpected value 'MarkdownModule' imported by the module 'PublishModule'
Any advice for solving this problem will be appreciated.
How can I get the compiled text
table can't be parse , the code has no background
I keep getting a 404 trying to load the markdown module into my application. I understand the TypeScript module resolution behaves much like Node in that it will traverse directories up the stack until if finds the module it's looking for (looking in module.ts, package.json, or index.ts respectively). With that being said, I've added your package to my project (which is essentially the angular2 quickstart at its' base), but I'm getting a 404 on the node_modules/angular2-markdown GET call. Here's my setup (only showing what's applicable to the issue) :
tsconfig.json
`"compilerOptions": {
......
"moduleResolution": "node".
......
}`
systemjs.config.js
`(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
......
'angular2-markdown': 'npm:angular2-markdown'
.......
});
})(this);`
package.json
`{
......
"dependencies": {
......
"angular2-markdown": "^1.3.5",
......
}`
app.module.js
`import { MarkdownModule } from 'angular2-markdown';
......
@NgModule({
declarations: [
......
],
imports: [
......,
MarkdownModule.forRoot()
],
......
export class AppModule { }`
The angular2-markdown package sits in the 'node_modules/angular2-markdown' directory. Inside the root of that package is the index.ts class. Since the package.json doesn't contain a "typings" property, the compiler should be using the index.ts, which contains:
index.ts
export * from './src/app/markdown/markdown.module';
export * from './src/app/markdown/markdown.component';
So, as you can see, the 'angular2-markdown' package is aliased to the node_modules directory in my project, but unfortunately when I try and grab the MarkdownModule I get the following error in my console:
GET http://localhost:3000/node_modules/angular2-markdown/ 404 (Not Found)
It looks as if the compiler isn't actually reading the index.ts. I've tried several things to try and brute force this thing to work. For example:
systemjs.config
app.module.ts
Suffice it to say none of that worked and I'm not sure what the problem is. Can anyone shed some light on this issue for me? I just started using Angular2, but I feel like this is more of a build issue than a library issue. Thanks in advance.
When importing in app.module.ts as import { MarkdownModule } from 'angular2-markdown';
console error is: Cannot find module 'angular2-markdown'
When import statement is changed to import { MarkdownModule } from 'angular2-markdown/bundles';
Cannot find module 'angular2-markdown'
error goes away.
When import statement is import { MarkdownModule } from 'angular2-markdown/bundles';
and @NgModule
import is MarkdownModule.forRoot()
new console error is Can't resolve all parameters for MarkdownService: (?).
originalStack:
"Error: Can't resolve all parameters for MarkdownService: (?). at SyntaxError.ZoneAwareError (http://localhost:4200/vendor.bundle.js:147841:33) at SyntaxError.BaseError [as constructor] (http://localhost:4200/vendor.bundle.js:103421:16) at new SyntaxError (http://localhost:4200/vendor.bundle.js:11245:16) at CompileMetadataResolver._getDependenciesMetadata (http://localhost:4200/vendor.bundle.js:25641:31) at CompileMetadataResolver._getTypeMetadata (http://localhost:4200/vendor.bundle.js:25516:26) at CompileMetadataResolver._getInjectableMetadata (http://localhost:4200/vendor.bundle.js:25504:21) at CompileMetadataResolver.getProviderMetadata (http://localhost:4200/vendor.bundle.js:25746:40) at http://localhost:4200/vendor.bundle.js:25704:49 at Array.forEach (native) at CompileMetadataResolver._getProvidersMetadata (http://localhost:4200/vendor.bundle.js:25671:19) at CompileMetadataResolver.getNgModuleMetadata (http://localhost:4200/vendor.bundle.js:25355:50) at CompileMetadataResolver.getNgModuleSummary (http://localhost:4200/vendor.bundle.js:25211:52) at http://localhost:4200/vendor.bundle.js:25282:72 at Array.forEach (native) at CompileMetadataResolver.getNgModuleMetadata (http://localhost:4200/vendor.bundle.js:25269:49)"
Any thoughts on how to get module working?
Current dependencies:
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @angular/[email protected]
+-- @types/[email protected]
+-- @types/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
ERROR in [default] ../node_modules/angular2-markdown/src/app/markdown/markdown.component.ts:90:40
Parameter 'line' implicitly has an 'any' type.
ERROR in [default] ../node_modules/angular2-markdown/src/app/markdown/markdown.service.ts:10:13
Parameter 'path' implicitly has an 'any' type.
More recent versions of angular-cli fail to build when angular2-markdown is imported.
ERROR in Error encountered resolving symbol values statically. Calling function
'makeDecorator', function calls are not supported.
Consider replacing the function or lambda with a reference to an exported function,
resolving symbol NgModule in
/node_modules/angular2-markdown/node_modules/@angular/core/src/metadata/ng_module.d.ts,
resolving symbol NgModule in
/node_modules/angular2-markdown/node_modules/@angular/core/src/metadata.d.ts,
resolving symbol NgModule in
/node_modules/angular2-markdown/node_modules/@angular/core/src/core.d.ts,
resolving symbol NgModule in
/node_modules/angular2-markdown/node_modules/@angular/core/index.d.ts,
resolving symbol MarkdownModule in
/node_modules/angular2-markdown/src/app/markdown/markdown.module.ts,
resolving symbol MarkdownModule in
/node_modules/angular2-markdown/src/app/markdown/markdown.module.ts
Don't get an error if it's added when ng serve
is already running, but a fresh ng build
or ng serve
will be halted on this error.
When binding to the [data]
property, the resulting HTML contains spurious empty paragraphs, which vanish if the markdown is updated. Depending on the CSS rules in effect, this can be observed as differences in spacing between the visible paragraphs, headings, etc.
You can actually observe the presence of these empty paragraphs in the source of the demo page, although in that case it has no visible effect on the spacing.
The problem seems to be that the variable binding occurs before ngAfterViewInit
is called. By the time ngAfterViewInit
is called, the generated HTML has already been set on the element and so it's treated as if it were inline markdown and processed a second time, resulting in the addition of empty paragraphs.
Addressed by pull request #59.
MarkdownComponent
is currently making 3 calls to Prism.highlightAll
:
This causes an error during server compilation, as document
doesn't exist:
ERROR ReferenceError: document is not defined
at Object.highlightAll
A possible solution is to only run that method when in browser using isPlatformBrowser
from @angular/common
since, save for when the user has javascript disabled, Angular will take over on the client-side an re-render the component thus calling highlightAll
.
I'm more than happy to add a PR for this or discuss other possible solutions.
Thanks!
I'm using Angular2 CLI (https://cli.angular.io) to create a new project. But when using this lib and run ng serve
, it throwed:
.../node_modules/angular2-markdown/src/app/markdown/markdown.component.ts:65:13 Cannot find name 'Prism'.
The Markdown still works but maybe it can not highlight the code.
See https://dimpu.github.io/angular2-markdown/
Quote is not rendered at all
Hi there,
Why all the empty lines in the source .md
file are not rendered in the result page?
I also checked the demo of this repository, it has the same issue
.
Are there any reasons behind it? And how to resolve it if I need the empty lines?
thanks
-John
Hi!
I found http://ghosditor.herokuapp.com/ for an angular 1 app. It´s really useful to be able to upload images with an image placeholder and a dropzone element. Is it possible to add this feature to your component?
do nested lists work? seems flat list each time.
I am using Angular 2.2.3 and I am building the whole thing with webpack. When I try to build I get
ERROR in C:...\node_modules\angular2-markdown\src\app\markdown\markdown.service.ts
(9,14): error TS7006: Parameter 'path' implicitly has an 'any' type.
ERROR in C:...\node_modules\angular2-markdown\src\app\markdown\markdown.component.ts
(84,41): error TS7006: Parameter 'line' implicitly has an 'any' type.
I tried setting both parameters to any and to string, unfortunately neither worked for me.
Assigning markdown to a variableas follows fails and just spews markdown back.
<markdown [data]="textData"></markdown>
If I embed markdown as follows it works.
<markdown>## Test</markdown>
Using version 1.6.0
By building Angular2 app worked perfectly until I installed angular2-markdown.
Here is the error at compilation time:
ERROR in Error encountered resolving symbol values statically. Calling function 'makeParamDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in node_modules/angular2-markdown/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol OpaqueToken in node_modules/angular2-markdown/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving symbol OpaqueToken in node_modules/angular2-markdown/node_modules/@angular/core/src/di/opaque_token.d.ts
ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'src'
@ ./src/main.ts 5:0-74
@ multi mainERROR in ./
/@angular/core/src/linker/system_js_ng_module_factory_loader.js/@angular/core/src/linker/system_js_ng_module_factory_loader.js 71:15-36 87:15-102
Module not found: Error: Can't resolve 'src$$_gendir' in 'node_modules@angular\core\src\linker'
@ ./
@ .//@angular/core/src/linker.js/@angular/core/src/core.js
@ ./
@ ./~/@angular/core/index.js
@ ./src/main.ts
@ multi main
Removing the angular2-markdown module solves the problem but I need it.
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.