begin of thinksaas 3.68

Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2023-06-22 13:33:25 +08:00
commit 963ec1b2ea
2746 changed files with 331806 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
var E = window.wangEditor
var editor = new E('#tseditor')
// 或者 var editor = new E( document.getElementById('editor') )
// 自定义菜单配置 评论框
editor.customConfig.menus = [
'bold', // 粗体
'foreColor', // 文字颜色
'link', // 插入链接
'emoticon', // 表情
'image', // 插入图片
]
editor.customConfig.zIndex = 100
editor.customConfig.zHeight = '100px'//编辑器编辑区高度
// 配置服务器端地址
editor.customConfig.uploadImgServer = siteUrl+'index.php?app=pubs&ac=editor&ts=photo&js=1'
// 将图片大小限制为 2M
editor.customConfig.uploadImgMaxSize = 2 * 1024 * 1024
// 限制一次最多上传 5 张图片
editor.customConfig.uploadImgMaxLength = 5
editor.customConfig.uploadFileName = 'photo'
var content = $('textarea[name="content"]')
editor.customConfig.onchange = function (html) {
// 监控变化,同步更新到 textarea
content.val(filterXSS(html))
}
//解决iphone中出现的问题
editor.customConfig.onblur = function (html) {
// html 即编辑器中的内容
console.log('onblur', html)
content.val(filterXSS(html))
}
editor.create()