Skip to content

set editor's min-height via ck-editor__editable but the image would over stretch #92

Closed
@anysunflower

Description

@anysunflower

Hi, I would like to report an issue about the editor height style setting.
When I use <ckeditor [editor]="Editor" ></ckeditor> I hope I can set up the editor's min-height, so I follow the step in the doc:
CKEditor-angular:Setting the height via the component stylesheet

It work, but came along with another question,when I insert an image in the editor,the image would show like that:
2019-04-16 15-55-44 的屏幕截图

The image caption size would stretch to fill the min-height, this kind of make user hard to edit after insert an image.

I have no idea about how could I set the min-heightof the editor and set the image caption with the common height at the same time.

It would be much appreciate If anyone have a good solution

Activity

ma2ciek

ma2ciek commented on Apr 16, 2019

@ma2ciek
Contributor

Hi @anysunflower!

The problem here is that the editor caption also is an editor itself, that's why it's so big. I see that we have a small error in docs. you can use for now the style below and we'll try to update docs soon.

:host ::ng-deep .ck-editor__editable:not(.ck-editor__nested-editable) {
    min-height: 500px !important;
}

Ref: https://stackoverflow.com/questions/52485000/how-to-set-ckeditor-5-height/52485082#52485082

Personally speaking, I don't like this :not part, maybe we can figure out something else.

added this to the iteration 24 milestone on Apr 16, 2019
anysunflower

anysunflower commented on Apr 16, 2019

@anysunflower
Author

@ma2ciek
this works well,thank you so much for the speedy reply 👍

Reinmar

Reinmar commented on Apr 16, 2019

@Reinmar
Member

Eee... if nested editables have the same class, then how can https://stackoverflow.com/questions/46559354/how-to-set-the-height-of-ckeditor-5-classic-editor have 50 upvotes? :O How could we miss that?

We need to fix this on SO, in our docs and wherever else we've made that mistake.

ma2ciek

ma2ciek commented on Apr 16, 2019

@ma2ciek
Contributor

I'd mark it as a DUP of a ckeditor/ckeditor5#1708 which is a more accurate issue.

removed this from the iteration 24 milestone on Apr 16, 2019
added
resolution:duplicateThis issue is a duplicate of another issue and was merged into it.
on Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolution:duplicateThis issue is a duplicate of another issue and was merged into it.type:docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Reinmar@oleq@ma2ciek@anysunflower

        Issue actions

          set editor's min-height via ck-editor__editable but the image would over stretch · Issue #92 · ckeditor/ckeditor5-angular