A WYSIWYG editor can be used instead of a simple textbox. This would give senders more tools for editing text.
Hi @jonatoni I want to work on this issue to improve the editor. I would add the required functionality on both frontend and backend. I would be grateful if you assign this issue to me.
I like the idea. @jflory7 @anxh3l0 @bt0dotninja what do you think about this?
Metadata Update from @jflory7: - Issue priority set to: needs review (was: awaiting triage) - Issue tagged with: difficulty - easy, needs info, new change, type - frontend
I think this is an acceptable addition. It doesn't fit well to our project goals for prefer Fedora-specific changes. But if we send a pull request upstream, then I think it's okay.
One advance thought, this change should include new tests to protect against bad user input (e.g. someone trying to include malicious text or execute database queries in their Happiness Packet message body).
Does this conflict with #30 with emoji input? Does it make sense to roll #30 into this ticket? We should identify which one is higher priority first.
@jflory7 I think we can provide the emoji input using the WYSIWYG editor too. But first We have to make sure that we protect against the bad user input. The two major improvements we will need are : - We have to sanitize all the <script> tags too, as not doing this can cause XSS attacks on the server. And We also have to protect against the SQL injection to execute database queries.
If you think this is a good idea. Please assign this to me i want to work on this.
@jflory7 If no one is working on this, I'd like to take this up :)
@shraddhaag Sure! :thumbsup: I think it makes sense for this ticket to also include #30 for emoji support.
Are you thinking of doing this with django-froala-editor?
Metadata Update from @jflory7: - Issue assigned to shraddhaag
Metadata Update from @jflory7: - Issue untagged with: difficulty - easy, needs info - Issue priority set to: waiting on assignee (was: needs review) - Issue tagged with: PASSED, type - summer coding
@shraddhaag Sure! 👍 I think it makes sense for this ticket to also include #30 for emoji support.
I'd also like to include #29 for video support under this ticket.
As I was going through the docs while implementing it, at the very end I came across License. It requires us to purchase a license to use this in production. Is this viable to use this in our code base?
I looked into other WYSIWYG editors and came across CKEditor. The latest version CKEditor v5 has no support for emojis but has support for media [twitter/video/github/Google Maps] embed. CKEditor4 has support for both emoji and media embed. Should I go forward with integrating this older version v4 in our project?
I see. Looking closer, it looks like an open source library to integrate with their proprietary web software. Clever wording in the README. :stuck_out_tongue_closed_eyes:
Generally as a rule, Fedora aims to always use and implement free and open source software solutions (as per the Four Foundations of the Fedora Project). Therefore, we are unable to use this.
I'd also like to include #29 for video support under this ticket. I looked into other WYSIWYG editors and came across CKEditor. The latest version CKEditor v5 has no support for emojis but has support for media [twitter/video/github/Google Maps] embed. CKEditor4 has support for both emoji and media embed. Should I go forward with integrating this older version v4 in our project?
CKEditor looks promising. :thumbsup: This could be an alternate. I have two questions after looking closer:
Hi @shraddhaag, any updates on this ticket so far?
@jflory7 Sorry about the extremely delayed response!
Does this introduce a dependency on NodeJS? It was unclear to me if there is a clean way to integrate with Python/Django without Node.
Django-ckeditor is a python library provided by CKEditor to integrate it in Django. This does not introduce a depedency of NodeJS in our project. I have been successfully able to integrate the editor in our project.
Do you know if emojis are on the roadmap for CKEditor v5 soon? I skimmed through the docs but it wasn't clear.
The documentation mentions that django-ckeditor provides only the plugins maintained by the ckeditor develops team. Emoji isn't one of those plugins. As an alternate way, additional plugins can be added using this. But to use that CKEditor v4.10 or greater is needed and djnago-ckeditor is at CKEditor 4.7.3 as mentioned in the latest changelog. I'm not sure what will be the best route to take for integrating emojis.
django-ckeditor
The editor looks like this:
If this seems right, should I open a PR for the same?
@shraddhaag Thanks for the analysis! Even though CKEv5 does not include emojis, I think django-ckeditor is the best option. The project is being actively worked on based on the activity in the GitHub repository. We can keep emojis on the FHP roadmap if emoji support is introduced later.
A PR for this would be super. :smile:
Completed by PR #226. Super work @shraddhaag! :thumbsup:
Closing as complete.
Metadata Update from @jflory7: - Issue close_status updated to: complete - Issue status updated to: Closed (was: Open)
Metadata Update from @jflory7: - Issue set to the milestone: Summer Coding 2019: community bonding