Closed jvalrog closed 4 years ago
Ok I solved it. I'll show how I made it for anyone in the future.
Just call togglePreview()
after the easyMDE declaration in your HTML:
<textarea></textarea>
<script>
var easyMDE = new EasyMDE({
..... options here
});
easyMDE.togglePreview();
</script>
@jvalrog Thank you! Was able to set the editor to preview by default on my Angular App by calling:
public ngAfterViewInit(): void {
this.TdTextEditor.easyMDE.togglePreview();
}
Where TdTextEditor
comes from:
@ViewChild(TdTextEditorComponent, { static: false }) public TdTextEditor: TdTextEditorComponent;
For anyone using Angular in the future.
Hi everyone, amazing software you have here. I'm using it in a personal project for a note taking app and it's working perfectly.
My question is if the editor can be rendered, the first time I mean, in Preview mode by default.
Because I just want to view my notes as they are rendered, until I need to edit one of them. That's when I'd change to Edit mode.
Thanks.