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

[FR] Markdown divider implement ___ #2372

Closed
annieappflowy opened this issue Apr 28, 2023 · 18 comments · Fixed by AppFlowy-IO/appflowy-editor#199
Closed

[FR] Markdown divider implement ___ #2372

annieappflowy opened this issue Apr 28, 2023 · 18 comments · Fixed by AppFlowy-IO/appflowy-editor#199
Assignees
Labels
editor features related to the rich-text editor new feature New feature or request

Comments

@annieappflowy
Copy link
Collaborator

Description

You can use ___ on its own line to add a horizontal bar.

Impact

Markdown users

Additional Context

No response

@annieappflowy annieappflowy added new feature New feature or request editor features related to the rich-text editor labels Apr 28, 2023
@AmanNegi
Copy link
Contributor

Hey there, I would like to work on this. If I'm right this is similar to our Octernship task right?

@annieappflowy
Copy link
Collaborator Author

This is to implement a markdown syntax
@AmanNegi , would you like to give it a try?

@AmanNegi
Copy link
Contributor

I would like to but I didn't get what you exactly meant by implementing a markdown syntax. If something similar is already implemented could you please redirect me?

@annieappflowy
Copy link
Collaborator Author

The Markdown guidebook: https://appflowy.gitbook.io/docs/essential-documentation/markdown
An example illustrating how to implement: #1100

@AmanNegi
Copy link
Contributor

Yeah this is similar to the Octernship task... I can surely work on this

@annieappflowy
Copy link
Collaborator Author

Sounds good! Thank you 🙏

@AmanNegi
Copy link
Contributor

Hey there, sorry I was busy so this issue went inactive. I just now started looking at this issue, however I just noticed that --- has been previously implemented to add divider but it doesn't work currently. Also, I wanted to ask that the appflowy_editor was previously released separately, so is this issue still relevant here?

@Xazin
Copy link
Contributor

Xazin commented May 12, 2023

Hey there, sorry I was busy so this issue went inactive. I just now started looking at this issue, however I just noticed that --- has been previously implemented to add divider but it doesn't work currently. Also, I wanted to ask that the appflowy_editor was previously released separately, so is this issue still relevant here?

It should be implemented in the appflowy_editor repository.

Most, if not all, issues that have the tag Editor are related to the appflowy_editor project, and thus have to be implemented there.

All that has happened, is that the editor itself was decoupled from AppFlowy project, allowing others to easily adopt the Editor to build their own applications.

@AmanNegi
Copy link
Contributor

AmanNegi commented May 12, 2023

Okay great thanks a lot for the clarification @Xazin. However, I believe that we are supposed to create the shortcuts, builders and menu item within the main project itself, as we already have a few under plugins\document\presentation\plugins. Correct me if I am wrong here.

Can you please clarify on this @LucasXu0.

@Xazin
Copy link
Contributor

Xazin commented May 12, 2023

Okay great thanks a lot for the clarification @Xazin. However, I believe that we are supposed to create the shortcuts, builders and menu item within the main project itself, as we already have a few under plugins\document\presentation\plugins. Correct me if I am wrong here.

Can you please clarify on this @LucasXu0.

I don't think so, divider is a common markdown syntax, I'm not sure why it was implemented in the main project, it's most likely a remnant. This https://github.com/AppFlowy-IO/AppFlowy/tree/main/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/divider should be moved to the editor at this location https://github.com/AppFlowy-IO/appflowy-editor/tree/main/lib/src/render

Along with what it touches. (And support for ___ should be added)

Similary the markdown encoder/decoder should be updated to include the divider notation support. See https://github.com/AppFlowy-IO/appflowy-editor/tree/main/lib/src/plugins/markdown

@AmanNegi
Copy link
Contributor

Okay, so we are supposed to make the changes in the editor repo. Sorry for the delay, now that it's clear I will work on this immediately. ✨

@annieappflowy
Copy link
Collaborator Author

Not related to the thread...
@AmanNegi , what's your Discord handle? Please DM me on Discord.

@annieappflowy
Copy link
Collaborator Author

@AmanNegi , are you still working on this?

@AmanNegi
Copy link
Contributor

Yep now I am working on this, was waiting for the merging of develop and main branch.

@Xazin
Copy link
Contributor

Xazin commented Jun 13, 2023

Yep now I am working on this, was waiting for the merging of develop and main branch.

See for reference AppFlowy-IO/appflowy-editor#118
All you need to do is add a Shortcut for _ that triggers the insertDividerHandler.

On editor repo.

@AmanNegi
Copy link
Contributor

Thanks for the reference @Xazin. Perhaps should I move this issue in the editor_repo?

@Xazin
Copy link
Contributor

Xazin commented Jun 13, 2023

Thanks for the reference @Xazin. Perhaps should I move this issue in the editor_repo?

No need, it's fine, we can still link to this issue from the PR.

@AmanNegi
Copy link
Contributor

Okay great! 😺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor features related to the rich-text editor new feature New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants