您的位置:首页 > Web前端 > JavaScript

对ubbeditor进行改造以适应seajs的思想

2013-12-26 18:21 281 查看
待续。

首先我先说一下对ubbeditor的认识。

1、请看看下面代码:

var tLinkTableHTML = '<table cellpadding="0" cellspacing="5" class="ubbEditorImageTable">';
tLinkTableHTML += '  <tr>';
tLinkTableHTML += '    <td>' + ubbEditorLang.tImageURL + '</td>';
tLinkTableHTML += '  </tr>';
tLinkTableHTML += '  <tr>';
tLinkTableHTML += '    <td><input id="' + this.tid + '-ubbEditorImageText" type="text" value="http://" class="ubbEditorImageText" ondblclick="this.select();" /></td>';
tLinkTableHTML += '  </tr>';
tLinkTableHTML += '  <tr>';
tLinkTableHTML += '    <td class="ubbEditorTD1"><input type="button" value="' + ubbEditorLang.tOK + '" class="ubbEditorImageButton" onclick="' + this.tName + '.tsetCommand(\'ImageS\', ' + this.tName + '.tEI(\'' + this.tid + '-ubbEditorImageText\').value);" /> <input type="button" value="' + ubbEditorLang.tCancel + '" class="ubbEditorImageButton" onclick="' + this.tName + '.tLoadMaskClose();" /></td>';
tLinkTableHTML += '  </tr>';
tLinkTableHTML += '</table>';


在ubbeditor随处可以见到这种拼html的行为,当然js的插件大都是固定html结构及css样式,但是他将js代码的对象名称也传进去来直接调用----这个还真没办法了,seajs里面的对象岂是全局对象?

2、根据测试,ubbeditor每次弹出弹出层都会新建层,关闭则移除。这是何等效率低下?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: