@anthonypena/marked-styled-image
v0.0.1
Published
Plugin to use image title part to define custom style.
Readme
@anthonypena/marked-styled-image
Install
npm i @anthonypena/marked-styled-imageExamples
Add the plugin to your Marked instance
import { markedStyledImage } from '@anthonypena/marked-styled-image';
import { Marked } from 'marked';
const marked = new Marked();
marked.use(markedStyledImage({ knownStyles: ['bg', 'w-100'] }));Transformation
From:
to:
<img src="./img/foo.jpg" alt="" class="bg w-100"/>