New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

docsify-codeblock-iframe

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docsify-codeblock-iframe

markdown codeblock-iframe syntax support for docsify!

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

docsify-codeblock-iframe

version download cnpmVersion cnpmDownload jsdelivr

A plugin that provides markdown extra codeblock-iframe syntax support for docsify, just for supporting iframe rendering securely!

简体中文 | English

Try it

Demo

Usage

Import dependencies from CDN

<script src="//cdn.jsdelivr.net/npm/codeblock-iframe@latest/dist/index.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-codeblock-iframe@latest/dist/index.min.js"></script>

Following formats of src are supported!

www.baidu.com
//www.baidu.com
http://www.baidu.com
https://www.baidu.com
  • iframe Attributes
Attributes
src
height
width
align
frameborder
longdesc
marginheight
marginwidth
name
sandbox
scrolling
seamless
srcdoc
textContent

Why To Do

To be honest, Markdown supports HTML tags natively! But here are some issues we have to face as followed:

  • If I didn't want my users insert ads in their posts via iframe but supported them using codepen to share their codes, how could I do?
  • Sometimes we try to insert iframe in some markdown editor. For immediately rendering, the browser will send a lot of GET requests to our target website when we inputting, how could we optimize? Even it causes our page breakdown when developing and using SSR

How To Do

Code Block Renderer is easy for us to extend native markdown syntax, so we can limit the frequency of iframe rendering in this way.

Thanks

  • iarna-toml: Better TOML parsing and stringifying all in that familiar JSON interface.

Keywords

docsify

FAQs

Package last updated on 07 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts