ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

[TS] ImageStyleOptionDefinition#modelElements type does not fit to the documentation

Open JensDallmann opened this issue 1 year ago • 2 comments

📝 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.

JensDallmann avatar May 10 '23 14:05 JensDallmann

Thanks for the report!

Witoso avatar May 12 '23 12:05 Witoso

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.

CKEditorBot avatar May 12 '24 03:05 CKEditorBot

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).

CKEditorBot avatar Jun 12 '24 03:06 CKEditorBot