Element: <ins-markdown-editor>
Defines a markdown editor.
Code Snippet
<ins-markdown-editor label="Markdown Content" tooltip="This is a sample tooltip content. It also support html content."> </ins-markdown-editor>
Code Snippet
<ins-markdown-editor label="Error Field" has-error error-message="This is a required field"> </ins-markdown-editor>
Code Snippet
<ins-markdown-editor label="Readonly Field" value="You cannot edit this value" readonly> </ins-markdown-editor>
Code Snippet
<ins-markdown-editor id="directFieldEl"> </ins-markdown-editor> <script> var label = "Change logs - Sample"; var value = `# H1 heading ## H2 heading ### H3 heading`; var field = document.getElementById('directFieldEl'); field.addEventListener('didLoad', function(e) { field.label = label; field.setValue(value); }); </script>
Code Snippet
<ins-markdown-editor label="Content" id="myMarkdownEl"> </ins-markdown-editor> <ins-button solid label="Get Value" id="getMDBtn"> </ins-button> <script> var button = document.getElementById('getMDBtn'); var markdownEl = document.getElementById('myMarkdownEl'); markdownEl.addEventListener('didLoad', function(e) { button.addEventListener('click', function() { console.log("Markdown field value below:"); console.log(markdownEl.val()); alert('check console to see the value'); }); }); </script>
FIELD ATTRIBUTE | TYPE | DEFAULT | OPTIONS | DESCRIPTION |
---|---|---|---|---|
label | string | "" | any | Label shown for the field |
value | string | "" | any | Defines the field value |
name | string | "" | any | Defines the field name |
disabled | boolean | false | true, false | Disables the field |
readonly | boolean | false | true, false | Make the field readonly |
has-error | boolean | false | true, false | Defines if the field is invalid / error |
error-message | string | "" | any | Message shown when field has error |
required | boolean | false | true, false | Specifies that the input field must be filled out before submitting the form |
tooltip | string | "" | - | Displays a tooltip beside the label. Supports HTML Content |
EVENT | OBJECT | DESCRIPTION |
---|---|---|
insValueChange | value | Emits the value on change |
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.