Page 1 of 1

marked - a MarkDown viewer [beta]

Posted: 25 Apr 2016 07:33
by bdeshi
View MarkDown files in rendered HTML utilizing marked.js.
Might not support all types of code, but sure beats opening a fat webkit app for a quick preview! :kidding:
marked.xys
Note 1: this was written as a pfa script, so uses <pfaitem> as source. Change the $file variable to <curitem> or whatever for other use cases.

Code: Select all

"Marked|<xyicons>\ext\ext_md.ico" md;markdown>::load "marked.xys"; //pfa entry to go with this script
Note 2: You can supply custom CSS with the $customCss variable.

marked-preview.png
[/size]*focus lines not included

TODO: Nicer default styles. fix more relative links.

=====

changes
v1.0b2
- relative link and images (<a>, <img>) are normalized
- simplified css customization. Now $customCss is the only source of all styles.
- fixed some styling issues (cropped images, dupe scrollbars)
v1.0b1
- init

old versions
marked.xys
[/size]

Re: marked - a MarkDown viewer [beta]

Posted: 25 Apr 2016 09:10
by highend
Nice idea :)

I've added it to the scripts overview thread...

Re: marked - a MarkDown viewer [beta]

Posted: 25 Apr 2016 09:33
by bdeshi
Thanks! :D

Re: marked - a MarkDown viewer [beta]

Posted: 25 Apr 2016 11:19
by MBaas
Thanks - good work! ;-)

Re: marked - a MarkDown viewer [beta]

Posted: 25 Apr 2016 13:07
by bdeshi
Thank you, MBaas!