[TASK] CKEditor RTE: Re-add the wordcount functionality 05/58405/6
authorJosef Glatz <josefglatz@gmail.com>
Wed, 26 Sep 2018 17:36:17 +0000 (19:36 +0200)
committerBenni Mack <benni@typo3.org>
Sat, 29 Sep 2018 21:08:56 +0000 (23:08 +0200)
commit177fc827401ec03242ae8994c063c60f1ebb5b48
treed5ce21ac8fff1f4454d4ec687941b22c2aa3f18d
parentb0e894c5ff38991da88eb7a3fc25047ddf88b9d5
[TASK] CKEditor RTE: Re-add the wordcount functionality

This patch re-adds a missing functionality to CKEditor.

Due to the move from htmlArea to CKEditor, the well-known
wordcount information was gone.

The wordcount information is added to all existing CKEditor presets
per default. In addition, it is now possible to customize the displayed
information below the editor.

- It's possible to switch paragraph-, word- and/or character count.
- You can define if spaces are counted as charactars.
- You can define if HTML tags are taken into account.
- You can define if linebreaks are taken into account.

Beside that, the used plugin enables also setting up maximum
values for word- and/or character count. This can be easily used
for custom RTE presets. The fact that the global configuration is
located in the Base.yaml makes it possible to overwrite settings
partially or completely in any inherited RTE preset. With that it is
easy possible to realize word/character limits.

Following commands were used to add the external package as
a dependency and copy the plugin files/folders to the final location:
`yarn add --dev ckeditor-wordcount-plugin && yarn build`

Resolves: #86395
Releases: master
Change-Id: I2c76d7bfebc9a5a57c1f105788af206bdffb00f2
Reviewed-on: https://review.typo3.org/58405
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
35 files changed:
Build/Gruntfile.js
Build/package.json
Build/yarn.lock
typo3/sysext/rte_ckeditor/Configuration/RTE/Editor/Base.yaml
typo3/sysext/rte_ckeditor/Configuration/RTE/Full.yaml
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/css/wordcount.css [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/ar.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/ca.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/cs.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/da.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/de.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/el.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/en.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/es.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/eu.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/fa.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/fi.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/fr.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/he.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/hr.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/hu.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/it.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/ja.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/nl.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/no.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/pl.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/pt-br.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/pt.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/ru.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/sk.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/sv.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/tr.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/zh-cn.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/lang/zh.js [new file with mode: 0644]
typo3/sysext/rte_ckeditor/Resources/Public/JavaScript/Contrib/plugins/wordcount/plugin.js [new file with mode: 0644]