Help with my Markdown Viewer

You did really well man currently am doing the same project i am unable to build it
can you please help me
here is my project


please provide me some content you refer in your project
Thanks in advance

I’ve split this from the original topic — please don’t hijack someone else’s thread with your own project questions.

What specific problems are you having?

1 Like

actually in js function i was supposed to marked the given html
i was unable to do that earlier i ask for help on the same topic so i try to take a help from him thats all
now i want help from you

HTML

- <textarea onkeydown="changefunc()" ...
+ <textarea oninput="changefunc()" ...

Explanation: the keydown event fires before the value changes, so you’re always one update behind the most recent input.

JS

- document.getElementById('preview').innerHTML = texthere;
+ document.getElementById('preview').innerHTML = marked(texthere);

Explanation: marked is available within your script’s scope because you’ve referenced it in your HTML, so you can just call it directly.

1 Like

Thank you sir
yeah i could not call and make use of that marked function so i commented it
how it need to call sir ?

You can just swap out texthere for marked(texthere).

even after pressing the input am getting it in the same line here what i need to do Sir

Looks like it’s working fine to me.

1 Like