awesome-summernote icon indicating copy to clipboard operation
awesome-summernote copied to clipboard

Request for help on the development of a new plugin

Open jvancoillie opened this issue 3 years ago • 3 comments

Hello, first of all thank you for this wonderful JavaScript library that is summernote.

I am currently developing a plugin which will allow me to manage an A4 format display to facilitate pdf editing. https://github.com/jvancoillie/summernote-pages

I'm not sure if I'm posting this request in the right place but I'm going for it.

I have some difficulties with the cursor, when entering text and arriving at the footer, the page break works as expected ditto for the CMD + ENTER but I cannot position the cursor on this new page, you can observe this behavior on the plugin demo page https://jvancoillie.github.io/summernote-pages/. If you have any idea or clues?

I take all the criticisms, I want to apologize in advance for the code that I was able to produce, I am far from being familiar with javascript.

jvancoillie avatar Jan 11 '21 18:01 jvancoillie

I just tried your demo, nice job so far. However, I wasn't able to replicate (unless I'm not fully understanding the issue) the problem. I entered a heap of Enters and the Shift+Enter (As you mentioned CMD, I think your using an Apple environment?). I used Linux + Chrome (not tried either Browsers). If you are indeed using Mac/Apple, are you using Safari? I know, and don't understand why, but Safari always seems to be 2-3 versions behind Webkit which it uses. Have you tried using different Browsers to see if it's a cross-browser issues, but as I mentioned, it worked fine for me, at least how I would expect something like this to work.

DennisSuitters avatar Jan 12 '21 00:01 DennisSuitters

Thanks for your answer and sorry for my english :(.

Am I on the right channel to discuss this issue or do you recommend another ?

The issue I am having is with the Firefox browser. I have not yet tested it on the others. I think I do not master the document.getSelection() object and the range Interface because when the page break is triggered the cursor is not positioned on this new page.

Another issue is when you select all the content with CTRL + a and start entering text, the cursor is positioned at the start of the text and this new text is not surrounded by the paragraph tag so any new writing blows up the page layout.

jvancoillie avatar Jan 12 '21 07:01 jvancoillie

Discussion here is fine, I find your English to be good so don't stress about that. Sometimes it's hard to explain what is in our heads in a way that let's others understand what we're thinking, even to like minded people.

I'm still not having the issue is you describe, unless I'm missing something. It's possible it's the behaviour of the Firefox built in API. Do try it in other Browsers though, it might help pin point what's going on.

DennisSuitters avatar Jan 12 '21 10:01 DennisSuitters