I have a form that uses Richtexteditor of Flex3 to write in their reply. The reply is then posted to a textarea, where all of the formatting is lost! I have embedded the font since I was doing some tweeening on the text boxes.
I need to find out how keep the formatting intact in the textarea from richtexteditor!
has anybody an idea?
Make sure that you set the htmlText property on the TextArea, not just text.
Related
I have a PDF and the textbox fields are being filled automatically, unfortunately what's supposed to be a multiline textbox FULLADDRESS has turned into a single line of text with <br> codes embedded in it.
Is there any way I can have the PDF handle the <br> codes by using any settings on the text box fields? Or am I stuck with <br> codes?
Thanks.
Edit: Can this be done with formatting javascript editor? Thanks.
The code for new lines in PDF multiline fields is \r (or \n).
You'd have to convert your HTML tags to these codes.
OR, if you activate the richText property of the field, you'd have to create an array of span Objects wich will then become the richValue property. But even there, you will have to use correct new line codes.
I have a report with unbound textbox's in them. I populate these fields onLoad.
The problem, though, is that the if the text is too long, it will not wrap. I have set Can Grow = Yes but this does not seem to work.
Is it due to the fact I am adding the string to the field OnLoad? If so, how can I overcome this and force the text to wrap? I would want the width to remain constant, but the height to grow.
Figured this out... I right clicked the text box and selected Size > To Fit...
I had the box big enough to accommodate a second line. It wouldn't ever word wrap until I made the change above. Can Grow and Can Shrink did nothing, but I left them selected.
I open report from code in design mode, make changes to control source of the text fields, save and close report and lastly open it in preview mode. The only way I get what I want.
I know this is an old post but I've been running into the same issue and haven't been able to figure out a solution until now.
One of the fields in print preview was getting cut off for me and despite my best efforts to make sure all the formatting settings were correct (i.e. Can Grow/Shrink: On) for both the detail section and the specific field. Again, this issue only happened in print preview, which meant the reports that were getting printed had the text cut off.
Solution:
I ended up realizing that all of the other text fields were set to Plain Text and the text field giving me the issue was set to Rich Text. I changed it to Plain Text and voila! It displayed everything without any issues.
My guess is that if you're having this issue, make sure all of the fields are set to the same property (Rich Text/Plain Text). Not sure why Access has trouble with this but I hope this solution helps someone else out.
The simple solution to this huge problem is listed below.
Convert the property of the textbox from plain text to rich text.
Set the text align property to distribute.
Enable can shrink and can grow property of the text box. (Yes)
Done.
After a lot trial-and-error, the solution seems to be that the text box that you want to scroll must have enough height to show two vertical lines. A textbox that is only one line high will not scroll. (You must also have Can Grow set to 'Yes' for both the textbox and the detail section.)
You also have to have the CAN GROW of the section that the text box is in set to YES as well as the text box.
Is there a way to detect if there is formatting or not (i.e. Rich) anywhere in a RichTextBox?
I'd like to write RichTextBox.Rtf is there is, and RichTextBox.Text if there isn't.
I came across a post that suggested checking the SelectionFont after selecting all text, but I have no idea how to accomplish that, or if it would work.
Thanks!
You can check the rtf property of the richtextbox: richtextbox1.rtfto see the rich text code. Even with no additional formatting, there will be some rich text formatting. For example, here's what you get with a richtextbox containing only "text":
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs16 test\par
}
You can check to see if there are any additional formatting tags, and if not, it should be plain text. You can also access the plain text (without formatting) with richtextbox1.text.
I am using CK editor on a text area. It is working fine but there is one problem and it is when I save content it removes some attributes and doesn't recognize all HTML tags. For example it is removing class attribute from ul li and also doesn't recognize many of HTML tags. Is there any way to modify CK editor so as to make to save everything. Removing it is not an option because CK editor is needed to make some customizations if a user is saving text. Thanks.
This should be the option you are searching for: http://docs.ckeditor.com/#%21/api/CKEDITOR.config-cfg-allowedContent
I couldn't get around this so I found another solution for this which I think might help others in similar situations. I now provide two options (using radio buttons) to users to save their data, through simple text box or through a fully CK editor loaded text box. If a user has already formatted text like containing lots of HTML tags, CSS classes, scripting etc they can simply select simple text box and it will save everything as it is without applying or removing anything. If they need to apply some formatting to simple text they can select loaded text box and format their text.
I using vb.net code to send emails. There is no problem in sending plain text emails but I want to use some formating (bold, coloured text et.) I am writing my message body in a richtextbox but do not know how to do the formatting.
Also I want to insert picture. Please help regarding that too.
Thank you very much.
You basically need to make a html file with css for the elements you want to be colored. This you add to your email as an attachment with mime-type set to text/html.
For images you add these as base64 encoded attachments and use their Content-ID as CID: reference in your html code.
I wrote a little more about this in my answer to this thread:
Send email includes image like Outlook does?