You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
renderer.node = function(nodeAsString) {
// suppose nodeAsString = '<p>some text <strong data-id="previously defined id">here with children</strong></p>'
var ID = 1111;
return '<p data-id="1111">some text <strong data-id="previously defined id">here with children</strong></p>'
}
ps: check that we would need to add data-ids to all nodes, includings children nodes.
According to the Markdown spec, we should be able to process strings containing Markdown and HTML. For security, this should be turned off by default. Therefore, out of the box, any non-markdown would be stripped; which would include <script>.
Therefore, you could opt-in, and take responsibility for:
Activity
paulocheque commentedon Apr 20, 2016
Maybe something like:
ps: check that we would need to add data-ids to all nodes, includings children nodes.
paulocheque commentedon Apr 20, 2016
If I am able to include the
data-idattr only for the parent nodes I guess it will be useful too.paulocheque commentedon Apr 21, 2016
I was able to add this extra attribute but I had to override all methods for each node type.
If you guys think this feature will be useful for the core, I can create a PR for that.
KojiIzawa commentedon Dec 3, 2017
Hi @paulocheque,
I have the same request what you have solved. Could you provide the code in question if available?
Thanks in advance.
joshbruce commentedon Dec 3, 2017
Hello. See #956
The current vision for Marked as I see it: A high-speed, low-level library for converting Markdown to HTML and back again.
Admittedly I don't know enough about how Marked works to explain things in the literal; so, hopefully, this makes sense.
According to the Markdown spec, we should be able to process strings containing Markdown and HTML. For security, this should be turned off by default. Therefore, out of the box, any non-markdown would be stripped; which would include
<script>.Therefore, you could opt-in, and take responsibility for:
Is this an accurate representation of expectation and sticking to the vision statement? Even if the code is wholly incorrect.
joshbruce commentedon Apr 13, 2018
Closing as no follow-up conversation of discussion as of today.