Closed digitalManiac closed 4 years ago
Got it working ! I'm not sure it is the most elegant coding style but it makes the job :
Line 1128 replace new BrickyEditor.Prompt.PromptParameter('src', BrickyEditor.EditorStrings.imageFieldLinkTitle, this.data.url, BrickyEditor.EditorStrings.imageFieldLinkPlaceholder), with new BrickyEditor.Prompt.PromptParameter('src', BrickyEditor.EditorStrings.imageFieldLinkTitle, this.data.src, BrickyEditor.EditorStrings.imageFieldLinkPlaceholder),
Line 1133 replace var link = this.data.link ? this.data.link : new BrickyEditor.HtmlLinkParams(); with var link = this.data.link ? new BrickyEditor.HtmlLinkParams(this.data.link.href, this.data.link.title,this.data.link.target).getLinkPromptParams() : new BrickyEditor.HtmlLinkParams('','','').getLinkPromptParams()
Comment out line 1134 //var linkParams = link.getLinkPromptParams();
Line 1135 replace return params.concat(linkParams); with return params.concat(link);
For more clarity, please find attached a copy of the modified version, should you incorporate it to your next release. Hope it helps someone. Cheers !
Thanks for pointing this out and sorry for so late response :)
Hi, Before anything, I would like to congratulate you for brickyeditor. It is a very promising plugin although I'm still trying to figure out how to use it properly. At the moment I can create elements, store them and modify them. It works great except when trying to modify a link over an image. I get this error: "Uncaught (in promise) TypeError: link.getLinkPromptParams is not a function at ImageField.getPromptParams (jquery.brickyeditor.js:1135)" The popup when clicking on the image doesn't come out anymore once the link has been filled. Could you please help me ?
PS: there is a tiny typo I notice on line 1144 this.$field.css('background-image', "url(" + src +")" ); instead of this.$field.css('background-image', "url(" + src);