This could be a silly or stupid question, but how do I enter a carriage return (crlf) in the text of a Wix Text Control?
I tried:
<Control Type="Text">
<Text>Text goes here</Text>
<Text>Another text goes here</Text>
</Control>
But of course wix says that I cannot have more than one Text element inside a control tag.
Any ideas? I'm pretty sure is something easy to do but my google foo is failing right now.
Unfortunately Windows Installer does not support line breaks in static text controls. During installation the text is automatically formatted based on control and font sizes.
However, if you really want a line break, simply use another static text control for the next line.
The answer was easier than expected and was in front of me all this time... Using CDATA is the way to do it...
So, doing a return car in a text control is just matter of enclosing the text in CDATA, for example:
<Control Type="Text">
<Text><![CDATA[
This is my text.
With a return line
]]>
</Text>
</Control>
Looks like there could be more ways to do it, but I found that one the simpler.
Related
I'm writing a Module for Joomla! 2.5. In my Backend I've got a textarea, in which values should be written line by line. If the value is to big the line breaks and it looks really confusing and chaotic.
In normal html I would add a wrap="off" to the textarea-tag (I know it's not conform html, but it works), but the textarea is defined in the module's xml-file:
<field name="content" type="textarea" label="LWTAGCLOUD_CONTENT_LABEL" description="LWTAGCLOUD_CONTENT_DESCRIPTION" rows="20" cols="60" class="lw_tagcloud_textarea" default="VALUE; LINK"></field>
Has anyone an idea how to solve this problem?
If you cannot solve the problem using css only, and since you cannot add wrap="off" to the textarea type in Joomla, what you could do is to create a custom parameter type, the same like textarea, just with wrap=off already defined.
For more details on how to do it, have a look at http://docs.joomla.org/Creating_custom_template_parameter_types and http://www.sanjeevshrestha.com.np/2010/01/creating-color-element-in-joomla-for-custom-parameter-type/, it's not hard to make it
just use
for line break !
hope this help for anyone who ask
I'm using scrapy to crawl a site with some odd formatting conventions. The basic idea is that I want all the text and subelements of a certain div, EXCEPT a few at the beginning, and a few at the end.
Here's the gist.
<div id="easy-id">
<stuff I don't want>
text I don't want
<div id="another-easy-id" more stuff I don't want>
text I want
<stuff I want>
...
<more stuff I want>
text I want
...
<div id="one-more-easy-id" more stuff I *don't* want>
<more stuff I *don't* want>
NB: The indenting implies closing tags, so everything here is a child of the first div -- the one with id="easy-id"
Because text and nodes are mixed, I haven't been able to figure out a simple xpath selector to grab the stuff I want. At this point, I'm wondering if it's possible to retrieve the result from xpath as an lxml.etree.elementTree, and then hack at it using the .remove() method.
Any suggestions?
I am guessing you want everything from the div with ID another-easy-id up to but not including the one-more-easy-id div.
Stack overflow has not preserved the indenting, so I do not know where the end of the first div element is, but I'm going to guess it ends before the text.
In that case you might want
//div[#id = 'another-easy-id']/following:node()
[not(preceding::div[#id = 'one-more-easy-id']) and not(#id = 'one-more-easy-id')]
If this is XHTML you'll need to bind some prefix, h, say, to the XHTML namespace and use h:div in both places.
EDIT: Here's the syntax I went with in the end. (See comments for the reasons.)
//div[#id='easy-id']/div[#id='one-more-easy-id']/preceding-sibling::node()[preceding-sibling::div[#id='another-easy-id']]
I am trying to make a WP7 app and I'm facing an issue on how to add a white space after a part of text. I know that this thing can be done in HTML by inserting a   char but in my RichTextBox this can't be done.
This is my code:
<RichTextBox>
<Paragraph>
<Run>This is a </Run>
<Bold Foreground="Red">test</Bold>
</Paragraph>
</RichTextBox>
I want the output to look like "This is a test" but the last whitespace is ignored so the output is "This is atest" .
Can you please help me with this.
Thanks
I have found what was the issue , in designer the output was the wrong one ("This is atest") but at run-time it's displayed ok.
Is it possible to make a Telerik RadEditor single-line entry only?
For example, in an ASP TextBox there is the Multiline attribute
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" />
Ah, just figured it out...
It's a bit weird, but there is an attribute for NewLineBr in the RadEditor.
<telerik:RadEditor NewLineBr="false">
Single line editing not possible with the RadEditor. It always uses an iframe element for the content area where the asp:textbox uses a textarea/input. Even if you make the height of the iframe be a single line, when the user presses Enter, they will get a new line. If you need a single line input from Telerik, then you can try using the RadInput control.
We develop asp.net webforms using visual studio 2008. For multilingual support, we translate all our text. However, when designing, we usually just enter the english text and come back to translation later (it interrupts flow of work otherwise).
I've added a "ToTranslate" tag in the options. Adding //ToTranslate: something in C# code correctly adds the entry to the Task List. I haven't however figured out how to do the same for aspx and ascx files (where most of our user text lives).
Inserting <%-- //ToTranslate: something --%> or <%-- ToTranslate: something --%> doesn't work.
Any ideas?
It seems to me that it works fine if you put the delimiters <% and %> on a line by themselves. What I did was this: go to Tools menu and click on Options, then under Environment -> Task List add a new ToTranslate token. Click OK to accept the change. Back on the ASPX page I added the comments on a line by themselves and the code delimiters on lines by themselves.
FYI if you want to do this in a .Net MVC3 razor cshtml file the syntax this:
#{
//TODO: Move this inline <style> css to a file
}
Take note: that you need to put the trailing } bracket on a new line as otherwise it will be included in the // comment. You could do it using /**/ like below and keep it all on one line but it's more typing, and a bit harder to read. My take is, if it annoys you the comment takes up 3 lines in your file, all the more motivation to fix the issue and remove it completely :)
#{/*TODO: Move this inline <style> css to a file*/}
You do not need the <% %> on lines by themselves. This example shows what works and what does not:
<%//ToTranslate will work%>
<%/*ToTranslate will work*/%>
<!--ToTranslate won't work-->
<!--
ToTranslate won't work
-->
It may be due to the fact that what's differentiating between an HTML comment and some form of aspx comment is getting messed up by the -- because that's part of an html comment?