商务标文件
商务标文件
提交时间 2020-03-12
标段编号: | GC****************01001 |
标段名称: | 澜沧县勐朗镇普陀希望小学学生餐厅建设项目 |
变更内容: | ****************959325="303">请各投标人以此版本编制。//UEDITOR_CONFIG.UMEDITOR_HOME_URL = "/jsgc-zb/res/common/umeditor/";//实例化编辑器 // var um = UM.getEditor("myEditor");var isView=$.getUrlParam("isView");var =$.getUrlParam("");var height=$.getUrlParam("height"); if(==null){=$(document).();} if(height==null){height=$(document).height();}var um=UM.createEditor("myEditor",{initialFrameHeight:height-70,initialFrameWidth:-2 });; um.addListener("blur",function(){//$("#focush2").html("编辑器失去焦点了")});um.addListener("focus",function(){// $("#focush2").html("")});$(function(){ var isView=$.getUrlParam("isView"); if(isView=="true"){ setDisabled(); /* setTimeout(function(){ $("#_baidu_bookmark_start_0").parent().hide();//如果是只读会生成一行多的p,去掉 },500); */ } else{ //有内容的情况下,编辑器自动加p 手动去掉。后面再处理 /* setTimeout(function(){ var pfirst=$("#myEditor").find("p:first"); if(pfirst.html()==""||pfirst.html()==" "){ pfirst.remove(); } },300); */ }});//按钮的操作function insertHtml() {var value = prompt("插入html代码", "");um.execCommand("insertHtml", value)}//是否聚焦function isFocus(){alert(um.isFocus())}function doBlur(){um.blur()}//创建editorfunction createEditor() {//enableBtn();um = UM.getEditor("myEditor");}//获取htmlfunction getAllHtml() {return UM.getEditor("myEditor").getAllHtml();}//获取内容function getContent() { return UM.getEditor("myEditor").getContent();}//设置内容 content 内容 isAppendTo 是否追加 true是追加 false是不追加,默认追加function setContent(content,isAppendTo) { if(isAppendTo==undefined){isAppendTo=true;}UM.getEditor("myEditor").setContent(content, isAppendTo);}function getPlainTxt() {var arr = [];arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");arr.push("内容为:");arr.push(UM.getEditor("myEditor").getPlainTxt());alert(arr.join("\n"))}function setDisabled() {UM.getEditor("myEditor").setDisabled("fullscreen");// disableBtn("enable");}function setEnabled() {UM.getEditor("myEditor").setEnabled();// enableBtn();}function getText() {//当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容var range = UM.getEditor("myEditor").selection.getRange();range.select();var txt = UM.getEditor("myEditor").selection.getText();alert(txt);}function getContentTxt() {var arr = [];arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");arr.push("编辑器的纯文本内容为:");arr.push(UM.getEditor("myEditor").getContentTxt());alert(arr.join("\n"));}function hasContent() {var arr = [];arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");arr.push("判断结果为:");arr.push(UM.getEditor("myEditor").hasContents());alert(arr.join("\n"));}function setFocus() {UM.getEditor("myEditor").focus();}function deleteEditor() {disableBtn();UM.getEditor("myEditor").destroy();}function disableBtn(str) {var br = document.getElementById("btnContainer");var btns = UM.dom.domUtils.getElementsByTagName(br, "button");for (var i = 0, btn; btn = btns[i++];) {if (btn.id == str) {UM.dom.domUtils.removeAttributes(btn, ["disabled"]);} else {$(btn).attr( "disabled", true ).addClass( "disabled" );}}}function enableBtn() {var br = document.getElementById("btnContainer");var btns = UM.dom.domUtils.getElementsByTagName(br, "button");for (var i = 0, btn; btn = btns[i++];) {$(btn).removeAttr( "disabled" ).removeClass( "disabled" );}}function resizeHeight(){ if(!height){ var heightTmp = $(document).height();um.setHeight(heightTmp); }else{um.setHeight(height); }}function resizeWidth(){ if(!){ var Tmp = $(document).();um.setWidth(Tmp); }else{um.setWidth(); }} |
标签:
0人觉得有用
招标
|
- 关注我们可获得更多采购需求 |
关注 |
最近搜索
无
热门搜索
无