编辑器李添加pdf引用按钮修改说明图:(注:在点击按钮弹出的iframe页面地址处未获取到转换为pdf的地址)
Editor_config.js新增按钮及按钮提示
,toolbars:[
[……………. ,'quotepdf']
]
,labelMap:{
………….. ,'quotepdf':'pdf引用'
}
Editor_all.js新增如下:
15367行:
var btnCmds = [………. ,'quotepdf']
15482行
var dialogBtns = {
ok : [………… ,'quotepdf']
}
4636—4651行新增:
UE.plugins['quotepdf'] = function() {
var me =this;
function deleteIframe(){
me._iframe && delete me._iframe;
}
me.addListener("selectionchange",function(){
deleteIframe();
});
me.commands["quotepdf"] = {
queryCommandState : function(){
return this.highlight ? -1 :0;
}
}
};
15343行
var iframeUrlMap ={
..
..
…… ,
'quotepdf':'~/dialogs/insertframe/pdf.html'
}
Themes/default/ueditor.css 样式新增:(按钮样式,及弹出iframe样式)
.edui-for-quotepdf .edui-icon {
background-position: -240px -40px;
}
/*pdf-insertframe*/
.edui-for-quotepdf .edui-dialog-content {
width:350px;
height:200px;
overflow: hidden;
}
Dialogs/insertframe下新增pdf.html