Div style around inline tempalte

We are using the “Insert Rhythmyx Template” inline link to add images within our ephox body control (this is the only way we found to bring in the related alt text). Looking at the code view, the inline template is wrapped in a div tag with a pre-defined style. Is there a way to remove, or at least modify this style? Here is the code from the Code view after adding an image with the Inline template option:

<div style=" display: inline;" class="rx_ephox_inlinevariant" contenteditable="false"><img src="http://devel1.sec.gov:9992/Rhythmyx/assembler/render?sys_revision=3&sys_siteid=305&sys_authtype=0&sys_contentid=44919&sys_variantid=324&sys_command=update&sys_folderid=8579&sys_context=0" sys_folderid="8579" width="205" alt="this is the alt text" unselectable="on" sys_siteid="305" sys_dependentid="44919" height="5" rxinlineslot="105" inlinetype="rxvariant" sys_dependentvariantid="742" border="0" contenteditable="false" /></div>

Notice the div style applied to the link.

Thanks
Raj

Have you tried putting the div attributes into img, but remove the div?
The drawback of this workaround however are:
[ol]
[li]users have to manually edit in the code tab
[/li][li]cannot use the “remove inline template” button if it’s not a div
[/li][/ol]


<img style=" display: inline;" class="rx_ephox_inlinevariant" contenteditable="false"
src="http://devel1.sec.gov:9992/Rhythmyx/assembler/render?sys_revision=3&sys_siteid=305&sys_authtype=0&sys_contentid=44919&sys_variantid=324&sys_command=update&sys_folderid=8579&sys_context=0" sys_folderid="8579" width="205" alt="this is the alt text" unselectable="on" sys_siteid="305" sys_dependentid="44919" height="5" rxinlineslot="105" inlinetype="rxvariant" sys_dependentvariantid="742" border="0" contenteditable="false" />

Actually, Rhythmyx is automatically putting in the div tag. We would rather it didn’t get added automatically, instead of having the users go into the code view and delete it.

Thanks
Raj

Sorry, Rx can’t do that out of box at this point.

You can customize the Javascript that “Insert Rx template” uses: if content type is image, use img instead of div.

Jason

Where would i find the javascript that controls the Insert RX Template?

Thanks
Raj

You can take a look at:
\Rhythmyx\sys_ceInlineSearch\returnvariant.xsl

Things to consider:
[ul]
[li]Since this is a system file, whatever customization you do will not survive an upgrade.
[/li][li]You want to carefully test the condition (e.g. it is image) under which you do not want Rx to paste a div.
[/li][li]If it’s not a div that get saved in the editlive for inline Rx template, the “remove inline template” button will not work, which still means users need to edit the code tab to delete such template.
[/li][/ul]

Thanks Jason

I found the file, it looks like the div is getting added as follows:

var noeditvariant = "<div contenteditable='false' class='rx_ephox_inlinevariant' style='display: inline'>";

When testing, it looks like the “class” attribute is causing the issue we are trying to get rid of. DS you know where the CSS this is referring to, or if not, could I just remove the class call in the div (with the understanding it will be undone on upgrade)?

Thanks
Raj

I don’t think you can remove that. That’s for Rhythmyx to detect that there is a inline variant, and it should render the snippet of the correct content version on the fly during page assembly.

Jason

We noticed that if you use the “Insert Rhythmyx Inline Image” button in ephox, it will bring in the image, but not include our alt text. It looks like it is trying to add in a “title” attribute (which would be a substitute for alt text), but it is always empty. Do you know where I can find out what database field the “title” is trying to pull from, and if there is a way to have it point to the “alt text” field that we have been using in our Image content type?

The code from inserting a Rhythmyx Inline Image:

<img alt="" sys_folderid="8579" sys_siteid="305" sys_dependentid="44919" rxinlineslot="104" title="" inlinetype="rximage" sys_dependentvariantid="324" src="http://devel1.sec.gov:9992/Rhythmyx/assembler/render?sys_revision=3&sys_siteid=305&sys_authtype=0&sys_contentid=44919&sys_variantid=324&sys_folderid=8579&sys_context=0" />

Thanks
Raj

That’s a good question. Here’s the previous discussion about that, including a workaround: http://forum.percussion.com/showthread.php?t=338

Hi,
The “title” attribute is populate when you insert a value to the “Link Title” at the bottom of your search result.

What we did to make it easier to our user, we modify the xsl “\Rhythmyx\sys_ceInlineSearch\returnvariant.xsl” to put that same value for the alt and the title attribute.

Here is the change I made :

change


output  = "<img title=\"" + linktitle + "\" + src=\"" + encodeAmpersand(urlstring) + "\"" + attrstr + " />";

for


output  = "<img title=\"" + linktitle + "\" + alt=\"" + linktitle + "\" src=\"" + encodeAmpersand(urlstring) + "\"" + attrstr + " />";

Hope this help you,

Regards,

Guillaume

Is editing returnvariant.xsl supported by technical support? I need to add a link class and title attributes to the inline “rxhyperlink” but am not sure if this is the correct place to do it.

Generally, any question that includes the word “customization” cannot be supported by TS. If you run into errors, we can usually help you pinpoint where they’re coming from, but we can’t help you create customizations unless there’s a need for a workaround due to a product defect (which I’m sure we can all agree never happens :D).

I recommend creating a new thread with your specific situation, goals, and questions in this forum. Someone, probably Dave, should be able to provide you with some good ideas in a relatively short time. If you do decide to customize returnvariant.xsl or anything else, remember to CREATE A BACKUP of your full environment (or at least the one file) and fully document your work. Customizations cannot be guaranteed to survive an upgrade or patch.