Closed CaptainDredge closed 4 years ago
Deploy preview for text-to-handwriting processing.
Building with commit 9ce49285c9f70764cc84d9821bc71ad389fc3b9e
https://app.netlify.com/sites/text-to-handwriting/deploys/5f4526fc88cd110007b7bc70
Thank you for the PR @CaptainDredge. I haven't checked PR properly but we can't paste content inside page. It is throwing some error in console. Can you check?
Also, is there any reason why it is using jQuery and not JavaScript. It is better to avoid additional dependencies as it will make code complicated to maintain. Can it be done without jQuery?
@saurabhdaware I've corrected the paste event handler. Also, Jquery is necessary for event delegation in dynamically added pages. There's neither an easy nor an elegant solution of this in pure javascript.
@saurabhdaware Have you looked into the PR now?
Hi there, I am on a break right now so I will try to check it by the next week. I hope it is fine with you. Thanks!
Hi, I just checked in the preview. It is not working when we have text larger than the area. Normally it is suppose to generate multiple images when a user pastes large text in the textarea.
No according to updated functionality user can paste as much text as he wants but page will contain only the text it can accommodate on one page. Then you've to add another page to paste the remaining text. And that's how even actual pages in notebook works. Adding the functionality of accommodating all the text and moving it to the next pages according to current status of page capacity itself is a pretty complicated task and that'll essentially make it like MS word.
No, I meant pasting large text at once. It was one of the reasons to have a scrollbar so that they can paste in one box. There were lots of people initially who wanted a way to generate multiple images in a single paste so the usecase is too common to ignore
@saurabhdaware Added that functionality although I had to do a lot of thinking behind implementing it 😅 You can now paste large text and it'll generate new pages accordingly. Also, when typing when the current page gets filled it'll generate the next page automatically. If the pasted content is too large it does have some performance implications associated with it.
This looks amazing!
Few things are not working as expected: https://res.cloudinary.com/saurabhdaware/video/upload/v1598336022/photos/2020-08-25_11-40-06.mp4
Let me know if it is possible to fix this otherwise maybe I can take this code to separate branch and see if I can do something.
Thanks and not sure if adding page below was intended but it actually looks great! maybe we can have a scrollbar like we had before but have multiple pages in the scroll instead a single section. That would look great
I think its happening because of the event handlers attached to key down. But the keys pressed here like ^C
and backspace
are not meant to trigger those callbacks attached to those handlers. The first issue where spacebar is adding line breaks is not there in Google chrome which I use but its there in Firefox. I think there's some cross-browser compatibility issue in some function used in code which seems tough to figure out. You can definitely take the code to a separate branch to figure things out especially the first issue.
@saurabhdaware have checked on the first issue? I had already resolved the other two
not yet. I'll merge the PR in separate branch and will check what I can do. Thank youu!
So will I be added to the contributor list or not?
Yes you will be added to contributor list. The list on the website comes from GitHub API so the name will be reflect there after I merge this new branch into master. I will have to make some changes before that.
@saurabhdaware can you let me know what are the issues here?
Fixes #81 Fixes #82
In this PR I've tried to solve issue #81 and #82 by making the whole layout of pages discrete rather than continuous ones. It has several advantages in terms of performance as well as user interaction.