simplemde-markdown-editor
simplemde-markdown-editor copied to clipboard
default text does not render if inside a <detail> tag which is closed at render time
If the textarea/editor is inside a
If there is no content then the placeholder text will display properly in all cases.
Same issue here.
Same here. This comment from simplemde editor source may explain what is happening:
// The codemirror component is only available after rendering
// so, the setter for the initialValue can only run after
// the element has been rendered
In my case, the text area is in a non-default bootstrap 5's tab so I've attached its show
event to load its content and works exactly as expected:
<script>
document.getElementById('edit-tab')
.addEventListener('shown.bs.tab', event => {
simplemde.value(docsrc);
});
</script>