-
Notifications
You must be signed in to change notification settings - Fork 106
Adding mutiple markdown-it plugins #2730
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
base: main
Are you sure you want to change the base?
Conversation
166b826
to
e249f15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your pull request :) I've added a few comments
package.json
Outdated
@@ -54,6 +54,11 @@ | |||
"devDependencies": { | |||
"@mdi/js": "^7.4.47", | |||
"@mdi/svg": "^7.4.47", | |||
"@mdit/plugin-align": "^0.18.0", | |||
"@mdit/plugin-img-size": "^0.18.0", | |||
"@mdit/plugin-mark": "^0.18.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should really include this one. For emphasizing some text you could already make it bold or italic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I reckon that more functions are better... and at least when I tested it nothing went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@susnux what do you think about including the mark plugin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dismissed a similar PR in the past: #2201
I am not really sure we want to add additional non-commonmark and non-gh-flavor markdown.
This is different from what all other Nextcloud apps provide (Collectives, Text, Talk, Comments...).
IMHO best would be to support everything NcRichtext support (we could also just use it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔so shall i remove this and re-submit the pr?
Please don't use merge commits. It's better to rebase your branch onto our current main :) |
edaf2ec
to
3293857
Compare
Sorry, I'm new to GitHub and is really unfamiliar with this :( What should I do now |
…esizing, mark, superscript and subscript. Signed-off-by: ZYKerman <[email protected]>
Signed-off-by: ZYKerman <[email protected]>
3293857
to
f6c572b
Compare
Signed-off-by: ZYKerman <[email protected]>
@isZYKerman no problem :) I see that you managed to rebase the changes and omit the merge commit 👍🏻 And don't get me wrong: we're really happy that you stepped up and help us with this contribution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the comment I am not sure we want to add some "random" plugins making it hard to discover what kind of Markdown is supported.
Because this will make it different from e.g. Text, Collectives, Comments, Talk etc apps.
Probably the best is to just use NcRichtext like all of those (except text) are using. So the experience across Nextcloud apps is similar.
Yes, a component from our vue lib should be preferred, but there's also no way of setting the image size which could be a real problem, if want to further promote the ability to include images into descriptions |
Maybe we could make them max-width something meaning full as a preview and on click use the |
Most markdown renderers I've ever used (e.g. GitHub) automatically adapt the size of pictures to that of webpages. Just type |
So....... What is out final solution? @Chartman123 @susnux |
Hello there, 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.) |
In #1006 I reported that Forms fails to resize pictures when they are rendered and @Chartman123 gave me a useful plugin
@mdit/plugin-img-resize
to solve this. I managed to add it into Forms. I also added other 4 plugins including@mdit/plugin-align
,@mdit/plugin-mark
,@mdit/plugin-sub
and@mdit/plugin-sup
which allow users to align or mark their text and add superscripts or subscripts.Effects:

