-
commonjs
import styleEditor from './style-editor.cjs'; // 渲染DOM 传入父元素id styleEditor.render('root'); // 第一次传入css setTimeout(function() { console.log('开始获取css.'); styleEditor.postCSS(` .warning { border: 1px solid #ccc; padding: 10px; color: #333; font-size: 20px; } `) }, 2000); // 第二次传入css setTimeout(function() { console.log('再次开始获取css.'); styleEditor.postCSS(` .warning { width: 10px; } `) }, 10000); // css修改后的回调 styleEditor.onCSSChanged(function(res) { console.log('修改后的css: ', res); })
-
umd
<div id="root"></div> <script src="./style-editor.umd.js" /> <script> var editor = styleEditor.styleEditor; // 渲染DOM 传入父元素id styleEditor.render('root'); // 第一次传入css setTimeout(function() { console.log('开始获取css.'); styleEditor.postCSS(` .warning { border: 1px solid #ccc; padding: 10px; color: #333; font-size: 20px; } `) }, 2000); // css修改后的回调 styleEditor.onCSSChanged(function(res) { console.log('修改后的css: ', res); }) <script>
-
Notifications
You must be signed in to change notification settings - Fork 0
A visual style editor plugin.
License
jian-cui/style-editor
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A visual style editor plugin.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published