如何忽略tinymce中的html标签.Vuejs和Laravel [英] How to ignore html tags in tinymce | Vuejs and Laravel
问题描述
我正在使用laravel和vuejs构建应用程序,但由于某些原因,我无法正确使用tinymce.
I am building an application using laravel and vuejs but for some reason I cannot use tinymce properly.
我会根据需要查看编辑器,并在其中编写任何内容.但是当我尝试查看内容时,所有的html标签都显示为您在图片中看到的
I see the editor as I want and write whatever I want in it. But when I try to view the content, all the html tags show as you can see in the image
我按照github文档此处
I installed it following the github documentation here
npm install @tinymce/tinymce-vue
已导入我的Vue模板
import Editor from '@tinymce/tinymce-vue';
components: {
'editor' : Editor
}
然后我绑定元素
<editor v-model="post.description"></editor>
因此,与其显示此文本将粗体",不如显示文本将被粗体"
So instead of showing " This text will be bold", it should show me "This text will be bold"
推荐答案
经过一番研究,我最终意识到我必须使用v-html才能读取html标签
After some research I ended up realising that I had to use the v-html in order to read the html tags
所以不要像这样显示:
<td>{{post.description}}<td>
我现在正在执行以下操作:
I am now doing the following:
<td v-html="post.description"><td>
这篇关于如何忽略tinymce中的html标签.Vuejs和Laravel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!