Commit 4849a0d7 authored by 张俊's avatar 张俊

编辑器插入代码

parent d8accb64
......@@ -105,6 +105,10 @@ export default {
this.info_ = html; // 绑定当前逐渐地值
this.$emit("change", this.info_); // 将内容同步到父组件中
};
this.editor.config.onchange = html => {
this.info_ = html; // 绑定当前逐渐地值
this.$emit("change", this.info_); // 将内容同步到父组件中
};
// 创建富文本编辑器
this.editor.create();
}
......
......@@ -81,7 +81,7 @@ export default {
this.editor.config.uploadImgMaxLength = 6; // 限制一次最多上传 3 张图片
this.editor.config.uploadImgTimeout = 3 * 60 * 1000; // 设置超时时间
this.editor.config.uploadImgParams = { directory: "image" };
console.log(this.editor);
this.editor.config.uploadImgHooks = {
fail: (xhr, editor, result) => {
// 插入图片失败回调
......@@ -117,6 +117,10 @@ export default {
this.info_ = html; // 绑定当前逐渐地值
this.$emit("change", this.info_); // 将内容同步到父组件中
};
this.editor.config.onchange = html => {
this.info_ = html; // 绑定当前逐渐地值
this.$emit("change", this.info_); // 将内容同步到父组件中
};
// 创建富文本编辑器
this.editor.create();
}
......
......@@ -518,7 +518,7 @@ export default {
padding: 16px;
}
.ans_self{
width: 100%;
width: 856px;
padding: 24px;
height: 354px;
background-color: #ffffff;
......
......@@ -104,7 +104,7 @@ export default {
color: #242c43;
}
.detail_content {
width: 100%;
width: 1200px;
}
.detail_title{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment