Monday 31 May 2010 11:37:16 am
Well, the answer to the first segment (of why the image tag is being stripped out) is that I made the mistake of naming the image url attribute just 'url'. Thus when the system was looking for 'image_url', it couldn't find it. Now, one more problem. I also have 'href' and 'target' as custom attributes to image. So if a user clicks on image and fills in at least the href attribute as well. then the following will be returned: '<a href="' + customImgHref.value + '" target="' + customImgTarget.value + '"><img id="__mce_tmp" type="custom" src="' + imageSrc + '" border="0" /></a>' instead of the normal img tag: '<img id="__mce_tmp" type="custom" src="' + imageSrc + '" />' Whats happening is that the anchor tag and image tag (from the first example) are being stripped out in the input parser. This doesn't happen when the normal input tag is returned (second example). I've checked the vales for customImgHref and customImgTarget and both are being populate. Also, the anchor tag does go through the conversion to 'link' type. Is there something else I need to put into the valid_elements?
|