加载样式以及js
1 2 3 4 | < script src = "assets/jquery.min.js" ></ script > < script src = "assets/trumbowyg.js" ></ script > < script src = "assets/plugins/base64/trumbowyg.base64.js" ></ script > < link rel = "stylesheet" href = "assets/design/css/trumbowyg.css" > |
加上图片放大缩小插件
1 2 3 4 5 6 | < div id = "odiv" style = "display:none;position:absolute;z-index:100;" > < img src = "assets/pic/sx.png" title = "缩小" border = "0" alt = "缩小" onclick = "sub(-1);" /> < img src = "assets/pic/fd.png" title = "放大" border = "0" alt = "放大" onclick = "sub(1)" /> < img src = "assets/pic/cz.png" title = "重置" border = "0" alt = "重置" onclick = "sub(0)" /> < img src = "assets/pic/sc.png" title = "删除" border = "0" alt = "删除" onclick = "del();odiv.style.display='none';" /> </ div > |
使用
1 | < div onmousedown = "show_element(event)" style = "clear:both" id = "customized-buttonpane" class = "editor" ></ div > |
在任意html中加载文本编辑器。
在trumbowyg.js中搜索customized-buttonpane,可以将id更换,或者自己提出来直接新建新的edit
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com