1
1
<template >
2
- <editor
3
- :plugins =" settings.plugins"
4
- :toolbar =" settings.toolbar"
5
- :init =" settings"
6
- :initial-value =" value"
7
- @input =" changed"
8
- />
2
+ <editor
3
+ :plugins =" settings.plugins"
4
+ :toolbar =" settings.toolbar"
5
+ :init =" settings"
6
+ :initial-value =" value"
7
+ @input =" changed"
8
+ />
9
9
</template >
10
10
11
11
<script >
@@ -28,41 +28,42 @@ import "tinymce/skins/lightgray/content.min.css";
28
28
29
29
import Editor from " @tinymce/tinymce-vue" ;
30
30
export default {
31
- components: {
32
- editor: Editor // <- Important part
33
- },
34
- props: {
35
- value: {
36
- type: String ,
37
- default: " "
38
- }
39
- },
40
- data : () => ({
41
- settings: {
42
- plugins: [
43
- " autoresize autolink lists link image anchor" ,
44
- " searchreplace visualblocks code" ,
45
- " media contextmenu paste code"
46
- ],
47
- toolbar:
48
- " undo redo | eyecatcher | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | code" ,
49
- theme: " modern" ,
31
+ components: {
32
+ editor: Editor // <- Important part
33
+ },
34
+ props: {
35
+ value: {
36
+ type: String ,
37
+ default: " "
38
+ }
39
+ },
40
+ data : () => ({
41
+ settings: {
42
+ plugins: [
43
+ " autoresize autolink lists link image anchor" ,
44
+ " searchreplace visualblocks code" ,
45
+ " media contextmenu paste code"
46
+ ],
47
+ toolbar:
48
+ " undo redo | eyecatcher | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | code" ,
49
+ theme: " modern" ,
50
50
51
- forced_root_block: " " , // !important
52
- force_br_newlines: true , // !important
53
- force_p_newlines: false , // !important
54
- convert_urls: false ,
55
- relative_urls: false ,
51
+ forced_root_block: " " , // !important
52
+ force_br_newlines: true , // !important
53
+ force_p_newlines: false , // !important
54
+ convert_urls: false ,
55
+ relative_urls: false ,
56
+ entity_encoding: " raw" ,
56
57
57
- menubar: false ,
58
- image_advtab: true
59
- }
60
- }),
58
+ menubar: false ,
59
+ image_advtab: true
60
+ }
61
+ }),
61
62
62
- methods: {
63
- changed (value ) {
64
- this .$emit (" input" , value);
65
- }
63
+ methods: {
64
+ changed (value ) {
65
+ this .$emit (" input" , value);
66
66
}
67
+ }
67
68
};
68
69
</script >
0 commit comments