margox / braft-editor

美观易用的React富文本编辑器,基于draft-js开发

Home Page:https://braft.margox.cn/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with add link URL control

liadbe opened this issue · comments

Hi, 2 issues we encountered with the add link control:

  1. It is not possible to copy text from the input of the url (neither ctrl+c or _right-click).
  2. If URL prefix (https://) is not entered, it automatically adds the domain name before the URL entered in the link . We solved it using the link hook.

Thanks,
Liad

Confirmed, I will fix the first issue soon.

Hi,
Regarding the 1st issue, now when I try to copy the URL (e.g. https://google.com), it copies the text of the URL instead (e.g. visit Google).
Worth mentioning I am not using allowInsertLinkText (by default it's false).

@liadbe I will take a look tomorrow. I just noticed that this problem does not exist in react-draft-wysiwyg, so it should be repairable.

Hi, I just published v2.3.7 and this issue should be fixed :)

Hi, I thought this issue is behind us. But something weird is happenning, these are the steps to reproduce:

  1. Select text inside the editor and click the 'add link' control
  2. Insert url without url prefix (https://), for example - google.com
  3. Select the linked text in the editor
  4. Press right click -> Copy link address
  5. See that the address copied is not just google.com but with added prefix (probably your domain)

Can u please have a look on that?

Thanks.

The editor won't apply any protocol by default, so you input google.com, for browser, it's just a relative path, you can have a try on any website, find a link and remove the prefix of it by using the browser development tool, then right click the link and copy the url of it.