 
	
		Tagged: custom element, enfold, Images
- 
		AuthorPosts
- 
		
			
				
July 27, 2018 at 4:11 am #990532Hi guys, Is there a proper way to add multiple images (not gallery) within a single element? I need to create an element where the user can add in multiple images for different things (e.g. background image, logo image and 3 product images) within a single fullscreen element. I’ve managed to create the custom element and added multiple “image” inputs and it works fine, except when I start to edit and modify the element from the Advanced Layout Builder. I’m facing 2 main issues now: 1. Whenever I edit anything from the custom element, the element will add duplicate values within the “attachment_size” field. It will keep adding indefinitely, which will slow down the entire page. 
 2. For some reason, when I add the “tiny_mce” input into the same custom element, the HTML tags will display whenever I edit the content the 2nd time and converts to escaped character tags after the 3rd time. For example, when I add a centered text of “hello”. On 2nd edit, it will display as<p style="text-align: center;">Enter your welcome message here</p>and on 3rd edit it’ll show& l t ; p style="text-align: center;" & g t ; Enter your welcome message here & l t ; / p & g t ;(without the spaces)Could you please help? Thanks. - 
		This topic was modified 7 years, 3 months ago by sethkhouri. 
 July 29, 2018 at 5:23 pm #991110Hey sethkhouri, I can’t review your code and tell you why it’s not working but I’d recommend to use the “Easy Slider” shortcode file (wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow/slideshow.php) as a starting point for your custom element. It contains the image selector and a second popup with a text field (where the user can enter the caption). Best regards, 
 DudeJuly 30, 2018 at 1:28 am #991340Hi, I can pass you the entire code for the custom element here: - 
		This reply was modified 7 years, 3 months ago by sethkhouri. 
 July 30, 2018 at 1:33 am #991342Here’s the shortcode that appears from the custom element: If you just click to edit the custom element and save (don’t have to publish or update the page yet), the “attachment_size” keeps growing and any content you’ve added into the tiny_mce editor will “unformat” itself. July 30, 2018 at 7:34 am #991424Hi, Alright, I kinda fixed the tiny_mce “unformatting” my text. I needed to follow Visual Composer’s default way of using WYSIWYG editors by keeping the id fixed as “content” and nothing else. But the image “attachment_size” duplicating values still happens. Thanks. July 31, 2018 at 1:42 am #991779Hi guys, New problem, the tiny_mce now doesn’t save anything (returns blank) after page update / publish. Is there a proper way or standard I should follow to use the tiny_mce widget? Like I can only use it once per element or something like that? Thanks - 
		This reply was modified 7 years, 3 months ago by sethkhouri. 
 July 31, 2018 at 2:15 pm #991931Hi sethkhouri, Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :) Best regards, 
 Victoria
- 
		This topic was modified 7 years, 3 months ago by 
- 
		AuthorPosts
- You must be logged in to reply to this topic.
