I am trying to render values and labels for rows on show and index pages using subscript and superscript. I tried adding the actual html to do like <sub>2</sub> but it just shows the raw html tags and does not render the results of that tag as expected.
Also is it possible to have subscript and superscript in a form select input for the new and edit pages as well?
It is possible:
column(:foo) do |object|
"<sub>#{object.foo}</sub>".html_safe
end
Related
I have no idea how to render the below image with input fields and datatable with the exact alignment in UI.
I referred some documentation with examples, but I can't find the pattern for datatable. Attached the image below. Kindly share your thoughts for this as outline.
I would consider using PrimeFlex instead of p:panelGrid.
You basically need a 3 column grid layout. See the first example:
https://www.primefaces.org/primeflex/gridsystem
An the input can be done using form layout. See the horizontal examples:
https://www.primefaces.org/primeflex/formlayout
For the data table, simply use the p:dataTable. See: https://www.primefaces.org/showcase/ui/data/datatable/basic.xhtml
I'm trying to annotate an excel sheet with notes.
I know I can add text to a Note, or display an image. Are there any other alternatives? Eg. showing some rendered HTML on hover.
After going through a lot of blogs and solutions on stackoverflow on how to get the values in Editor template according to the needed format in MVC 5, I am putting forward my question.
On my index page I display decimal values, e.g. 43.345.
However, on the Editor template the value displayed would be 43.34.
I tried adding the right notation in the model "ApplyFormatInEditMode = true".
The way I am rendering the value in Editor Mode (view) is
#html.EditorFor(m =>m.value) ;
I have a custom publishing page layout I have created. The content type behind the page layout has a lookup column pointing to a document library where I store images. Basically, the pages I am creating from the layout are 'articles' and I have an associated image with each.
As you can probably guess by now, I want to display the lookup image on the page. However, I cannot for the life of me figure out how to do this. I have been inserting columns into the page layout via controls, but I'm not sure how to format it to look at the source document behind the lookup column. I am wondering if it is possible somehow through controls, and if not this way, if it can be done through modifying the XSL of a webpart. My last option which I don't want to use but I know it would work is a workflow (on new item creation, copy Name (FileLeafRef) into a hidden single line text field I coult utilize).
Does anyone know how to format a lookup column to display Name (FileLeafRef)?
Help is greatly appreciated!
-Josh
if I want to format a small snippet of text using the dropdowns (ie Heading 1, 2 paragraph), it often ends up changing the tag for a large snippet of text (or even half the page).
How do i change this behaviour?
When you select part of a tag in Dreamweaver and change the format, DW will change the format of the parent tag.
What you are describing requires a different technique as you are trying to get inline formatting. You need to select the text and then wrap it with a span tag (Danilo's advice is correct in that regard). You then apply the CSS style you want to the span tag to change the format.
So to style No longer want to receive these updates it would look like so:
<p>No longer <span style="font-size:18px;">want</span> to receive these updates?</p>
After DW gets through with it. In Design View after wrapping the text with span, select in the Tag Inspect and switch the Property Bar to CSS mode to style.
When used like this the property inspector will expand the selection to include the parent tag of the selected text, causing the selected option in the property inspector (p, h1, h2, etc) to replace the parent tag with the selected option. you cannot change this operation.
You can make a selection, hit CTRL+T (CMD+T I assume on Mac) which brings up the Wrap Tag editing option, type your tag, then hit enter and the selection will be wrapped with the tag of your choice.