Browse Source

Merge pull request #801 from tinymce/wordcount-update

updated docs for updated wordcount plugin
pull/851/head
Lee Newson 7 years ago
committed by GitHub
parent
commit
f8a35ee975
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      advanced/keyboard-shortcuts.md
  2. 41
      plugins/wordcount.md

1
advanced/keyboard-shortcuts.md

@ -36,6 +36,7 @@ This is a list of available keyboard shortcuts within the editor body.
| Toggle Fullscreen | Ctrl+Shift+F | Ctrl+Shift+F | [fullscreen]({{ site.baseurl }}/plugins/fullscreen/) |
| Save | Ctrl+S | Command+S | [save]({{ site.baseurl }}/plugins/save/) |
| Find | Ctrl+F | Command+F | [searchreplace]({{ site.baseurl }}/plugins/searchreplace/) |
| Open wordcount dialog | Ctrl+Shift+C | Command+Shift+C | [wordcount]({{ site.baseurl }}/plugins/wordcount/) |
## Accessibility keyboard shortcuts

41
plugins/wordcount.md

@ -3,45 +3,10 @@ layout: default
title: Word Count plugin
title_nav: Word Count
description: Show a word count in the TinyMCE status bar.
keywords: wordcount wordcount_cleanregex wordcount_countregex
keywords: wordcount
---
This plugin adds word count functionality to TinyMCE, placing a counter on the right edge of the status bar.
**Type:** `String`
##### Example
```js
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "wordcount"
});
```
### Options
These settings affect the execution of the `wordcount` plugin. The regular expression values that determine how words are cleaned and counted may be set here.
### `wordcount_cleanregex`
This option allows you to specify the regular expression that will be used to *strip punctuation and numbers* from the word count. **Removed in 4.5.0**
**Type:** `String`
##### Example
```js
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "wordcount",
wordcount_cleanregex: /[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g
});
```
### `wordcount_countregex`
This option allows you to specify the regular expression that will be used to *count the words* for the word count. **Removed in 4.5.0**
This plugin adds word count functionality to TinyMCE by placing a counter on the right edge of the status bar. Clicking the wordcount in the statusbar switches between counting words and characters. Using the menuitem, situated in the Tools dropdown, or the toolbar button you can open a dialog box with both word and character counts.
**Type:** `String`
@ -51,6 +16,6 @@ This option allows you to specify the regular expression that will be used to *c
tinymce.init({
selector: "textarea", // change this value according to your HTML
plugins: "wordcount",
wordcount_countregex: /[\w\u2019\x27\-\u00C0-\u1FFF]+/g
toolbar: "wordcount"
});
```
Loading…
Cancel
Save