替换your-api-key为你的TinyMCE API密钥。如果没有,可以在TinyMCE官网注册获取。 二、通过CDN引入 如果不想安装额外的npm包,可以通过CDN直接引入TinyMCE。 在index.html中引入TinyMCE的CDN: <script src="https://cdn.tiny.cloud/1/your-api-key/tinymce/5/tiny
npm install @tinymce/tinymce-vue-S tinymce-vue是tinymce官方提供的一个vue组件,可以直接拿过来使用,但是必须要到官网注册获取api-key,否则只有一段时间的试用期。所以你不想购买的话就老老实实编写自己的组件。 这两个组件安装完之后,在public目录下新建文件夹static/tinymce,目录建好后,找到node_modules文件夹下...
api-key="your-api-key" v-model="content" :init="editorInit" ></editor> </template> import Editor from '@tinymce/tinymce-vue'; // TinyMCE配置项 const editorInit = { height: 500, menubar: false, plugins: [ 'advlist autolink lists link image charmap print preview anchor', 'searchr...
在上述代码中,我们使用了Editor组件,并通过init属性来配置编辑器的高度、菜单栏、插件和工具栏等选项。api-key是Tinymce提供的API密钥,你可以在Tinymce官网申请一个免费的API密钥。 三、初始化并使用Tinymce编辑器 为了使Tinymce编辑器正常工作,你还需要在Vue项目的main.js文件中引入Tinymce的主文件和所需的插件。以下...
api-key="vn97n20mvo4lrz05yowxf9rm2lri5zekmem1j0v20vd1i9vz" :init="tinymceInit" v-model="currentValue" ref="editor" /> <!-- <textarea id="tinymce" /> --> </template> import { ExchangeService } from "@/api"; import { LessonTaskService...
api-key="vn97n20mvo4lrz05yowxf9rm2lri5zekmem1j0v20vd1i9vz" :init="tinymceInit" v-model="currentValue" ref="editor" /> <!-- <textarea id="tinymce" /> --> </template> import { ExchangeService } from "@/api"; import { LessonTaskService...
<editor api-key="API_KEY" :init="{plugins: 'wordcount'}"></editor> 配置编辑器 这个编辑器接受下列的 props: disabled: 使用这个获取布尔值的属性,您可以动态地将编辑器设置为“禁用”只读模式或正常可编辑模式。 id: 编辑器的ID,以便您以后可以使用tinymce上的tinymce.get(“id”)方法获取实例,默认为自...
I am just getting started with TinyMCE and planning to self-host, not use the cloud offering. I'm getting a warning (detailed below) about an API key when the editor loads. I have both @tinymce/tinymce-vue and tinymce installed, which se...
1. 文档地址 https://www.tiny.cloud/docs/tinymce/6/2. 依赖npm install @tinymce/tinymce-vue -S3. apiKey需要自己申请一个,因为用别人的不一定哪天就不能用了,线上项目需要配置白名单。 https://www.tiny.clo…
api-key: Api key for TinyMCE cloud, more info below. cloud-channel: Cloud channel for TinyMCE Cloud, more info below. None of the configuration props arerequiredfor the component to work - other than if you are using TinyMCE Cloud you will have to specify theapi-keyto get rid of theThi...