Skip to content

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

@codecov
Copy link

codecov bot commented May 12, 2024

Codecov Report

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

Project coverage is 44.89%. Comparing base (0c4be14) to head (2b19e93).
Report is 518 commits behind head on main.

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 Chartman123 and susnux 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
@github-actions
Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants