I have tested ngx-markdown-editor in Angular, with every step in the documentation, I have used the demo too, but I always have the error:
Marked is not defined in ngx-markdown-editor.mjs (in the init method).
I installed marked with npm i marked, and I import market in the files ngx-markdown-editor.mjs (import marked from 'marked').
There were not enough, then I put in my index the script:
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
The error marked is not defined persisted but only in another line of the file. I put this script in the index:
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.min.js" integrity="sha256-0Ed5s/n37LIeAWApZmZUhY9icm932KvYkTVdJzUBiI4=" crossorigin="anonymous"></script>
I have tested ngx-markdown-editor in Angular, with every step in the documentation, I have used the demo too, but I always have the error: Marked is not defined in ngx-markdown-editor.mjs (in the init method). I installed marked with
npm i marked
, and I import market in the files ngx-markdown-editor.mjs (import marked from 'marked'
). There were not enough, then I put in my index the script:<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
The error marked is not defined persisted but only in another line of the file. I put this script in the index:<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.7.0/marked.min.js" integrity="sha256-0Ed5s/n37LIeAWApZmZUhY9icm932KvYkTVdJzUBiI4=" crossorigin="anonymous"></script>
and the error changes to:
hljs is not defined. Please report this to https://github.com/markedjs/marked.
I don't know what to do. I'm sure that the last script is not the solution, but I don't know. If somebody can help me, I'm very glad.
Thank you.