When I try to set a style attribute to an image in Drupal 10 CKEditor (via its "Source" button) for example style="width:17rem;" and then save the node, Drupal converts the style attribute to the attribute width="17rem" which doesn't work in the very page.
At that I use the "Full HTML" text format and the option "Limit allowed HTML tags and correct faulty HTML" is disabled.
How can I set a style attribute for an image?
Related
I using some Dojo radio buttons in an XPages application and would like to display the label, not the selected value, when the XPage is in read mode. Is this possible? Here is an example of my code:
<xe:djRadioButton id="C1B1_R1" groupName="FKRadio1" value="#{document1.C1B1_RValue}">
<xe:this.label><![CDATA[#{javascript:sessionScope.get("C1B1_R1")}]]></xe:this.label>
<xe:this.selectedValue><![CDATA[#{javascript:sessionScope.get("SV_C1B1_R1")}]]>
</xe:this.selectedValue>
<xe:this.rendered><![CDATA[#{javascript:var r3 = sessionScope.get("C1B1TextVisibility");
#If(currentDocument.isEditable(),#If(r3 != null && r3[0]!=0,true,false),
#Trim(#GetField("C1B1_RValue")) == sessionScope.get("SV_C1B1_R1"), true, false)}]]>
</xe:this.rendered>
</xe:djRadioButton>
In edit mode, the labels are displayed. However in read mode, the value of the field is displayed rather than the corresponding label for the field value. In this case, the values are all numeric while the labels are text.
Tony,
Three things that you should try, these are written in order you should try:
1) I think it is rendering as just plain text when in read mode, so it just shows the values. Try setting the "Show disabled control for read only" and see if it renders it as something other than plain text.
2) Change the code to be the same for read or edit mode, in other words make it like edit mode. Then use the styleClass to use jQuery or CSS to restrict editing.
3) Use a hidden input/display:none to load the field on the page, then set the label to a field that is shown
You can hidde the djRadioButton in read mode, and show a xp:text with the label instead.
Or, maybe with the property "Show disabled control for read-only" (in general properties of the Dojo Radio Button)
I'm looking to have a image that when clicked loads up a node into a colorbox.
So far I'm using Colorbox and Colorbox_node modules, and have a block with this bit of code
< a class="colorbox-node" href="cast?width=500&height=500" >
Link to my node alised 'cast'
< /a >
The text link when clicked acts exactly as I want by poping up a colorbox. Though if I replace the text with an image link like:
< a class="colorbox-node" href="cast?width=500&height=500" >
< img src="/images/cast.png" / >
< /a >
The image displays, but is not a clickable link.
Have I screwed up somewhere or is there a different way all together of doing this?
Create new View:
Add following fields in Order:
Nid
Title
Image
Body
Title: Config
Formatter: Image
Image Style: thumbnail
Link image to: Nothing
Click on REWRITE RESULTS and Select Checkbox
Output this field as a link
Set Options As follow:
Link Path: node/[nid]/?width=600&height=600
Checked Checkbox "Use Absolute Path"
Link Class: colorbox-node
Alt Text: [title]
Save your view and run view.
Click on any of your image to load the whole node content in Colorbox.
Note: You must installed Colorbox, colorbox_node module.
The answer by AshwinP works, but remember to add a field of type Content: Nid without label and "exclude from display" checked, and put it before the image that you want to link, otherwise it will be impossible to link it to the node. Also the Image style and the alt text doesn't matter what you put in there, just go with your own settings.
This isn't working anymore, seems that now it's need to add data-options to the link :(
Tab Rich control page is displaying the underline when the user selects and click on 'U' button. But it is not saving the HTML tag for the underline and hence it is not showing the underline when it come back from database..
We need to apply some HTMLExportSettings of HTML Format Provider, so it can generate HTML tag for underline. In order to achieve best compatibility of the generated HTML with Telerik Reporting, you should apply the following settings:
DocumentExportLevel - Fragment;
StylesExportMode - Inline;
StyleRepositoryExportMode - DontExportStyles;
ExportFontStylesAsTags - true.
You can also read complete options of HTML export settings of HTML format provider for generating right HTML..follow the following link ::
http://www.telerik.com/help/silverlight/radrichtextbox-features-import-export-settings.html
i have installed the views and token module. i add a views field 'Node:Link' and check the 'exclude from display' option for the 'node:link' field and set the field first in the field order,now i want to overrite a views field.
i put this more >> in the rewrite the output of this field text box. but it can't work? [view_node] is the Node:Link token, how to make the more>> link ok? thank you
In the Node:Link field, enter more in Text to display: text box.
No need to put anchor tag just type [view_node] in the rewrite the output of this field text box.
Views has a built in way to make text link to other pages with tokens. I would use that instead of putting the anchor tag in the rewrite section. It's titled, "Output this field as a link"
If you're on Drupal 6 and you just want to link the field to it's node then just check the box "Link this field to it's node"
have a page with many links.
when any link is clicked, the page corresponding to that hyperlink should open within a specified area on the same page, that is the "div content"
yes i can use iframe
but can i make a div target of the hyperlink?
please no jscript only html and asp.net
You can use anchors and use it to target your iframe
Google
<iframe name="thisframe" src="http://www.yahoo.com"></iframe>
As far as i know, you can never target *div*s unless you use javascript to manipulate the DOM, though. But if you really REALLY had to use the HyperLink control instead, the you can use the following code instead of using the anchor:
<asp:HyperLink ID="uxHyperLink" runat="server" Target="thisframe" NavigateUrl="http://www.google.com">Google</asp:HyperLink>
<iframe name="thisframe" />
you can use html bookmarks. For an example click on this link
http://www.matlus.com/quartz-for-aspnet/#videos
If will not only take you to a page but scroll your browser down to the "videos" section onthe page.
In the url (the link) notice the /#videos. That is the bookmark. On the target page in question I have an anchor tag with it's name attribute set to "videos"
[a name="videos"][/a]
I'm using square brackets above because of the editor not allowing anchor tags. So basically, just above your "target" div, place an anchor tag and set the "name" attribute. Then you your link simply append the /#anchorname at the end of the url.