Markdown-It Plugins: Proxy Image & Mixed HTML Fixer
Repositories
- https://github.com/blocker-solutions/markdown-it-mixed-html-fix
- https://github.com/blocker-solutions/markdown-it-image-proxy
New Projects
Both Mixed-HTML-Fix & Image-Proxy are plugins for Markdown-It, focusing on easy rendering Steem related content (but still good for general usage)
What is the project about?
Package: @blocker/markdown-it-mixed-html-fix
This package is a simple parsing fix to allow mixed HTML to live well with Markdown links and images.
For example:
<some-tag>foo-bar</some-tag>

This syntax, while used by many authors is currently rendering the links as plain text, unless this fixer-plugin is used.
Related discussions about this: https://github.com/busyorg/busy/issues/1647
Thank you for pointing me the problem.
Usage
const MarkdownIt = require('markdown-it')
const htmlFix = require('@blocker/markdown-it-mixed-html-fix')
const md = new MarkdownIt()
md.use(htmlFix)
Package: @blocker/markdown-it-image-proxy
Simple, but powerful plugin for parsing images with a prefix / proxy URL, just like Steemit & Busy uses https://steemitimages.com/0x0.
Usage
const MarkdownIt = require('markdown-it')
const imageProxy = require('@blocker/markdown-it-image-proxy')
const md = new MarkdownIt()
md.use(imageProxy, {
// default proxy URL prefix.
proxy: 'https://steemitimages.com/0x0/',
// bypass for images on the following domains (defaults to none).
trusted: [
'https://i.imgur.com',
'https://image.ibb.co'
]
})
This will be enough to parse all image tags with the steemitimages.com prefix.
Notice, that while prefixing image URL's, it will bypass the prefixing for the trusted origins.
Technology Stack
Minimalist Javascript, built with Rollup.
Roadmap
Those are the first installments of a series of plugins for Markdown-It, I mean to cover all Steem related parsing and sanitization as possible and bundle on a single parser package later.
How to contribute?
Github issues, comment or contact on Discord (@hernandev#5834)
GitHub Account
Leave Markdown-It Plugins: Proxy Image & Mixed HTML Fixer to:
Read more #utopian-io posts
Best Posts From Diego Hernandes
We have not curated any of hernandev's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Diego Hernandes
- Testing contribution one
- testing contribution testing ok ok ok
- testing title testing again
- testing title
- Pixie: IPFS integration, PHP-PM Server and Smart Browser Caching.
- Markdown-It Plugins: Proxy Image & Mixed HTML Fixer
- [codecasts/ambientum] Performance Improvements & Refactoring
- Pixie: Image/Avatar Proxy for Steem Applications.
- Steem-Verifier: Easy transaction signature verification.
- Invalid SBD unit for transfers
- [php-sodium] Bindings for detached AEAD functions
- [PHP Extension] Zodium: A libsodium OOP wrapper.
- LaravelAEAD: Advanced Encryption with Associated Data (XChacha20-Poly1305-IETF and others)
- PHP OAuth Client for SteemConnect - Token Refresh and Token Encoding/Decoding
- SteemContext: Save time switching Steem apps with this Chrome Extension!
- PHP Steem Apps with Steem Connect and Laravel - Part II: Steem Configuration and Service Provider
- PHP Steem Apps with Steem Connect and Laravel - Part I: Initial Setup
- PHP-ALPINE: Base Images; Mailparse and secp256k1 Support.
- PHP-ALPINE: Package conflicts and extension fixes.
- SteemConnect SDK for PHP [RC1] - 100% Unit Test Coverage