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!
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, just follow the link!
Related
Contributions Added async option to headscript fix
Check out one of our Pimcore developers helped add the async option to the headscript, and bringing closer the release of Pimcore X! 1 min read
Contributions Fix for image assets that don’t have set dimensions
Tomislav, our Pimcore developer, has done it again and his new pull request has been accepted. Image assets have been causing some lesser issues, and now the issue… 1 min read
Contributions Validation errors with subItems without context stack fix
Our Pimcore developer, Tomislav, has solved another issue on the Pimcore platform. Find out why this pull request is important and what use will users have from this… 1 min read
