老鬼的博客 来都来啦,那就随便看看吧~
UEditorPlus集成135编辑器并将外部图片地址自动转成自己的业务域名地址
发布于: 2024-11-06 更新于: 2024-11-07 分类于:  阅读次数: 

一:介绍

二:前端改造

index.html修改后端server和加toolsbar

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
var ue = UE.getEditor('editor',{
// autoHeightEnabled: false,
serverUrl: location.origin + "/miniprogram/ueditor/controller",//后台server地址
toolbars:[
[
"fullscreen", // 全屏
"source", // 源代码
"135editor", // 135编辑器
"|",
"undo", // 撤销
"redo", // 重做
"|",
"bold", // 加粗
"italic", // 斜体
"underline", // 下划线
"fontborder", // 字符边框
"strikethrough",// 删除线
"superscript", // 上标
"subscript", // 下标
"removeformat", // 清除格式
"formatmatch", // 格式刷
"autotypeset", // 自动排版
"blockquote", // 引用
"pasteplain", // 纯文本粘贴模式
"|",
"forecolor", // 字体颜色
"backcolor", // 背景色
"insertorderedlist", // 有序列表
"insertunorderedlist", // 无序列表
"selectall", // 全选
"cleardoc", // 清空文档
"|",
"rowspacingtop",// 段前距
"rowspacingbottom", // 段后距
"lineheight", // 行间距
"|",
"customstyle", // 自定义标题
"paragraph", // 段落格式
"fontfamily", // 字体
"fontsize", // 字号
"|",
"directionalityltr", // 从左向右输入
"directionalityrtl", // 从右向左输入
"indent", // 首行缩进
"|",
"justifyleft", // 居左对齐
"justifycenter", // 居中对齐
"justifyright",
"justifyjustify", // 两端对齐
"|",
"touppercase", // 字母大写
"tolowercase", // 字母小写
"|",
"link", // 超链接
"unlink", // 取消链接
"anchor", // 锚点
"|",
"imagenone", // 图片默认
"imageleft", // 图片左浮动
"imageright", // 图片右浮动
"imagecenter", // 图片居中
"|",
"simpleupload", // 单图上传
"insertimage", // 多图上传
"emotion", // 表情
"scrawl", // 涂鸦
"insertvideo", // 视频
"attachment", // 附件
"insertframe", // 插入Iframe
"insertcode", // 插入代码
"pagebreak", // 分页
"template", // 模板
"background", // 背景
"formula", // 公式
"|",
"horizontal", // 分隔线
"date", // 日期
"time", // 时间
"spechars", // 特殊字符
"wordimage", // Word图片转存
"|",
"inserttable", // 插入表格
"deletetable", // 删除表格
"insertparagraphbeforetable", // 表格前插入行
"insertrow", // 前插入行
"deleterow", // 删除行
"insertcol", // 前插入列
"deletecol", // 删除列
"mergecells", // 合并多个单元格
"mergeright", // 右合并单元格
"mergedown", // 下合并单元格
"splittocells", // 完全拆分单元格
"splittorows", // 拆分成行
"splittocols", // 拆分成列
"contentimport", // 内容导入(支持Word、Markdown)
"|",
"print", // 打印
"preview", // 预览
"searchreplace", // 查询替换
"help", // 帮助
]
]
});

三:后端

1
后端和ueditor一样

四:截图

*************感谢您的阅读*************