读MBE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | <! doctype html> < html > < head > < meta charset="utf-8"> < title >MBE_SCHEMA</ title > </ head > < body > < script > //入口 ==> 8783 EditorShell.main = { start : mbe_core.DocumentManager.newInstance().then(function (sm) { //跳到编辑器的36行开始即可 return mbe_run.shell = new EditorShell(sm); }).fail(onFail) } //sm ==> 7293 DocumentManager.newInstance = { //新建了一个延迟对象,里面是DM /* _editingDocument : [] _storage : undefinde editingDocument : undefined storage : undefined _addDoc : () _closeStorage : () _openDocument : () _openStorage : () createDocument : () createDocumentFromArchive : () editingDocument : () createDocument : () createDocumentFromArchive : () removeAllDocuments : () resumeOrCreateDocument : () storage : () */ return : new mc.Deferred().resolve(new DocumentManager(null)) } // new ==> 8065 //这个才是真正的入口哦 EditorShell(sm); // 8086 Object.extend(EditorShell,"eventEmite"/*模拟事件*/); //8090 Editor._storageManager = sm; //8119 等IFrame加载完成就执行下面这个doc初始化 this._initDocument(); //8123剪贴板初始化事件 this._clipboard = new ClipBoard( document ) //8125属性面板城市化 this._propPanel = new PropertyPanel(); //8126 左侧导航栏初始化 this._pageNav = new PageNavigator(); //8218 bind("beforeunload"); //8131 bind("resize"); //8135 读取文档内部内容 或者 新建文档 this._storageManager.resumeOrCreateDocument().then() /* 8139 如果存在就从沙盒中取 filesystem:http://localhost:6320/persistent/mbe/editing/1394337977419/.core-editor.xhtml */ //8137 如果不存在就新建一个文档 /* 各种各样的事件 预览 undo reodo 缩放 新建页面 元素置顶 元素置底 元素居中 元素居上 元素居下 .. 删除页面 新建页面 ==> 将压缩的文档解压读取到沙盒,再用loadDocument解析到页面; 保存页面 导出选项 ==> 压缩成zip,使用URL.createObjectURL( blob )直接放到 a的href就可以自动下载 新建文档 //右侧控制面板 文字图片视频音频 8654 _insertControl 匹配到img@video@audio的file文件,使用resurceLoad,导入资源列表 8677 beginInteractiveInserting 8683 this._editor.resourceLoader 添加加载资源添加事件: { start, clear, done, progress, fail } 连接工具的初始化 连接选项 解除连接选项 更新连接的按钮是否可用 解除连接选项 右下角的状态栏状态显示 */ </ script > </ body > </ html > |
天道酬勤
本文作者:方方和圆圆
本文链接:https://www.cnblogs.com/diligenceday/p/3598095.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步