hyperlink not changing
hyper link not changing only rel and target updating https://user-images.githubusercontent.com/85753351/131978528-e60b210f-a79a-4297-a86e-c5d5cfd2a8ba.mov
Having the same issue and confirmed it is present in 1.0.5 and 1.0.6 @trinhtam are you able to address this?
I have the same issue. Please fix it asap it's affecting our production
Hi there 👋🏻 Also having the same issue. I'm testing through it today and will post any findings I have.
@vishal-kushwaha-itorix @Aerofusical @khanakia I do have a fix if you're still interested in forking the repo in your own project.
@trinhtam This is a one-liner fix in case you are interested in having me submit a pull request 👍🏻
There is an insertLink method in src/Hyperlink.js. I modified one line of code in this method to set the href value based on the input value and the issue seems to fix the issue where the link URL will not update once the link is created.
insertLink(link, target='', rel='') {
let anchorTag = this.selection.findParentTag('A');
if (anchorTag) {
this.selection.expandToTag(anchorTag);
}else{
document.execCommand(this.commandLink, false, link);
anchorTag = this.selection.findParentTag('A');
}
if(anchorTag) {
+ anchorTag['href'] = link;
+
if(!!target) {
anchorTag['target'] = target;
}else{
anchorTag.removeAttribute('target');
}
if(!!rel) {
anchorTag['rel'] = rel;
}else{
anchorTag.removeAttribute('rel');
}
}
}
+1 please support this fix asap
Based on @mattmilburn fix, I have uploaded to a repo with the bundle.js: https://github.com/joancifo/editorjs-hyperlink
You can install and use it until @trinhtam merges the PR:
npm i https://github.com/joancifo/editorjs-hyperlink.git