GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - HerbertHe/docsify-codeblock-iframe: 一个通过markdown扩展语法为docsify提供更加安全插入iframe的插件

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
demo
demo
 
 
dist
dist
 
 
LICENSE
LICENSE
 
 
README.CN.md
README.CN.md
 
 
README.md
README.md
 
 
package.json
package.json
 
 

Repository files navigation

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:

  1. 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?
  2. 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.

About

一个通过markdown扩展语法为docsify提供更加安全插入iframe的插件

herberthe.github.io/docsify-codeblock-iframe/demo

Topics

docsifydocsify-pluginmarkdown

Resources

Readme
MIT license
Activity

Stars

4 stars

Watchers

1 watching

Forks

1 fork
Report repository

Used by

Contributors

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.