Typo3: adding elements inside an list item <LI> - typo3

Im trying to get something like this:
<ul>
<li>
<h3>Some header</h3>
<p>Some text</p>
</li>
</ul>
inside a Text element, but when I try to apply the blocktype to the content of the <li>, it applies it to the whole content.
Im using rtehtmlarea. What can I do?

Strange - this works in my installation. You should check the RTE configuration in page TSconfig. I assume something like this:
RTE.default.proc {
allowTagsOutside = img,hr,[your Tags]
}
Another suggestion is: Disable the Rich Text Editor (there is a checkbox below the textarea), enter your tags, then enable it again. The tag structure should be preserved.
If not, drop me a line, I will post my RTE configuration.
If you need a waterproof solution, try playing around with your RTE.default typoscript.

Related

TinyMCE: promlem with editing text within complex template HTML

I'm using template plugin for inserting html snippets. For example:
<a class="button" href="#"><span class="button-inner"><span class="button-label">Button Text</span></span></a>
Everything goes fine until editor tries to change button's text and exit its html to add some more text after. The caret doesn't leave the A tag and stops within spans or before closing A tag. So in the end we get something like this:
...Button Text</span> some more </span> text here </a>
It breaks the layout completely.
Is there a way to mark the link as single solid block or spans as non-enterable with some attributes to prevent inserting text within unexpected places?
You use the contenteditable="false" attribute to make a portion of your HTML non-editable. Here is an example:
http://fiddle.tinymce.com/Zxgaab
I changed your link HTML to this:
<a contenteditable="false" class="button" href="#">
<span class="button-inner">
<span class="button-label">
Button Text
</span>
</span>
</a>
It will act like a single character in the editor...

Creating Custom Content Element in TYPO3

Cany anybody tell me how to render the following structure in
typo3 without developing a new extension.
<div class="sidebar-details">
<div class="sidebar-details-title">
<h4><span>MY TITLE</span></h4>
</div>
<div class="sidebar-details-body">
<p>
TEXT
</p>
</div>
</div>
What would be the best/recommended way to achieve this ?
Start using gridelements.
Gives you exactly what you want.
http://typo3.org/extensions/repository/view/gridelements
You can activate the RTE html mode and put it in its source or make use of HTML element, but that's depending on your needs.
If you want to keep RTE functions for editing the text what I mentioned first is the recommended way. Have done it several times myself.
If you are using Template mapping using Templavoila so, you can create FCE(Flexible content element) for it and you can map this part.
If you are using fluid template mapping so, you can create gridelement for it. and map all part.

How can I enable tinyMCE in Umbraco to add a div with a class attribute and contain a paragraph?

I need to allow add a div with a class attribute in tinyMCE in Umbraco. I can add a div, but all content in the div is just text. I need that text has a paragraph, and finally add a class attribute for the div.
It's a little hard to understand what you are asking, but I think this should help.
http://our.umbraco.org/wiki/recommendations/recommended-reading-for-content-editors/adding-styles-to-the-tinymce
You can basically associate a stylesheet with the tinyMCE and then add styles to it that will appear in the style dropdown
You may use
tinymce.activeEditor.execCommand('insertHTML', false, '<div class="section'></div>');
This will insert the specified html into the editor at the local caret position.
Be aware that your valid_elements and valid_children configuration settings won't strip out anything from the html that you insert.
If you can paste your template code then we can be more of a help to you.
What you want to do is wrap your <umbraco:Item field="aliasOfYourRTE" runat="server" />
with the div you want so in your case your code will look like this:
<div class="YOURCLASSNAMEHERE">
<umbraco:Item field="bodyText" runat="server" />
</div>
The umbraco RTE automatically spits out <p> </p> tags when content is inserted. Also, make sure you are publishing your node so that your content is viewable on the front end.
Hope this helps.
Go to Settings - Styles.
Open the stylesheet with the styles for the Format dropdown of TinyMCE in Data Type Richtexteditor.
Add a style with the Alias div.class, e.g. div.alert alert-danger.
If you then click in TinyMCE on a paragraph and then choose in the Format dropdown this style the paragraph is formatted as follows:
<div class="alert alert-danger"> ... </div>
Is this what you wished to do?

Scala | Lift | How to make across menu

Using
<div class="lift:Menu.builder"/>
menu on website is vertically, any ideas because i cant found anywhere, how to make menu across ?
This is more a CSS question than a Lift question. The HTML produced for the menu looks something like this:
<div class="column span-6 colborder sidebar">
<hr class="space" />
<ul>
<li> <span>Home</span></li>
<li> Login</li>
<li> Sign Up</li>
<li> Lost Password</li>
<li> Search</li>
</ul>
...
</div>
I.e., about as vanilla as possible, so it's very easy to add some CSS to create a horizontal menu out of the list—see for example the "Horizontal lists" examples on Listamatic.
It would be simplest just to add the CSS code to the header in src/main/webapp/templates-hidden/default.html, but you could also use your own separate CSS file without too much fuss.

Bullets and numbering within reports

How do you add a bullet list and stylized numbered list using JasperReports?
Try:
Add static text (or a text field).
Set Markup in the Properties panel to: html
Use the following HTML markup in the text:
<ul>
<li>bulleted item 1</li>
<li>bulleted item 2</li>
</ul>
<ol>
<li>ordered item 1</li>
<li>ordered item 2</li>
</ol>
The problem starts, where we want to do automatic numbering without CSS styles. I solved this by implementing own JRDataSource.