-
Notifications
You must be signed in to change notification settings - Fork 9
How to remove image link from ep_previewimages? #12
Comments
Removing the link would stop the logic from working. So if you pasted an image link the image would not actually exist.. Think about it..... What behavior would you actually expect if you wanted to modify the image? |
I followed the exact steps used by file upload to upload and preview image through debugger.It takes the server link and sends it to 'replacerange' method of ace2_inner.js as text. Then it creates a changeset and applies it to the text of etherpad. Actually I am writing a research paper using Etherpad that's why I dont want image link below the image. |
Yea it behaves similar to that.. If you remove the href from the image there will be no reference point for the URL so if someone wants to remove or change the link of the image it wont be possible. Feel free to have a play and develop a better UX, I know it's doable but I just don't have the time right now.. I did the majority of this functionality in the ep_copy_paste_images plugin afaik. |
Ok thanks John. Can you please tell me what is the starting point of plugin - ep_copy_paste_images because I could not find it with the help of the debugger. Also if it would be alright if I merge some functionalities of ep_copy_paste (like resize) to ep_previewimages plugin? I want to send one more parameter as args( args = {height:px,width:px} ) so that replacerange gets one more parameter.And this parameter later will be received by domline.js also where image src tag is being added. That will increase the functionality of ep_previewimages |
I suggest you fork and / or create a new plugin. I suggest reading the Etherpad docs on how to create plugins and also the hook docs. Sadly I can't afford the time to hold your hand through this, you will need to do some digging of your own. Thankfully all of my plugins are open source so you can review their functionality and build from them :) |
ok. I am trying to figure a way out. Just one question though - In ep_previewimages plugin after the domline html is added, in the code , in undoModule this code comes - function pushEvent(event) in which e is an object with following properties -> backset: "Z:1z<1p|1=8-1p$" And later Can you please tell me what is elementType in this?(elementType="undoableEvent")? and why is this added? |
I'd have to look it up to find out, same as you :) |
When I use ep_previewimages, it also shows the image URL link below the image. I dont want the link on the etherpad instance.
How do I achieve this? I tried to modify domline.js in which It finally inserts the link but I ended up removing all the links from the etherpad instance.
The text was updated successfully, but these errors were encountered: