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

Fix bad link formatting #5985

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix bad link formatting #5985

wants to merge 2 commits into from

Conversation

kujaomega
Copy link

Pull Request Requirements:
This PR removes link formatting from tiptap fixing bad link formatting:
Screenshot from 2024-07-02 21-14-52
The changes adds links to URLs only.

@kujaomega kujaomega force-pushed the main branch 2 times, most recently from 3ab2144 to 8861698 Compare July 2, 2024 19:27
@@ -54,11 +54,7 @@ export const DefaultKit = Extension.create<DefaultKitOptions>({
Highlight.configure({
multicolor: false
}),
Typography.configure({}),
Link.configure({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You cannot just remove this extension:

  1. Link button in toolbar will be broken
  2. Existing content that contains links will be broken

@@ -49,7 +100,9 @@
{#if node.type === MarkupNodeType.doc}
<MarkupNodes {nodes} {preview} />
{:else if node.type === MarkupNodeType.text}
{node.text}
<p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding additional paragraphs may affect layout

@@ -49,7 +100,9 @@
{#if node.type === MarkupNodeType.doc}
<MarkupNodes {nodes} {preview} />
{:else if node.type === MarkupNodeType.text}
{node.text}
<p>
{@html urlify(node.text)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@html is potentially dangerous , we are trying not to use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants