Skip to content

RTE Overlapping text In Basic Text Component when Width & Height are 100% of Canvas #3782

Answered by mattnoth
mattnoth asked this question in Q&A
Discussion options

You must be logged in to vote

the comparison statement might have to change based on window size but this should flip the positioning of the RTE to the bottom of the canvas

	editor.on('rteToolbarPosUpdate', (pos) => {
            if (pos.top <= 0 && pos.top > -8) {
                let toolbarDiv = editor.RichTextEditor.getToolbarEl()
                let toolbarHeight = toolbarDiv.scrollHeight
                let rect = editor.Canvas.getRect()
                pos.top = (rect.height - toolbarHeight) + (pos.top - pos.canvasOffsetTop)
            }
        });

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
4 replies
@mattnoth
Comment options

@mattnoth
Comment options

@artf
Comment options

artf Sep 18, 2021
Maintainer

@mattnoth
Comment options

Comment options

You must be logged in to vote
5 replies
@mattnoth
Comment options

@ronaldohoch
Comment options

@mattnoth
Comment options

@mattnoth
Comment options

@mattnoth
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by mattnoth
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
3 participants