Contributions 1 min read

# WYSIWYG: char counter and maxChar limit in datatype fix

Check out how one of our Pimcore developers helped improve Pimcore's WYSIWYG editor!

Last updated on 29 August, 2025

## Key takeaways

1. Pimcore's WYSIWYG editor had no easy way to limit the number of characters or show a live character count while typing.
2. A Factory developer added the CKEditor wordcount plugin, the editor component Pimcore uses for its WYSIWYG editable.
3. The contribution adds a maximum character field to the WYSIWYG data type, which applies a character limit when the editable is initialised.
4. The change lets developers limit WYSIWYG content natively in Pimcore, a need that came up on projects while writing documentation.

## **What was the issue?**

There was no easy way of limiting the number of characters in a WYSIWYG, which was a feature that could be really useful to us and many other developers for limiting content for the end-user. In addition to limiting the number of characters, a character counter would also be of use by constantly showing the number of characters while the user is typing.

## **How did you solve it?**

For the feature to be implemented, I had to add the wordcount plugin for CKEditor, which is the component Pimcore uses for its editable WYSIWYG. After adding the required files and initializing them in the CKEditor configuration, I’ve added a maximum character field to the WYSIWYG data type which I would then read while initializing the editable and apply character limiting if it was set.

## **Why is this fix important?**

In some projects, while the documentation was being written we encountered the need to limit the number of characters a WYSIWYG could hold. Currently, there is no counter and limiting isn’t possible. By adding this, we could finally use character limiting natively inside Pimcore without any hassle and I think that many other developers will appreciate this feature as well.

## **How does it feel to contribute to a platform such as Pimcore?**

Since this is my first contribution on an open-source project ever, plus it’s for Pimcore which I use on a daily basis (and enjoy it of course), I’ve been delighted to be part of the contributing community. Feels special knowing that you can say ‘hey, I did that’, once your contribution gets released.

And if you want to check out this [pull request](https://github.com/pimcore/pimcore/pull/9554https://github.com/pimcore/pimcore/pull/9554), just follow the link!

## Related

[Contributions **New feature: DataObject::getBy system properties** We've built another Pimcore feature! Check out how Tomislav, our backend developer, created an entire new functionality. 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/new-pimcore-feature-dataobject) [Contributions **Fix for no scroll in grid/list view of assets folder** We've contributed with yet another pull request! Our developers are continuously working on making Pimcore a better platform for both users and developers - and it's working! Check… 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/no-scroll-fix) [Contributions **Object brick – Allowed classes sorting and filtering** Another day - another pull request! Our Pimcore developer, Dino, has made sure that Pimcore object bricks gain a new upgrade. Check it out! 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/object-brick-sorting-filtering)

---

Source: https://factory.dev/pimcore-knowledge-base/contributions/wysiwyg-char-counter-datatype-fix
