wangEditorExt,为wangEditor增加全屏编辑,查看源码功能

wangEditorExt

wangEditor确实是一款比较轻巧的在线可视编辑器, 其实作为网页编辑器有这些功能足够了, 基本满足了在线编辑的需要, 但作为一个技术控, 有些东西它还不满足, 于是就增加全屏编辑, 查看源码功能, 在查看源码功能中同样可以进行编辑, 比如对图像大小的编辑等.

/**
 * wangEditor扩展,增加全屏 查看源码功能
 * 传入均为 editor实例,非css选择器
 * 依赖jquery 如果是layui之类的需要在layui.use方法中使用
 * 全屏功能需要引入 wangEditor-fullscreen.css
 * @author mrzhou@miw.cn
 * @date 2018.8.30 am 10:00
 *       2018.9.18 pm 16:00 增加同页多编辑器支持
 * 使用方法:
 * E.fullscreen.init(editor);
 * E.viewSource.init(editor);
 */

附上一个测试样例

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/2.2.1/jquery.min.js"></script>
</head>
<body>
    <div id="editor"></div>
</body>
</html>
<script>
var E = window.wangEditor;
var editor = new E('#editor');
editor.create();
E.fullscreen.init(editor);
E.viewSource.init(editor);
</script>

wangEditorExt项目
wangEditor项目
超级简单的JAVA mvc框架,全免配置