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 the same Markdown parser as other NC apps #991

Open
christianlupus opened this issue May 14, 2022 · 14 comments
Open

Use the same Markdown parser as other NC apps #991

christianlupus opened this issue May 14, 2022 · 14 comments
Labels
bug Something isn't working Frontend Issue or PR related to the frontend code javascript Pull requests that update Javascript code

Comments

@christianlupus
Copy link
Collaborator

The currently used markdown core v-markdown-editor seems to no longer be maintained. We should switch to another markdown solution.

At best we would use a compatible code with other NC apps to have the same flavor.

@christianlupus christianlupus added javascript Pull requests that update Javascript code Frontend Issue or PR related to the frontend code bug Something isn't working labels May 14, 2022
@seyfeb
Copy link
Collaborator

seyfeb commented May 14, 2022

Nextcloud Notes uses markdown-it as does the Markdown Editor and the Tasks app. So I would suggest switching to the same.

Edit:

There are differences in the loaded plugins for markdown-it though:

The Notes App does not load any plugins. The Tasks app loads

  • markdown-it-emoji
  • markdown-it-link-attributes
  • markdown-it-task-lists

while the Markdown editor has dependencies on

  • markdown-it-anchor
  • markdown-it-for-inline
  • markdown-it-github-preamble
  • markdown-it-highlightjs
  • markdown-it-table-of-contents
  • markdown-it-texmath
  • markdown-it-video
  • mermaid

The Text App uses

  • markdown-it
  • markdown-it-container
  • markdown-it-task-lists

Also for the core module multiple options can be set, so we still need to decide on the exact setup we want to use.

@christianlupus
Copy link
Collaborator Author

christianlupus commented May 15, 2022

The markdown-it is a parser of Markdown as far as I know. So it takes a markdown text and renders it in HTML, right?

I was more about the editor part. We could use a plain text editor, can't we? We need to tweak it anyways to do the #903 topic.

@harris2310
Copy link

Hello there, I could try to resolve this issue for you

@christianlupus
Copy link
Collaborator Author

Hello @harris2310. Thank you for your willingness to support the app.

It would be appreciated if you could provide a solution for the issue. Just comment that you are working on it and we will assign it to you (to prevent doubled work). I will be away in the next few days but you can start on it as you see fit. If you have questions or doubts, feel free to ask.

@harris2310
Copy link

Ima start working on it right now!

@christianlupus
Copy link
Collaborator Author

Hello @harris2310 did you succeed in getting this fix started? Is there anything missing that we can support you?

@harris2310
Copy link

Sorry christian, I won't be able to work on it cause I'll probably catch a job
My apologies.

@christianlupus
Copy link
Collaborator Author

OK, I will unassign you then.

@christianlupus
Copy link
Collaborator Author

No worries, we are not too active ATM.

christianlupus added a commit that referenced this issue Jun 22, 2022
See #991

Signed-off-by: Christian Wolf <github@christianwolf.email>
christianlupus added a commit that referenced this issue Jun 22, 2022
See #991

Signed-off-by: Christian Wolf <github@christianwolf.email>
@christianlupus
Copy link
Collaborator Author

I wrote a fix for the main problem. This is not zet the compatible version as suggested e.g. in this comment. The fix was just introduced to fix a security issue in NPM.

@christianlupus
Copy link
Collaborator Author

@MarcelRobitaille is this issue closed when the current PRs are merged? I just wanted to ask if there is still something open to be done.

@MarcelRobitaille
Copy link
Collaborator

@MarcelRobitaille is this issue closed when the current PRs are merged? I just wanted to ask if there is still something open to be done.

I don't think so. I did not change the markdown editor, I only changed some things around it.

@christianlupus
Copy link
Collaborator Author

I don't think so. I did not change the markdown editor, I only changed some things around it.

The editor I changed. This was the issue with the paste function we were discussing in the other issue/PR. I checked it once more. I will update the title as the topic is solved partially.

@christianlupus christianlupus changed the title Replace outdated markdown editor Use the same Markdown parser as other NC apps Jul 29, 2022
@MarcelRobitaille
Copy link
Collaborator

MarcelRobitaille commented Jul 29, 2022

I don't think this needs to remain open for any of my PRs then, to answer your question more directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Frontend Issue or PR related to the frontend code javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

4 participants