Lihat halaman demo untuk melihat aksi yang ditandai ⛹️
Halaman dokumentasi kami juga dirender menggunakan tanda ?
Baca juga tentang:
Node.js: Hanya versi Node.js saat ini dan LTS yang didukung. Versi Node.js yang sudah habis masa pakainya mungkin menjadi tidak kompatibel dengan Ditandai kapan saja.
Peramban: Bukan IE11 :)
CLI:
npm install -g marked
Dalam browser:
npm install marked
DOMPurify.sanitize(marked.parse(`<img src="x" onerror="alert('not happening')">`));
CLI
# Example with stdin input
$ marked -o hello.html
hello world
^D
$ cat hello.html
< p > hello world < /p >
# Print all options
$ marked --help
Peramban
<!doctype html >
< html >
< head >
< meta charset =" utf-8 "/>
< title > Marked in the browser </ title >
</ head >
< body >
< div id =" content " > </ div >
< script src =" https://cdn.jsdelivr.net/npm/marked/marked.min.js " > </ script >
< script >
document . getElementById ( 'content' ) . innerHTML =
marked . parse ( '# Marked in the browsernnRendered by **marked**.' ) ;
</ script >
</ body >
</ html >
atau impor modul esm
< script type =" module " >
import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js" ;
document . getElementById ( 'content' ) . innerHTML =
marked . parse ( '# Marked in the browsernnRendered by **marked**.' ) ;
</ script >
Hak Cipta (c) 2011-2022, Christopher Jeffrey. (Lisensi MIT)