Hi Mandar - You may have better luck with the "HTML Widget", as this can sometimes work better with custom HTML like what you're using. The formatted text widget will strip out various types of HTML tags in order to maintain a consistent style.
Thanks for your response David.
The problem with this is that I will need to create a sub-space or a project everytime I need to do an Image map, since the HTML widget is a 'Widget' and Widgets can only be placed in a sub-space or a project page. Hence, if I have many such image-maps, I will need to create many such sub-spaces/project pages which does not look feasible in the long run. Also, there is the huge banner being displayed at the top of each sub-page, which I would like to remove.
Bottom line is that this kind of content that I have is best suited for a Jive document. I tried doing this, but as you said, the formatted text widget or the Jive document is stripping out various HTML tags, in this case namely - <Area> tag and its attributes for the image mapping.
Is there any way I can add these tags into a 'Safe' list in the Admin console, which I have access to, so that these tags are not stripped off? If so, can you please let me know where I need to add it and how to then enable (activate) it?
One option may be to go into Admin Console: Spaces > Settings > Filters & Macros > HTMLFilter
You'll see some sections which control what types of HTML tags and attributes are stripped out of various pieces of content. Although this section doesn't reference the area html tag, there may be other tags or attributes you're pasting in that are causing the content to be stripped out.
Another disadvantage of using the HTML widget on a sub-space that I just remembered is that I loose the ability to Like, Comment, Rate etc - all the collaboration features that Jive was built for.
Anyways, would you kindly help me in identifying the exact Name/value pair in Admin Console: Spaces > Settings > Filters & Macros -> HTML:HTMLFilter, which I have to modify?
There are a lot of options, none of which contain a mention of the <Area> tag. I did find the <Style> tag though, but removing it, make no impact:
Can you please tell me the exact tag that is being stripped out in the screenshot above? Here is the HTML Image Map code that is not rendering correctly in a Text Widget/Jive Document:
<img id="some_image_id" src="<http: some http url>" border="0" width="1250" height="369" orgWidth="1250" orgHeight="369" usemap="#some_image" alt="" />
<map name="some_image" id="some_image_id">
<area alt="" title="Yahoo" href="http://www.yahoo.com/" shape="poly" coords="149,115,312,115,394,201,312,287,147,285,227,200" style="outline:none;" target="_self" />
<area alt="" title="CNN" href="http://www.cnn.com/" shape="poly" coords="321,114,484,114,566,200,483,287,317,287,399,201" style="outline:none;" target="_self" />
Hi Mandar - I just used the following simplified HTML example in a group's HTML widget and I did not run into any issues:
<img id="someimageid" src="http://placekitten.com.s3.amazonaws.com/homepage-samples/408/287.jpg" border="0" width="200" height="200" orgWidth="200" orgHeight="200" usemap="#someimage" alt="" />
<map name="someimage" id="someimageid">
<area title="Yahoo" href="http://www.yahoo.com/" shape="rect" coords="0,0,200,100" />
<area title="CNN" href="http://www.cnn.com/" shape="rect" coords="0,100,200,200" />
Can you test this example HTML on your site to see if you have any problems?
- If the example works fine then the problem may be caused by something with your HTML
- If the example does not work, then there may be something specific to your Jive system that is causing this issue.
David, the problem is not with the HTML Widget. The code above and every other HTML code for Image mapping runs fine in an 'HTML Widget'. I have no issues with the HTML widget when it comes to Image mapping.
The issue is, that I don't want to use an HTML Widget. I want to use an Image map in a 'Formatted Text Widget' or a Jive Document (Actions -> Create 'Document'). When I use the <HTML> button in the Text editor, I see the HTML code behind the Text that I have in my text editor. If I place the above HTML code in that HTML view of the Text editor, it does not render correctly. See below for screenshot:
For some reason the Text Editor is completely decimating the above code and making it appear as below:
I cannot see the <Image Id> tag. The '<' and '>' are also not showing correctly.
Hence my questions below:
- Why is the text editor stripping out the HTML code?
- Is there anything I can do in the 'Admin Console' so that it does not strip out those HTML tags that render an image map?
Can you help?
Ah - I see. Sorry about the confusion there!
From what I can tell from my testing and research isn't a way to prevent the HTML filter in documents / formatted text widgets from filtering out the ID property on HTML elements. This seems to be what is happening here with the custom HTML. This is something that our rich text editor does on the fly - For example, if you paste in the HTML with the "id" attribute and value and then flip to the "Editor" mode and then back to "HTML" mode you will see that the ID is immediately stripped out, even before saving the document.
This behavior looks to be a part of the built in HTML sanitation process in Jive's rich text editor, which is based on TinyMCE. I can't speak to exactly why this happens, but I suspect it is to prevent users from accidentally or maliciously using HTML elements with IDs that would conflict with other elements on the page and thus causing potential errors or security vulnerabilities.
It does not look like there is any way out of box the to change this behavior or how the rich text editor cleans up certain HTML attributes like "id". This would likely require some sort of customization to the platform.
I apologize for the inability here to embed this type of HTML into Jive's documents or formatted text widget. Let me know if there are any follow up questions or anything I've missed.
No need to apologize David. I can understand the technical complications. However, is there any ways to isolate that Image map ID in any way (iframe perhaps?), so that it does not conflict with other elements on the page? What is the customization that can be done on the platform to enable this?
Because I cannot place an image mapped image on a Jive Document, I'm loosing key collaboration features on Jive - the ability for someone to comment, like, rate, share the image. I can always use the HTML widget for image mapped images, but how will anyone be able to like, rate or comment on it?
When it comes to trying to work around the rich text editor issue through a customization, like an extension, you may find more relevant resources in the Jive Developers space, since the Support community is mostly going to be catering to out of the box features.
I suspect that this also may be something worth posting over in Ideas for Jive - I'm not sure exactly what your use case is with the mapped images, but it would be a good idea to post a new Idea over in Ideas for Jive space to see if the platform can formally support mapped images like what you're looking for. This is a place where our product managers review new feature requests for future versions.