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

WYSIWYG Editor #9048

Closed
wants to merge 25 commits into from
Closed

WYSIWYG Editor #9048

wants to merge 25 commits into from

Conversation

Akshay0701
Copy link
Member

@Akshay0701 Akshay0701 commented Jun 2, 2021

Purpose / Description

Follow-on from #7962 with commits cleaned and most review feedback handled.

Performed as trgk on Discord is interested and it'd be great to get this across the finish line.

Required:

  • A few TODOs related to the WebView renderer crashing. See: onRenderProcessGone

Fixes

Fixes #1377

Features

  • Bold/Italic/Underline
  • Text Align
  • Cloze
  • Remove Formatting
  • MathJax
  • Insert & Delete Image & move via copy/paste
  • Record Audio
  • Horizontal Line
  • Sound and Video work via [sound:] (same as AnkiDesktop)
  • Text/Background Color
  • View HTML
  • Custom Toolbar Buttons
  • WhiteBoard
  • Undo / Redo

@Akshay0701
Copy link
Member Author

should we consider this https://github.com/mrudultora/Colorpicker color picker ?

@mikehardy
Copy link
Member

I'm okay with @mrudultora's color picker yes

@Akshay0701 Akshay0701 force-pushed the visual_editor branch 6 times, most recently from bbc9340 to 89fa147 Compare June 5, 2021 18:53
@Akshay0701 Akshay0701 marked this pull request as ready for review June 6, 2021 14:56
@Akshay0701 Akshay0701 marked this pull request as draft June 6, 2021 16:18
@Akshay0701 Akshay0701 force-pushed the visual_editor branch 2 times, most recently from 7b35cb8 to 88c0d98 Compare June 9, 2021 06:23
@Akshay0701
Copy link
Member Author

@david-allison-1 you mentioned in #9048 (comment) that the iframe is not working, I did search whether its summer note problem or browser and found the cause tneotia/html-editor-enhanced#12

the solution is to append `https: in src then it's working fine

@Akshay0701
Copy link
Member Author

one question: do we really need to give the option to embed links or videos in notes? because upstream anki doesn't have that functionality.

@david-allison
Copy link
Member

one question: do we really need to give the option to embed links or videos in notes? because upstream anki doesn't have that functionality.

If Anki didn't have it, then there's no need to handle it

@prateek-singh-3212
Copy link
Member

Hi @Akshay0701 ,
I Just wanted to ask that have you updated the summernote version? because in the version which we are using their are several bugs in it (I have Not followed this PR for long time so I don't know if you have done so..).

@david-allison-1 I Just wanted to know that how to do I contribute in this PR ? I their is the way by which 2 people can contribute in 1 PR.

@Akshay0701
Copy link
Member Author

Akshay0701 commented Jun 11, 2021

I Just wanted to know that how to do I contribute to this PR? There is a way by which 2 people can contribute to 1 PR.

yes sure,
pull this pr on your local machine,
then clone pr and you can change and add commits to it,
after you did publish your branch and share its link here, we will look at that branch and I will cherry-pick your commits
btw what will you like to contribute?

@Akshay0701 Akshay0701 requested a review from david-allison June 14, 2021 13:07
@Akshay0701 Akshay0701 marked this pull request as ready for review June 16, 2021 13:22
@Akshay0701 Akshay0701 changed the title Draft: WYSIWYG Editor WYSIWYG Editor Jun 16, 2021
david-allison and others added 13 commits January 15, 2022 00:10
This is because summernote cannot currently cut if an image is selected,
so we implement this ourselves.

WebView is also buggy, disallowing "cut" on the CAB if only an image is
selected, so we fix this via creating a custom MenuItem.
Equation icon my own work.
Derivative of Roboto Font and Google Material Design icons
Licensing under Apache 2.
To stop TransactionTooLargeException
@Akshay0701
Copy link
Member Author

Akshay0701 commented Jan 14, 2022

updates

  1. cleaned the code(more to be done),
  2. comment redo/undo buttons for now(will solve this bug)
  3. audio button error(i looked into it, new changes have been done, wherein audio recording activity needs fields, whereas in visual editor activity we don't have all fields, I still don't understand the error properly, trying...)
  4. commits are full of mess(pardon me for this, don't review the code commit vise, i request reviewers to review the whole activity of visual editor, and let me know if there are more bugs or any changes you want)

@Akshay0701 Akshay0701 added the Help Wanted Requesting Pull Requests from volunteers label Jan 17, 2022
1 Extracted toolbar code to VisualEditorToolbar
2 Dropped OrderedList and UnorderedList feature from editor(buggy and AnkiDesktop doesn't have this feature)
3 Dropped RegisterMediaForWebView and used MediaRegistration class
4 audio fix
@github-actions
Copy link
Contributor

Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Jun 25, 2022
@github-actions github-actions bot closed this Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Requesting Pull Requests from volunteers Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"What-You-See-Is-What-You-Get" note editor (no HTML code visible to user)
4 participants