|
@@ -28,7 +28,7 @@ import { buildShortUUID } from "@/utils/uuid";
|
|
|
import { bindHandlers } from "./helper";
|
|
|
import lineHeight from "./lineHeight";
|
|
|
import { onMountedOrActivated } from "@/hooks/onMountedOrActivated";
|
|
|
-const tinymceScriptSrc = "https://cdn-novel.91duke.com/static/tinymce.js";
|
|
|
+const tinymceScriptSrc = "https://cdn.bootcdn.net/ajax/libs/tinymce/5.5.1/tinymce.min.js";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: "Tinymce",
|
|
@@ -38,7 +38,7 @@ export default defineComponent({
|
|
|
setup(props, { emit, attrs }) {
|
|
|
const editorRef = ref<any>(null);
|
|
|
const tinymceId = ref<string>(buildShortUUID("tiny-vue"));
|
|
|
- const elRef = ref<Nullable<HTMLElement>>(null);
|
|
|
+ const elRef = ref<any>(null);
|
|
|
|
|
|
const tinymceContent = computed(() => {
|
|
|
return props.modelValue;
|
|
@@ -56,12 +56,14 @@ export default defineComponent({
|
|
|
const { height, options } = props;
|
|
|
return {
|
|
|
selector: `#${unref(tinymceId)}`,
|
|
|
+ base_url: 'https://cdn.bootcdn.net/ajax/libs/tinymce/5.5.1',
|
|
|
+ suffix: '.min',
|
|
|
height: height,
|
|
|
toolbar: toolbar,
|
|
|
menubar: "file edit insert view format table",
|
|
|
plugins: plugins,
|
|
|
// 语言包
|
|
|
- language_url: "resource/tinymce/langs/zh_CN.js",
|
|
|
+ language_url: "https://cdn-novel.91duke.com/static/zh_CN.js",
|
|
|
// 中文
|
|
|
language: "zh_CN",
|
|
|
default_link_target: "_blank",
|