Skip to content

Commit 2dd8385

Browse files
committed
feat(tinymce): add image and code plugins
- add image plugin to allow embedding an image via a link - add code plugin to allow editing the generated code
1 parent b30ac8c commit 2dd8385

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/lib/forms/RichEditor.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ import "tinymce/themes/silver";
1313
import "tinymce/icons/default";
1414
import "tinymce/plugins/table";
1515
import "tinymce/plugins/autoresize";
16+
import "tinymce/plugins/code";
1617
import "tinymce/plugins/codesample";
18+
import "tinymce/plugins/image";
1719
import "tinymce/plugins/link";
1820
import "tinymce/plugins/lists";
1921
import "tinymce/plugins/wordcount";
@@ -39,10 +41,19 @@ export class RichEditor extends Component {
3941
statusbar: false,
4042
min_height: minHeight,
4143
content_style: "body { font-size: 14px; }",
42-
plugins: ["codesample", "link", "lists", "table", "autoresize", "wordcount"],
44+
plugins: [
45+
"autoresize",
46+
"code",
47+
"codesample",
48+
"image",
49+
"link",
50+
"lists",
51+
"table",
52+
"wordcount",
53+
],
4354
contextmenu: false,
4455
toolbar:
45-
"blocks | bold italic link codesample blockquote table | bullist numlist | outdent indent | wordcount | undo redo",
56+
"blocks | bold italic link codesample blockquote image table | bullist numlist | outdent indent | wordcount | undo redo | code",
4657
autoresize_bottom_margin: 20,
4758
block_formats: "Paragraph=p; Header 1=h1; Header 2=h2; Header 3=h3",
4859
table_advtab: false,

0 commit comments

Comments
 (0)