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

Use text editor for editing question description #2164

Closed
wants to merge 1 commit into from

Conversation

Koc
Copy link
Collaborator

@Koc Koc commented May 12, 2024

Currently it is hard to write rich question descriptions for non-tech people. Would be nice add UI editor for that. Here some draft of this functionality. If text app isn't installed we fallback to simple textarea like it was before.

nextcloud-text-editor.mp4

Copy link

codecov bot commented May 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 44.89%. Comparing base (0c4be14) to head (2b19e93).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2164      +/-   ##
============================================
- Coverage     45.02%   44.89%   -0.13%     
- Complexity      720      725       +5     
============================================
  Files            61       62       +1     
  Lines          2776     2784       +8     
============================================
  Hits           1250     1250              
- Misses         1526     1534       +8     

@Koc Koc requested review from susnux and Chartman123 May 12, 2024 22:25
@Koc Koc force-pushed the feature/render-textareas-with-text branch 2 times, most recently from bc3ff30 to dc32473 Compare May 23, 2024 20:20
@Koc
Copy link
Collaborator Author

Koc commented May 23, 2024

does anybody know why it is not possible upload attachments into markdown?

here what we hare in current PR
image
this button does nothing. What do I wrong?

here same editor from Collectives
image

@Chartman123
Copy link
Collaborator

does anybody know why it is not possible upload attachments into markdown?

@Koc sorry, I can't help you much with this...

Regarding your questions:

  • I don't think that we should make it a hard dependency... For most forms plain text descriptions will be enough, so I'm not sure if we really need the editor at all. On the other hand for most not technically gifted people it's much easier to add formatting like that.
  • Yes, the white space below the editor is way too much. I didn't have time to look into your code, but you should try to get rid of it.

@Koc
Copy link
Collaborator Author

Koc commented May 24, 2024

@mejo- any idea? As far I can see you have experience with Collective + Text integration

@mejo-
Copy link
Member

mejo- commented May 24, 2024

@mejo- any idea? As far I can see you have experience with Collective + Text integration

So regarding the attachment support: you'll have to provide your own implementation here, because you use the editor which is not file-based and instead gets the markdown content as a property via the API. The attachments support as you know it from Text and Collectives works because there the editor is file-based and attachments can be uploaded to a related attachments folder.

As far as I know the content-based editor (different than the file-based editor) so far doesn't support adding attachments and images. The deck app has support to upload attachments via the button you referenced, but these attachments don't show up in the text document either, they just get listed as attachments. See here for the implementation.

Regarding the bottom padding of the editor, that's the standard CSS of the editor and it needs to be overwritten. Again see the deck app how it's done there.

@Koc Koc force-pushed the feature/render-textareas-with-text branch 2 times, most recently from 4a29bdc to 31c4f3a Compare May 25, 2024 20:33
Signed-off-by: Konstantin Myakshin <molodchick@gmail.com>
@Koc Koc force-pushed the feature/render-textareas-with-text branch from 31c4f3a to 2b19e93 Compare May 25, 2024 20:52
@Koc
Copy link
Collaborator Author

Koc commented May 25, 2024

I've achieved some progress with styling. You can see it on attached video in PR description. Next goal - make image upload work.

@Koc
Copy link
Collaborator Author

Koc commented Jun 17, 2024

Implementation of the images uploading functionality requires much more effort than I expected 😿 . At the same time for me it has no sense to provide UI editor without this functionality (as it was the root cause why I've started work on this task).

We can return to this later

@Koc Koc closed this Jun 17, 2024
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

Successfully merging this pull request may close these issues.

3 participants