HTML lists not redering correctly in report textbox - ssrs-2008

I have a text box that I have turned on HTML rendering for. This is the text it should render (formatting added for readability)
<P>This is the Description Field.</P>
<OL>
<LI>First List Item</LI>
<LI>Second List Item</LI>
<LI>Last List Item</LI>
</OL>
<P>Not in the list</P>
I am expecting to see something like this in my report:
This is the Description Field.
1. First List Item
2. Second List Item
3. Last List Item
Not in the list<\pre>
But I am getting this:
This is the Description Field.
First List Item
Second List Item
Last List Item
Not in the list
The docs say that <LI> and <OL> and <P> are supported... What am I doing wrong?

Turns out you can only have the one placeholder in your text box for the HTML to render correctly.
I had two placeholders in the textbox. One to say "Description: " and one to show the description. When I removed the first it started working.

Related

How to prevent tinymce from adding class to every new li in list

I'm using the lists plugin from tinymce.
I have made a function that will add a class to one of the li elements in the list.
If I add the class to the last element in the list, every new li element added by the editor when hitting enter will have the same class.
I've tried looking into content filtering, but there it looks like I can only prevent any li element having a class.
How can I make tinymce add new li elements without a class?
What happens now:
<ul>
<li>asd</li>
<li>asd</li>
<li class="optional">asd</li> (updated by right clicking and selecting optional)
<li class="optional">asd</li> (new elements when hitting enter)
<li class="optional">asd</li>
<li class="optional">asd</li>
</ul>
What I want
<ul>
<li>asd</li>
<li>asd</li>
<li class="optional">asd</li> (updated by right clicking and selecting optional)
<li>asd</li> (new elements when hitting enter)
<li>asd</li>
<li>asd</li>
</ul>
Thanks in advance!
There is a configuration option that tells TinyMCE to not bring styles from one root block element (<p>, <li> etc) to another: keep_styles.
The documentation is here: https://www.tiny.cloud/docs/configure/content-filtering/#keep_styles
The setting either takes true (default) or false. As an example:
keep_styles: false
If you set this to false you won't get the current list item's classes/styles brought down to the next list item.
Here is a running example: https://fiddle.tiny.cloud/dNhaab

Get ChildElement without using element selector

I am using a protractor to get the text in the second Div within #myDiv. Can someone please advise how can I get a text from the second Div (complete Text) which is 'This is a sample text'. I tried getting text in #myDiv but it adds spaces before the phrase. I want to exactly get the text from the 2nd child element of the after #myDiv.
<div id='myDiv'>
<span> (this is second div)
<a name="aTag"></a>
<madcap:concept term="DoSomething">
This
<span class="myClass">
is a
</span>
sample text
</madcap:concept></h1>
</span>
</div>
please try with following-sibling xpath as below :
element(by.xpath("//*[following-sibling::div[#id='myDiv']]"))
Hope this works!
let text = await element(by.xpath('//div[#id="myDiv"]//span[1]')).getText();
console.log(text) 
worked fine for me
I added your html in component html and checked it.

Replacing <a>-tag linktext with different text

I try to map the following html (it´s a small fce)..
<div>
<div data-hero="1">
<h1>
<!-- Headline -->
</h1>
<p>
<!-- Small Text -->
</p>
<p>
<a>
<span><!-- Button Text --></span>
</a>
</p>
</div>
</div>
Mapping is ok... But when i map the <span> i get a No content found div[1] div[1] p[2] a[1] span[1] error. The <a>-Tag is mapped outter so it should work..
What I try to achieve: Set a Text that is displayed in the <a>-tag, instead of the link target itself.
It´s a TYPO3 4.7 using the latest TemplaVoilà.
Why is that? Thanks in advance!
Edit
#biesior suggested this is not possible - so no i wrap a <span> into the <a>-tag via Typoscript.
Is there a chance to display a certain fields content in this <span> - speak: replacing the linktext, so that i can have a Click here for more ... instead of pageXY?
Btw: I use a linkfield and not the Rich-Text-Editor for setting the link.
You can not map any element nested in previously mapped element.
The fastest solution is mapping the A tag, and wrapping inserted text with <span>|</span> with TypoScript.

TypoScript: select a specific content element from a column

What is the best way to select a single content element?
I have a static html template like this:
<html>
...
<div class="left clearfix">
<h1><img src="fileadmin/templates/images/ueberschrift_startseite.png" alt="Willkommen" /><span>Willkommen</span></h1>
<p>EINLEITUNGSTEXT 1 EINLEITUNGSTEXT 1</p>
<ul>
<li>LI 1</li>
<li>LI 2</li>
<li>LI 3</li>
<li>LI 4</li>
</ul>
<h3>HEADLINETEXT 3</h3>
<p>TEXT TEXT TEXT TEXT </p>
</div>
...
</html>
In my Backend I have added
A Content Element for the <h1>
A Content Element that should be displayed between the <p> Tags where now Einleitungstext1 is displayed
A Content Element that contains the LI for the UL Section
and so on.
All Elements are in the same column.
I what to take my static HTML Template and fill several SPECIFIC parts with elements that can be edited in the backend.
I hope I could explain what my problem is.
How do you configure your templates? Is there a much better way to replace only specific parts of a static template?
Regards,
Max
I assume that you know how to use marks and subparts in TypoScript, in such case what you have to do is set marks in your template, put each CE in separate column (maybe you'll need to add custom columns if all left, default, right and border (0-3) columns are used for other things) and finally just map these columns to the marks.
tip: TemplaVoila allows for more combinations as you can map not only container for CE's but also other things (header fields, image fields, TS snippets etc.)

Selecting blockquote after specific span with Xpath

So, at the moment I'm using Xpath to retrieve the text from blockquote tags, but I need to be able to select SPECIFIC blockquotes.
The only difference between the two types I need is that they are directly after spans.
Let's say I need to get text1 and text2 from each other, this would be the HTML:
<span id="1">some code here</span>
<blockquote>text1</blockquote>
more code in here
<span id="2">some code here</span>
<blockquote>text</blockquote>
How would I go about doing this?
Suppose we have this XML:
<root>
<span id="1 nothread">some code here</span>
<blockquote>text1</blockquote>
more code in here
<span id="2 nothread">some code here</span>
<blockquote>text</blockquote>
<span id="3">some code here</span>
<blockquote>text</blockquote>
<blockquote>not selected text</blockquote>
</root>
So, this XPath: //blockquote[local-name(preceding::*[1]) = 'span' and contains(preceding::*[1]/#id, 'nothread')]/node() selects all blockquote if it is directly after span and span/#id contains nothread.
Result:
text1
text
So you see, not selected text wasn't selected
I would use:
//span[starts-with(#id,'nothread')]/following::*[1][name()='blockquote']
This will get all the wanted blockquote elements.
To get the text nodes:
//span[starts-with(#id,'nothread')]/following::*[1][name()='blockquote']/text()