Review main Merged

58405[TASK] CKEditor RTE: Re-add the wordcount functionality

Josef Glatz CR +2 V +2 Expert +1880 −0 updated 09/29/18, 21:08

Commit message

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`

Review

  • Code review CR +2
    • Benni Mack +2
    • Georg Ringer +1
  • Verified V +2
    • Benni Mack +2
    • Riccardo De Contardi +1
    • TYPO3com +1 CI

Issues 1

Files 35

Show 15 more files

Review log 2025

  1. Josef Glatz uploaded patch set 1 09/26/18, 20:09

  2. Josef Glatz uploaded patch set 2 09/26/18, 20:16

  3. Josef Glatz uploaded patch set 3 09/26/18, 20:17

  4. TYPO3com voted on patch set 1 V +1 09/26/18, 20:21 Completed build in 11m 04s on Wed, 26 Sep, 10:21 PM Test Summary: 36102 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28678

  5. TYPO3com voted on patch set 2 V +1 09/26/18, 20:27 Completed build in 10m 57s on Wed, 26 Sep, 10:27 PM Test Summary: 36102 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28680

  6. TYPO3com voted on patch set 3 V +1 09/26/18, 20:32 Completed build in 12m 18s on Wed, 26 Sep, 10:32 PM Test Summary: 36102 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28681

  7. Christian Kuhn commented on patch set 3 CR -1 09/27/18, 12:50

    Thanks for the patch. However, I don't think we should get that merged anytime soon: a) feature, so now v9 - saying this has been default in rtehtmlarea does not count, this is 3 years ago. b) it seems only a little number of persons missed that feature, otherwise there would have been much more noise. thus, i would NOT put that into the default core instance. this feature looks like a perfect case that can happily live as a non-core extension for those who need it. c) I would not enable that feature for all 'minimal/full/...' flavors. why should that be part of minimal set?
  8. Riccardo De Contardi commented on patch set 3 V +1 09/27/18, 19:50

    If it will be added to the core, I also agree that it should be enabled by default only on "full" configuration
  9. Josef Glatz commented on patch set 3 09/28/18, 08:12

    > Thanks for the patch. However, I don't think we should get that > merged anytime soon: > a) feature, so now v9 - saying this has been default in rtehtmlarea > does not count, this is 3 years ago. > b) it seems only a little number of persons missed that feature, > otherwise there would have been much more noise. thus, i would NOT > put that into the default core instance. this feature looks like a > perfect case that can happily live as a non-core extension for > those who need it. > c) I would not enable that feature for all 'minimal/full/...' > flavors. why should that be part of minimal set? Hey Christian, thanks for your feedback. First, as already stated in my first comment of issue, the intention is still to re-add missing features of the htmlArea. # a) You're right – the replacement was a long time ago with 8.7. At that time, I got the go from Benni to re-add those missing features – piece by piece – with everything that belongs to it. Some weeks ago I asked Benni again if it's something which we should continue and he confirmed it again that we can continue re-adding this things. I personally don't see the problem if something takes a little longer. Open source, spare time, and so on... Especially the fact, that the RTE topic has always been not a number one topic for the most of the community and the core team, so I think you should be a bit more generous about the time window of re-adding the removed features. From that fact that's a re-added feature which has now a easier configuration than before I would really like to add that as a [FEATURE] with a helpful RSt, off course. We have to be transparent. There are always hidden feature patches from time to time where I think, why such a patch isn't a FEATURE. Patchsets like these must also be possible in non-LTS releases. This actual patch can be added after the LTS release sometime and to 8.7 branch as well as it does only re-add a feature with a better base. # b) I don't see that like that. Especially the rich text editor topic need much much more love right now to support editors writing better texts. All the tools that we can provide out-of-the-box to improve that is important. We have a "max" option for textarea and input, but not for a field with activated RTE to give an example. That's the moment when a feature quickly becomes a task in the TYPO3 universe, sometime. We're getting more and more requirements in projects to limit the text length for example. The requirement gets bigger due to RWD topics. For me personally: There should be more noise around the RTE topic. I also tried to find other people to set up an initiative with a real goal to push this area of TYPO3 CMS. So far I have not been able to persuade anyone to join :-]. I have many ideas which I want to discuss with a couple of motivated people. But I also need a JavaScript pro in this initiative. For the time being I am trying to work on the RTE topic, apart from other bugfixes in the core, in my free time as much as I can. # c) The intention was to re-add a feature which was former a fixed component afaik. I agree to apply it only to full. I will push a new patchset. --- At the end it's important that we talk about it. Maybe we can start an RTE initiative with fewer people? I would love to hear also the actual opinion of Benni who we should proceed?
  10. Richard Haeser commented on patch set 3 09/28/18, 08:41

    From a SEO-perspective I really like this feature! Yes it is a feature for TYPO3, but it is not something newly developed. So I can live with it beeing a task. Or if Benni accepts it, make it a feature with permission to merge in feature freeze. I think this word-count shouldn't be in the preset minimal, but at least in full. Im in doubt for default. Maybe we can combine it with the SEO extension and have it as default when the SEO extension is installed. So I would definitely give my +1 on this. Because of the discussion I didn't check the code or functionality. It is more that the idea is very helpful for high quality content (which is important for SEO)
  11. Josef Glatz commented on patch set 3 09/28/18, 08:50

    While discussing the topic also with Richard, I came up with the conclusion, that I often use the upper limit feature in existing 8-projects for minimal RTE presets. For example the EXT:news teaser column with RTE enabled where you only have e.g. bold activated and the text should not exceed N chars/words. Requirements from SEO/Marketing perspectives. I am therefore waiting for further opinions. More important are basic decisions about re-adding features to RTE.
  12. Jan Helke voted on patch set 3 V +1 CR +1 09/28/18, 08:54

  13. Richard Haeser voted on patch set 3 V +1 CR +1 09/28/18, 09:22

  14. Frank Nägler commented on patch set 3 09/28/18, 09:43

    I am a little bit with each of you. But I also tend to not merge this into core. We have a good small set of plugins which make sense everywhere. The EKEditor can be extend very easy by extension, so put this stuff into you site extension or create an CKedtior advenced extension. I am very happy with the clean editor without the overhead we had with old RTE. no (or very less) configuration is required for the most instances.
  15. Jan Stockfisch commented on patch set 3 V +1 CR -1 09/28/18, 12:31

    Works fine for me. But I do second what Frank mentioned. Also I second what Richard said about being fine with the "full" set but wouldn't put it into "minimal". The default preset also shouldn't contain it IMHO.
  16. Jörg Bösche commented on patch set 3 CR +1 09/28/18, 12:38

    I also agree with Frank, Jan and Richard. Let's just install the plugin in the "Full" preset. Removing something from a YAML configuration is always exhausting. The developer should decide if he wants to load the plugin in the minimal, normal or custom preset.
  17. Benni Mack commented on patch set 3 09/28/18, 15:05

    Please keep the changes in Base.yaml, and remove the activation from Default and Minimal. Should go into v9 LTS, it's fully non-intrusive and fits well with what we do with the other features of maxlength on input fields. Please do not backport into v8.
  18. Jan Stockfisch commented on patch set 4 09/29/18, 14:31

    Published edit on patch set 3.
  19. TYPO3com voted on patch set 4 V +1 09/29/18, 14:41 Completed build in 09m 31s on Sat, 29 Sep, 04:41 PM Test Summary: 36122 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28901

  20. Benni Mack updated the commit message in patch set 5 09/29/18, 19:10

  21. Georg Ringer voted on patch set 5 CR +1 09/29/18, 19:26

  22. TYPO3com voted on patch set 5 V +1 09/29/18, 19:30 Completed build in 14m 11s on Sat, 29 Sep, 09:30 PM Test Summary: 36191 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28945

  23. Riccardo De Contardi commented on patch set 5 V +1 09/29/18, 20:55

    It works. I've added it to the draft documentation I wrote here https://docs.typo3.org/typo3cms/drafts/github/T3DocumentationStarter/Public-Info-002/HelloWorld/Index.html#wordcount if someone is interested.
  24. Benni Mack voted on patch set 5 V +2 CR +2 09/29/18, 21:08

  25. Benni Mack merged patch set 6 09/29/18, 21:08