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

Change the prompt of mention to #, which will conflict with Heading later #2872

Closed
1 of 2 tasks
Cuimc opened this issue Jun 11, 2022 · 6 comments
Closed
1 of 2 tasks
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@Cuimc
Copy link

Cuimc commented Jun 11, 2022

What’s the bug you are facing?

First of all thank you very much for your tiptap
Sorry, I have a question that I have been dealing with for a long time but can't get it
I changed the prompt of the mention extension to #, but it conflicts with the extension of Heading
I've been investigating myself for a while
so...
I found that enter also triggers the syntax of Markdown,and modify it in this way
That is, I commented this code
/packages/core/src/InputRule.ts
image
Although it works, I don't know how to re-customize this method in my project
so i want to ask for help

i tried:

  1. Modify the priority of extensions

Which browser was this experienced in? Are any special extensions installed?

Google
no extension installed

How can we reproduce the bug on our side?

  1. Introduce the Heading and mentions extensions
  2. then enter # on the first line

Can you provide a CodeSandbox?

After deleting all the content, enter # and press Enter

https://codesandbox.io/s/wizardly-wiles-od132h?file=/src/components/editor.vue

What did you expect to happen?

Resolve the conflict between mention and Heading

Anything to add? (optional)

No response

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@Cuimc Cuimc added the Type: Bug The issue or pullrequest is related to a bug label Jun 11, 2022
@rfgamaral
Copy link
Contributor

This is a duplicate of: #2570 (there's a better workaround in there)

@Cuimc
Copy link
Author

Cuimc commented Jun 13, 2022

This is a duplicate of: #2570 (there's a better workaround in there)

@rfgamaral
e... I'm sorry, that's me
But I still haven't solved it, so I looked at the source code
I want to solve the idea of triggering markdown syntax from enter

@rfgamaral
Copy link
Contributor

I want to solve the idea of triggering markdown syntax from enter

But that is working as intended, that's not how you solve your issue 🤔

@Cuimc
Copy link
Author

Cuimc commented Jun 13, 2022

But #2570 doesn't work for me, so I can only find some other solutions to try.
really frustrating

@rfgamaral
Copy link
Contributor

@Cuimc I'm pretty sure you're missing something. The concept around the workaround is simple: change the mention plugin priority so that is loaded before everything else (including the input rules plugin).

Either way, opening a new issue with the same problem doesn't help anyone. This is clearly a duplicate of that same issue, there's no point in having 2 opened. But I'm not a maintainer of this project, so I can't close this anyway.

@bdbch
Copy link
Contributor

bdbch commented Jun 24, 2022

I'm closing this issue as it's a duplicate of #2570

As @rfgamaral suggested you can check out the solutions from the other issue or participate in further discussion there. I'll hop in there as soon as I find time.

@bdbch bdbch closed this as completed Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

3 participants