Skip to content

Commit 7f52366

Browse files
Samk13max-moser
authored andcommitted
editor: Add word count plugin to RichEditor toolbar
* This is useful when the input field has a character limit, allowing users to see the current character count. * Related to inveniosoftware/invenio-requests#391
1 parent 00d880d commit 7f52366

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/forms/RichEditor.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import "tinymce/plugins/autoresize";
1616
import "tinymce/plugins/codesample";
1717
import "tinymce/plugins/link";
1818
import "tinymce/plugins/lists";
19+
import "tinymce/plugins/wordcount";
1920
import PropTypes from "prop-types";
2021

2122
export class RichEditor extends Component {
@@ -38,10 +39,10 @@ export class RichEditor extends Component {
3839
statusbar: false,
3940
min_height: minHeight,
4041
content_style: "body { font-size: 14px; }",
41-
plugins: ["codesample", "link", "lists", "table", "autoresize"],
42+
plugins: ["codesample", "link", "lists", "table", "autoresize", "wordcount"],
4243
contextmenu: false,
4344
toolbar:
44-
"blocks | bold italic link codesample blockquote table | bullist numlist | outdent indent | undo redo",
45+
"blocks | bold italic link codesample blockquote table | bullist numlist | outdent indent | wordcount | undo redo",
4546
autoresize_bottom_margin: 20,
4647
block_formats: "Paragraph=p; Header 1=h1; Header 2=h2; Header 3=h3",
4748
table_advtab: false,

0 commit comments

Comments
 (0)