ueditor里有这么断代码,
1.初始显示状态下(非全屏),修改一下代码的z-index
UE.Editor.defaultOptions = function(editor){ var _url = editor.options.UEDITOR_HOME_URL; return { isShow: true, initialContent: '', initialStyle:'', autoClearinitialContent: false, iframeCssUrl: _url + 'themes/iframe.css', textarea: 'editorValue', focus: false, focusInEnd: true, autoClearEmptyNode: true, fullscreen: false, readonly: false, zIndex: 10052,//大于弹出模拟框即可 imagePopup: true, enterTag: 'p', customDomain: false, lang: 'zh-cn', langPath: _url + 'lang/', theme: 'default', themePath: _url + 'themes/', allHtmlEnabled: false, scaleEnabled: false, tableNativeEditInFF: false, autoSyncData : true, fileNameFormat: '{time}{rand:6}' } };
2.这里是全屏状态下的,修改后,点击全屏就不会出现被其他层遮住的情况,关键字_updateFullScreen
_updateFullScreen:function () { if (this._fullscreen) { var vpRect = uiUtils.getViewportRect(); this.getDom().style.cssText = 'border:0;position:absolute;left:0;top:' + (this.editor.options.topOffset || 0) + 'px;' + vpRect.width + 'px;height:' + vpRect.height + 'px;z-index:' + (this.getDom().style.zIndex * 1 + 1000); uiUtils.setViewportOffset(this.getDom(), { left:0, top:this.editor.options.topOffset || 0 }); this.editor.setHeight(vpRect.height - this.getDom('toolbarbox').offsetHeight - this.getDom('bottombar').offsetHeight - (this.editor.options.topOffset || 0),true); //不手动调一下,会导致全屏失效 if(browser.gecko){ try{ window.onresize(); }catch(e){ } } } },
只需要把z-index的值修改大点即可,详细看项目需要
(this.getDom().style.zIndex * 1 + 10000)