ckeditor5
ckeditor5 copied to clipboard
[TS] ImageStyleOptionDefinition#modelElements type does not fit to the documentation
📝 Provide detailed reproduction steps (if any)
When I want to configure the image styles without the modelElements
parameter I get a compilation error.
Configuration:
image: {
styles: {
options: [
//@ts-expect-error missing the attribute modelElements which is optional.
{
name: 'inline',
title: localize('Page default', language),
icon: pageDefaultIcon,
}
]
},
.
.
.
},
While the type of modelElements
does not permit undefined
the documentation allows undefined
.
https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-image/src/imageconfig.ts#L700-L703
I assume the modelElements: Array<string>;
should be modelElements?: Array<string>;
✔️ Expected result
No compile error because modelElements
is missing.
❌ Actual result
Compile error because of modelElements
.
- First affected CKEditor version: 37.0.1 & 37.1.0
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
Thanks for the report!
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.
We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).