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

[Bug]: Code Mark not working as WYSIWYG #5096

Open
1 of 2 tasks
cuserdzy opened this issue Apr 25, 2024 · 0 comments
Open
1 of 2 tasks

[Bug]: Code Mark not working as WYSIWYG #5096

cuserdzy opened this issue Apr 25, 2024 · 0 comments
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@cuserdzy
Copy link

Which packages did you experience the bug in?

extension-code, react

What Tiptap version are you using?

2.3.0

What’s the bug you are facing?

The code mark didn't shows as WYSIWYG whatever I type `` or anything random string inside it for example random:
image

The only works way is using shortcut command+E (on my mac), but even with the shortcut, the result is not as expected, for example the code mark works if I press command+E and then type, but not works if I press command+E then then paste. In the later situation, the code mark seems to be overwritten by the paste content.

So there are two problems:

  1. The single backtick doesn't work as WYSIWYG like triple backticks(code block).
  2. I hope the editor can show backticks if focus on code mark or code block, like Obisidian, it help me understand where my cursor is. I'm not sure whether this is a bug or feature request, but I have no idea how to solve this. It would be helpful if you can give some directions :)

What browser are you using?

Chrome

Code example

https://codesandbox.io/p/devbox/wlwqtv?file=%2Fsrc%2FApp.jsx%3A17%2C95

What did you expect to happen?

After type single backticks or triple backticks, could show like below:
Screenshot 2024-04-25 at 13 49 08
Screenshot 2024-04-25 at 13 51 18

The backticks will hide if lost focus:
Screenshot 2024-04-25 at 13 53 32

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. 💖
@cuserdzy cuserdzy added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Apr 25, 2024
@cuserdzy cuserdzy changed the title [Bug]: [Bug]: Code Mark not working as WYSIWYG Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
Status: Triage open
Development

No branches or pull requests

1 participant