zesty-io / manager-ui

Content platform powering enterprise websites and applications
https://www.zesty.io
Other
41 stars 6 forks source link

Adding a link to using wysiwyg doesn't work with relative paths #58

Closed giseleblair closed 4 years ago

giseleblair commented 4 years ago

Describe the bug In the wysiwig, creating a link will not function as expected when href is a relative path.

To Reproduce Steps to reproduce the behavior:

  1. On a wysiwyg editor, with text.
  2. Highlight some text and click on the link icon to create a link for that text.
  3. in the URL input, add a relative path. i.e: /blog
  4. Click save.
  5. With the text still highlighted, click on the link icon and note that the slash is removed from the input field. i.e: it will now read "blog" instead of "/blog"
  6. Save the entry and preview the page.
  7. Click on the newly created link text.
  8. The relative path is added to the current url, and not to the root domain.

Expected behavior Expect to have the relative path added to the root domain. Also expect to keep the "/"

Screenrecording https://www.loom.com/share/9392a78519f34fdda1a1821d1a238d5e

Additional context The issue does not persist when a full url is added. This is only for relative paths.

shrunyan commented 4 years ago

@nibblebot I believe this is a tinyMCE configuration

nibblebot commented 4 years ago

fixed https://github.com/zesty-io/design-system/commit/3bf27be54cd8b43a0d5e6ed5429e416c8faf8e0b