1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- UE.registerUI('135editor',function(editor,uiName){
-
-
-
-
-
-
-
-
-
- var editor135;
- function onContentFrom135(event) {
- if (typeof event.data !== 'string') {
- if(event.data.ready) {
- editor135.postMessage(editor.getContent(),'*');
- }
- return;
- };
- if(event.data.indexOf('<') !== 0) return;
- editor.setContent(event.data);
- editor.fireEvent("catchRemoteImage");
- window.removeEventListener('message', onContentFrom135);
- }
- var btn = new UE.ui.Button({
- name:'btn-dialog-' + uiName,
- className:'edui-for-135editor',
- title:'135编辑器',
- onclick:function () {
-
-
-
- editor135 = window.open('https://www.135editor.com/beautify_editor.html?callback=true&appkey=','135editor','height='+(window.screen.availHeight-100)+',width='+(window.screen.availWidth-100)+',top=50,left=50,help=no,resizable=no,status=no,scroll=no')
-
- window.removeEventListener('message', onContentFrom135);
- window.addEventListener('message', onContentFrom135, false);
- }
- });
- return btn;
- },undefined);
|