add attribute to image
- This topic has 7 replies, 2 voices, and was last updated 1 year, 9 months ago by .
- October 18, 2019 at 12:46 pm #549ajeet
Where do I add the attribute ? and How do I add `mediumZoom(‘[data-zoomable]‘)`
I have already imported the library using Custom HTML tool in the app
Can you please suggest ???? Thanks,
AjeetOctober 18, 2019 at 12:54 pm #550ajeet
When I post something using the current editor in this forum, the view gets distorted as you can see above.
But while editing, it does not show like this
For example, I did not add <span class=”text-gray-dark mr-2…
but it somehow got added automatically once I submitted the post ?
Does anyone know why is this happening ?October 18, 2019 at 1:15 pm #555Bob
It works for me very well: mediumZoom(‘[data-zoomable]’).
Probably you are pasting a dirty piece of code (html) instead of plain text.October 18, 2019 at 1:28 pm #556ajeet
Thanks. I have just copied some code like this `data-zoomable` from github and pasted in the editor. In ticksy, I used to do this, but in here, the WP editor has some issues, I think.
Reposting the query, if you could help me on that. I am using a js library . Its doc says I need to add `data-zoomable` attribute to images, and then use this code:
How do I add the attribute ?October 18, 2019 at 4:24 pm #576Bob
Do you want to add it to the featured image or to the images into a post?October 18, 2019 at 4:32 pm #577ajeet
Only images in the posts..October 18, 2019 at 4:41 pm #580Bob
It requires a new helper, so I need to direct you to our new customization service https://getpublii.com/customization-service/
You can also try to edit the file helpers.js on your own.October 18, 2019 at 4:47 pm #581ajeet
Thanks. I did not know about the helper.js file . I will do
- The topic ‘add attribute to image’ is closed to new replies.