Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolbar not showing on selecting text. #1581

Open
mdsafeeuddin opened this issue Jul 5, 2021 · 0 comments
Open

Toolbar not showing on selecting text. #1581

mdsafeeuddin opened this issue Jul 5, 2021 · 0 comments

Comments

@mdsafeeuddin
Copy link

mdsafeeuddin commented Jul 5, 2021

I'm using medium-editor in angular 11. Its a blog application, where i'm using medium-editor for blog content ("medium-editor": "^5.23.3",). On trying to edit the same content, after saving and re fetching from the database, toolbar does not show.

when i create a new blog the toolbar shows on selecting the content written, but when i try to update the content by selecting, toolbar does not show.

I have MediumEditorComponent, which is being used in the parent component as

on fetching the data back from server, i'm sending the data to medium editor component through an input:
<medium-editor [dataForInnerHtml]="data"></medium-editor>

and in MediumEditorComponent, i'm setting this data in editor as:
this.editor.setContent(this.dataForInnerHtml)

and my toolbar options goes like this:

        allowMultiParagraphSelection: true,
        buttons: this.BUTTONS,
        diffLeft: 0,
        diffTop: -10,
        firstButtonClass: 'medium-editor-button-first',
        lastButtonClass: 'medium-editor-button-last',
        // relativeContainer: null,
        standardizeSelectionStart: true,
        static: false,
        /* options which only apply when static is true */
        align: 'center',
        sticky: false,
        updateOnEmptySelection: false
      }

Screenshot from 2021-07-05 15-32-14
Screenshot from 2021-07-05 15-35-30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant