ckeditor5-react
ckeditor5-react copied to clipboard
Ability to add attributes to the root div
It would be awesome if we could pass through attributes that get applied directly to the root div element here
We have a use case where we want to apply data-testid
to this div. We were applying it with the CKEditor ref after it had been setup. Due to how CKEditor resets attributes on focus
& blur
, these custom attributes, were being removed.
Is it possible to add in something like this to fix the issue? This is a loose implementation for our use-case and you may want to do some filtering on the provided props.
The tricky case here is not to introduce an XSS vector attack. So, we should avoid copying each attribute. Instead, we could apply [class]
, [id]
and [data-*]
. Perhaps even more, but it requires research.