How to paste the text with the same property in Actionscript 3? - css

I want to paste the text with the same height,width,color etc (i.e same as the time of copying the text).
I am using a textArea where i am adding text and also changing the color,font,size of the text by using style but if i am coping the text from textArea and pasting them then i am getting the text with default font style (Only changing heights are coming).
I have attached the image where you can see the difference
So anybody have an idea how to solve this problem ?

Maybe you can use a TextFlow and TextConverter with the methods export and importToFlow to use and TextConverter.TEXT_FIELD_HTML_FORMAT to get the format with the style attributes

Related

JavaFX Can't set any styles with Text node

I have a text field and I'm able to change the text size of a Text node no problem with
Text text = new Text();
text.setStyle("-fx-font-size: 16;");
but if I try to change the colour, nothing works:
textStart.setStyle("-fx-font-size: 16;-fx-color: #ff0000;-fx-text-base-color: #ff0000;-fx-text-fill: #ff0000;");
I find in JavaFX every node seems to need a different css command to successfully change the colour, but with Text, none of them seem to work. I can change the text with
text.setFill(Color.RED);
But it's awkward to have two separate commands on separate lines when it should be able to be done in one line of css. Especially since what I'm doing is relatively heavy processing of many lines of text.
Does anyone know what the css command to change the colour is with a Text node? Seems so odd it only accepts the size command in css..

How to add a default Text at the start of the multiline React Native TextInput

I'm trying to implement the replying input in React Native and I'd like to have a possibility to render the person name I want to reply to at the start of my reply text. I attached the example image. This Input will be multiline and it's important because I was thinking about adding some padding for my reply TextInput and just absolutely position the Person Name text at the padded space.
It looks like a possible solution but:
How to do it if we have multiline Text? if we add some padding for the TextInput it will affect all lines when I need only the first one
The person name text could have various width so the padding value shouldn't be hardcoded. I think it could be solved by just rendering the Person name text first, calculating its width, and the set the padding for the TextInput but even in this case we'll face the issue 1)
Is it possible to achieve this feature somehow?
Thanks for any help!
You could have a nested style.
<Text style={styles.username}>#Rosemary#9234<Text style={styles.body}>I agree with you!</Text></Text>

Line Height in SSRS

Is there a way to adjust the line height in SSRS? I have a requirement on a legal document to have a bigger line height.
From what I have read, the Textbox.LineHeight property only affects html. I have converted the text inside the textbox to html, set the LineHeight property, but nothing changed.
I also tried adding custom CSS to the report (using old school line-height: {x} pt; inside a style tag), but to no avail - that isn't supported in the SSRS environment.
Here is an example what I need - How can I achieve this?
Before:
After
Does SSRS even support this?
Edit
Converting the text to an expression and adding a double VbCrLf will not be feasible as I need to only add a partial line height
You could add an expression on the Padding.Bottom property.
=IIF(IncreaseHeight, "20pt", "2pt")
If the text is already multiple lines, format the textbox to accept HTML. Replace the line breaks with a white character in a larger font followed by a <br/> tag.
<span style=""font-size=12pt; color:white;"">|</span><br/>
If your text is all on the same line, do the above for each space in your text. Using a bar "|" should be enough to represent the space between words. If not, use a thicker character.

How to avoid the behavior of set htmlText in RichTextEditor?

I'm having this problem of adding an image to the textArea in RichTextEditor (RTE) on the fly and this image seems to "reset" the html properties of the textArea.
Better explained:
The user starts writing something in the TextArea (with Verdana in size:12 font settings). When he adds an image to the text area, the cursor right after the image gets very small and the font settings are reset to HUM777B in size:2.
How could I avoid this behavior?
It seems Flex adds additional HTML code before the image tag. If there was any way to avoid this I would be able to add my own settings to the tags.
Just before you programmatically add the image to the textArea, create a variable and store a reference to the textArea styling info. Set the styling info using this variable after you have added the image.

Changing Spark TextArea text color dynamically over a range of characters

Hoping to obtain the help of some Flex 3/4 gurus out there...
I am attempting to dynamically change the color of a subset/portion of text in a Spark TextArea control. Using the MX-based TextArea, I could leverage the mx.controls.textClasses.TextRange type and change the color directly as follows:
TextRange tr = new TextRange(theTextAreaControl, false, beginIndex, endIndex);
tr.color = somePredefindColor;
Input Parameters to TextRange constructor:
1st argument: The TextArea control that will provide access to the underlying textField property
2nd argument: Indicates the TextRange will not modify the content of the TextArea
3rd argument: The beginning index position in the TextArea text string
4th argument: The ending index position in the TextArea text string
How would I go about doing this for a Spark-based TextArea control? I am looking to dynamically change the font color for a range of text, not just the entire TextArea AND I cannot statically specify the font color. The problem I run into when trying to re-use the TextRange type is that the 1st argument is expected to provide the textField property, which is currently not on the Spark-based TextArea control. I thought about extending the Spark-based TextArea control to provide this accessor property but that seems like overkill and is probably not the best approach.
Any help would be greatly appreciated.
Thanks,
Michael
When manipulating Spark text components, you'll want to use the Text Layout Framework (TLF), which is built on top of the Flash Text Engine (FTE) that was introduced in Flash Player 10. It gives you major control over how the text is displayed (at the cost of being pretty complex.) Here's a good place to start: Using Text Layout Framework

Resources