Skip to content

Commit 25463a6

Browse files
author
FabianHippmann
committed
add raw entity encoding for tinymce
1 parent cd1661e commit 25463a6

File tree

1 file changed

+40
-39
lines changed

1 file changed

+40
-39
lines changed

resources/assets/js/Editor.vue

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<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+
/>
99
</template>
1010

1111
<script>
@@ -28,41 +28,42 @@ import "tinymce/skins/lightgray/content.min.css";
2828
2929
import Editor from "@tinymce/tinymce-vue";
3030
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",
5050
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",
5657
57-
menubar: false,
58-
image_advtab: true
59-
}
60-
}),
58+
menubar: false,
59+
image_advtab: true
60+
}
61+
}),
6162
62-
methods: {
63-
changed(value) {
64-
this.$emit("input", value);
65-
}
63+
methods: {
64+
changed(value) {
65+
this.$emit("input", value);
6666
}
67+
}
6768
};
6869
</script>

0 commit comments

Comments
 (0)