mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-03-24 12:56:59 +00:00
[GH-ISSUE #3628] [Bug] No backslash to ignore markdown in AppFlowy #1647
Labels
No labels
2024
2025
2026
acct mgmt
AI
automation
bug
calendar
ci
CJK
cloud
code-block
collaboration
copy-paste
database
data migration
data sync
deploy
desktop
develop
develop
documentation
duplicate
editor
editor-plugin
emoji
export
files
flutter-only
follow-up
formula
good first issue for devs
good first issue for experienced devs
grid
hacktoberfest
HACKTOBERFEST-ACCEPTED
help wanted
i18n
icons
images
importer
improvements
infra
install
integrations
IR
kanban board
login
look and joy
mentorship
mobile
mobile
needs design
new feature
new feature
non-coding
notes
notifications
onboarding
organization
P0+
permission
platform-linux
platform-mac
platform-windows
plugins
program
pull-request
Q1 25
Q1 26
Q2 24
Q2 25
Q3 24
Q3 25
Q4 24
Q4 25
react
regression
rust
rust
Rust-only
Rust-only
Rust-starter
Rust-starter
self-hosted
shortcuts
side panel
slash-menu
sync v2
table
tablet
task
tauri
templates
tests
themes
translation
v0.5.6
v0.5.8
v0.5.9
v0.6.0
v0.6.1
v0.6.4
v0.6.7
v0.6.8
v0.7.1
v0.7.4
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.8.0
v0.8.4
v0.8.5
v0.8.9
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AppFlowy-IO/AppFlowy#1647
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MayurSMahajan on GitHub (Oct 5, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3628
Originally assigned to: @hyj1204 on GitHub.
Bug Description
Appflowy Editor is a markdown editor, we use commonly use markdown shortcuts like double underscores to make text italic, etc.
But right now there is no way to ignore the markdown syntax.
So if a user wants to surround something with two underscores and not make it italic and display it like: _sometext_.
Then it is not possible.
Other markdown editors support the use of the backslash key () to ignore the markdown syntax.
How to Reproduce
Expected Behavior
Users should be able to use the backslash key to ignore the markdown syntax if they want.
Operating System
Windows 11
AppFlowy Version(s)
0.3.4
Screenshots
https://github.com/AppFlowy-IO/AppFlowy/assets/47064215/ae7f0b8d-2394-45f4-9ce5-f162447a0c7b
Additional Context
This happens with Styling Markdown syntax
https://docs.appflowy.io/docs/appflowy/product/markdown#styling-text
Originally noticed in #3624
@PalaniappanC commented on GitHub (Oct 6, 2023):
Hi @MayurSMahajan I would like to work on this issue. Please assign it to me
@MayurSMahajan commented on GitHub (Oct 6, 2023):
Assigned have fun!
@PalaniappanC commented on GitHub (Oct 13, 2023):
Update: I have started working on this. Will provide another update by weekend
@tmaiaroto commented on GitHub (Oct 27, 2023):
Can markdown parsing be something disabled via config setting? So if off and we want markdown, typing
/to bring up the menu to choose a "markdown" option (like code block, image, table, etc. already are today) would switch that block to markdown?I like the shortcut to avoid having markdown parsed, but I would prefer to disable markdown completely by default and choose when to use it. Most times I just want a very simple text editor.
Also ok with the same backtick shortcut GitHub has, but the problem is you can't edit text in there. In other words, you need to type everything at once. If you go back in between the backticks, you're adding normal text.
The second issue is that markdown is parsed while you are in the middle of the backtick.
So you type ` and then go to type a word with two underscores before you close that backtick and things end up italic inside the red code.
Ultimately the markdown parsing makes it impossible to do anything other than use a code block if you have multiple underscores in a line. It's a way big issue actually. I know I just rattled off what are a few different issues, sorry.
@MayurSMahajan commented on GitHub (Oct 27, 2023):
Hey @tmaiaroto ! Thanks for your feedback. I will create a separate issue for your feature request. A way to disable and enable markdown feature.
@Xazin commented on GitHub (Oct 29, 2023):
Note for implementation: Use RegExp and use a negative lookbehind for
\.@Xazin commented on GitHub (Oct 29, 2023):
@PalaniappanC Are you still working on this?
@PalaniappanC commented on GitHub (Oct 30, 2023):
Yes @Xazin. Even if not part of hacktoberfest I would like to continue
@PalaniappanC commented on GitHub (Oct 30, 2023):
I am not able to debug the backend code which has the logic for mark down
@Xazin commented on GitHub (Oct 30, 2023):
All of the markdown parsing happens on the front end, mostly powered by character shortcuts.
There should be no backend work involved in this feature.
@DevaanshPathak commented on GitHub (Dec 8, 2023):
I tried going through the front end but was unable to find the feature. Can someone link the file?
@Xazin commented on GitHub (Dec 10, 2023):
Hey Devaansh, this issue is not easy to complete, hence the "good first issue for experienced devs".
There are some implications with the way we implement character shortcuts, and thus this has to be completed in the AppFlowy Editor repository.
One supposed solution would be to implement a generic check for any character shortcut that does transformations (and this would require the character shortcut to have a flag that is a promise that they do a transformation), and then if they have this flag, don't run the character shortcut if it is canceled by the backslash.