Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持在iframe中运行代码块 #26

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

y1j2x34
Copy link

@y1j2x34 y1j2x34 commented Jun 4, 2020

实现 #17

启用iframe模式以及配置项:

{
  "iframe": true,
  "iframeOptions": {
    "autorun": false,  // 是否自动运行代码块
    "runCodeBtn": { // 运行代码块的按钮属性(autorun为false时有效)
      "innerText": "run",
      "style": "color: #000"
    },
    "injectCss": [ // 注入 css 链接(优先级低于injectCssText)
      "https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
    ],
    "injectCssText": "*{padding:0;margin:0}", // 向iframe注入css样式文本
    "injectScript": [ // 注入脚本
      "https://code.jquery.com/jquery-3.5.1.min.js",
      "https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
    ]
  }
}	} 

@toams69
Copy link

toams69 commented Apr 17, 2021

How it works ?
I've tried the PR without any success.
I need to expose in my vue press some sample using vue3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants