question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to render HTML tags in markdown mode

See original GitHub issue

Summary

I have a requirement that mark some words to other colors. I used <span> tag to deal it. But in markdown mode, it will be writed in content like this:

you are a <span style="cursor: pointer; text-decoration: line-through; font-weight: bold; color: rgb(255, 110, 88);"> clever</span> boy

image

This works correctly in Preview mode.

I know “wysiwyg” mode supports this requirement. But I want know how it works in markdown mode.

Thank you!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
MythosMacommented, Jul 20, 2020

@seonim-ryu Sorry for my question. I mean if I have text like " This is a red apple "。I want to hightlight the word “red”, so I make text " This is a <span style="background: #FF0000">red</span> apple " and call setMarkdown() to put in editor. Then the text will be rendered as this: image

But my request is the text will be rendered like this in markdown editor mode ( not in wysiwyg mode and preview mode) : image

I tried to change dom for this request. But it destoryed the editor and I couldn’t put currect text in editor.

So I think that is it not support for my request.

Thanks!

0reactions
kgirmacommented, Aug 17, 2022

Running into the same issue. We just want to set html using the setHTML() function but each time we do that the <tags> get removed with sanitization.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make markdown render html code (real inline ...
In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and...
Read more >
Getting Started | Markdown Guide
You can add Markdown formatting elements to a plaintext file using a text editor application. Or you can use one of the many...
Read more >
Render markdown to HTML - R
Render markdown to HTML. Description. markdownToHTML transforms the markdown text provided by the user in either the file or text variable.
Read more >
Save Markdown Output as HTML
The most basic way to save is to save the raw HTML output from the rendered markdown as is. Choose Raw HTML output...
Read more >
Read Guide to Markdown Mode for Emacs - Leanpub
To preview files and export to HTML, you will need to install and configure a Markdown processor (e.g., Markdown.pl). Also, to enable editing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found