Insites Docs Web Components V2Data DisplayMarkdown

Markdown

Published on February 17, 2021, updated on March 22, 2024

Element: <ins-markdown>

Defines a markdown viewer/renderer.

Direct Value Set

Code Snippet

<ins-markdown 
  id="directFieldEl">
</ins-markdown>

<script>
  var label = "Change logs - Sample";
  var value = `
# H1 heading
## H2 heading
### H3 heading`;

  var field = document.getElementById('directFieldEl');
  directFieldEl.addEventListener('didLoad', function(e){
    field.label = label;
    field.value = value;
  });
</script>
Complete Example

Code Snippet

<ins-markdown
  label="Markdown Content"
  value="
# H1 heading
## H2 heading
### H3 heading"
  tooltip="This is a sample tooltip content. It also support html content.">
</ins-markdown>

 

Attributes

 

FIELD ATTRIBUTE TYPE DEFAULT OPTIONS DESCRIPTION
label string "" any Label shown for the field
value string "" any Defines the field value
replace-line-breaks boolean false true, false Enabling this will replace line breaks / next lines (\n) to <br/> HTML code

 

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.