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

Request for help on the development of a new plugin #81

Open
jvancoillie opened this issue Jan 11, 2021 · 3 comments
Open

Request for help on the development of a new plugin #81

jvancoillie opened this issue Jan 11, 2021 · 3 comments

Comments

@jvancoillie
Copy link

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.

@DennisSuitters
Copy link
Member

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.

@jvancoillie
Copy link
Author

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.

@DennisSuitters
Copy link
Member

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.

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

2 participants