medium-editor icon indicating copy to clipboard operation
medium-editor copied to clipboard

Toolbar not showing on selecting text.

Open mdsafeeuddin opened this issue 3 years ago • 0 comments

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

mdsafeeuddin avatar Jul 05 '21 10:07 mdsafeeuddin