Problem: Dynamically add rich text

Hello to all,
in advance sorry for my bad english,
I have major problem and trying to solve it... for days...
In basic, i want to add RichEditableText or TextArea in runtime, and have ability to bold, italic, change color,size, drag it etc. and change default text
If anyone have any idea or solution i would be veery thankful
This is my idea;
Code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"  >
    <fx:Script>
        <![CDATA[
            import spark.components.RichEditableText;
            [Bindable]public var selID:int;
            public var newID:int = new int(0)
            public var ret:RichEditableText;
            public var retTemp:RichEditableText;
            protected function theClick(event:Event):void{
                selID = event.target.id      
            protected function btnAdd_clickHandler(event:MouseEvent):void{
                ret = new RichEditableText;
                ret.text = "Rich Text"
                ret.id = newID.toString()
                ret.addEventListener(MouseEvent.CLICK,theClick)
                hBox.addElementAt(ret,newID);
                newID++
            protected function btnBold_clickHandler(event:MouseEvent):void{
                retTemp = hBox.getElementAt(selID) as RichEditableText
                retTemp.setStyle("fontWeight","bold");
                hBox.addElementAt(retTemp,selID);
            protected function btnItalic_clickHandler(event:MouseEvent):void{
                retTemp = hBox.getElementAt(selID) as RichEditableText
                retTemp.setStyle("fontStyle","italic");
                hBox.addElementAt(retTemp,selID);
        ]]>
    </fx:Script>
    <mx:Label x="10" y="24" text="Selected ID: {selID.toString()}" id="idTxt"/>
    <mx:HBox x="10" y="53" width="565" height="44" id="hBox"  verticalAlign="middle">
    </mx:HBox>
    <s:Button x="10" y="117" label="Add" id="btnAdd" click="btnAdd_clickHandler(event)"/>
    <s:Button x="193" y="117" label="Italic" id="btnItalic" click="btnItalic_clickHandler(event)" />
    <s:Button x="115" y="117" label="Bold" id="btnBold" click="btnBold_clickHandler(event)"/>
</s:Application>
App works while "RichEditableText" text stays Rich Text, if you change text, it has no more ID

... I've searched CookBook
For the App that I am trying to build, I need add RichText that have his own unique ID.
If I use Canvas, Label,Button etc... in above code (replacing RichEditableText) it works fine but,
in this case problem is when I change RichEditableText text, in this case "Rich Text", it's ID just vanish.
... if I setStyle ID remains
If you have any specific solution other than "search CookBook"...please post it...
Thanks in advance,
PS:
I've tried with
   import mx.core.UIComponent
   protected var uiComp:UIComponent
   protected function theClick(event:Event):void{
           uiComp = UIComponent(event.target)
           selID = uiComp.id     
... and so on
... problem still remains

Similar Messages

  • MS SharePoint 2010 Designer Workflow Email - Enhanced Rich Text Field look-up values on HTML email have large spaces

    MS InfoPath 2010 form with RTF (Rich Text Fields)
    MS SharePoint 2010 Custom Library
    MS SharePoint 2010 Designer Workflow Send Email
    http://office.microsoft.com/en-us/sharepoint-designer-help/send-e-mail-in-a-workflow-HA010239042.aspx
    https://www.nothingbutsharepoint.com/sites/eusp/pages/creating-html-emails-with-spd-workflows.aspx
    Hi all of the above work, our question is how to control the RTF (Rich Text Field) look up values to the InfoPath 2010 form in the HTML email?
    How to FORMAT the RTF look up value? in the HTML email
    EXAMPLE
    we have a InfoPath 2010 form published in the SharePoint 2010 custom list library there are 5 RTF fields (Notes1, Notes2, Notes3, Notes4, Notes5) there are other plain text fields, date fields, and other field types in the form
    We use a HTML table to make the email look like the InfoPath form, so when the users fill out the form and they get the email notification everything looks the same.
    Our problem is the EXTRA LINE SPACE in the RTF look up values
    We want to remove any leading spaces, and line spaces between HTML table cells
    Our Workflow has the HTML in a Workflow variable, as you know it does not support remote CSS it has to be in-line style for any formatting we want all cells to have
    valign="top" the email should align at the top of the cell, all field types do except the RTF look up values they make the email look bad and they contain a lot of white space.
    Please test this in your enviroment 
    <table>
    <tr><td>Title:</td><td>[%Current Item:Title%]</td><td>[%Current Item:Notes1%]</td></tr>
    <tr><td>Created by:</td><td>[%Current Item:CreatedBy%]</td><td>[%Current Item:Notes2%]</td></tr>
    <tr><td>Date Created:</td><td>[%Current Item:Created%]</td><td>[%Current Item:Notes3%]</td></tr>
    <tr><td>Modified by:</td><td>[%Current Item:ModifiedBy%]</td><td>[%Current Item:Notes4%]</td></tr>
    <tr><td>Date Modified:</td><td>[%Current Item:Modified%]</td><td>[%Current Item:Notes5%]</td></tr>
    </table>
    I could not update the question below to the proper forum section. that is why i am asking again.
    http://social.technet.microsoft.com/Forums/en-US/a7918bfb-9166-4bdb-828c-132a0c7611e3/ms-sharepoint-2010-designer-workflow-emails-huge-lines-paces-in-rich-text-fields-values-from-ms?forum=sharepointcustomization
    -Isaack

    Hi IssackB,
    perhaps you may try this article:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/f8fa2a11-9f74-4dd2-b277-21ce872fdcb2/can-we-add-rich-text-editor-to-the-sharepoint-designer-2010-workflow?forum=sharepointcustomizationprevious
    there are some notes that perhaps you may check:
    Use the same font for all the controls to ensure consistent spacing between rows.
    Choose Size from the Format menu, and then choose To Fit from the menu that appears. This adjusts the size of each control, depending on the font set for the data that appears
    in the control.
    NOTE: The Print Preview and Output To commands use different algorithms for calculating text width; therefore, the text may occupy more or less
    space in the RTF file.
    Reduce the amount of blank space above and below the report controls. Any vertical
    space between the controls is converted to whole lines
    in the RTF file. For example, a
    space of .02 inches can increase to .1667 inches in the
    RTF file.
    Make sure controls on the same output row are not too close to each other or overlapping. This can cause the Output To command to omit the controls or to align the columns incorrectly
    in the RTF file.
    Use the Align command from the Format menu to ensure that a row of controls is aligned properly on the report. If a row of controls is not aligned properly, the Output To command may place the controls
    in different rows, causing extra blank
    spacein the RTF file. 
    and please have a check there are updates for exchange 2013 and will be available with the upcoming release of CU4 for Exchange 2013, that stated the format rtf was saved instead HTML. http://support.microsoft.com/kb/2862739/en-us
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Rich text field will not show proper font attributes! (Bug? - RTF OTF font handling)

    I created two text form fields (rich text)...
    In Windows 7, Write program (using it to format the rich text content)... I edited my two lines.
    Line one: mix of two font sizes and a few attribute changes... pasted into the first text field perfectly.
    Line two: similar to the above... pasted into the second text field but the font is appearing in bold! It is not bold in the source, nor is it preset in the text field properties! I even pasted it back into Write AND Word and it pastes as I intended it.
    Why is Adobe doing this? I even tried to toggle >Text Style > bold on/off, clear formatting... these functions do not work!
    If I bring up the properties toolbar (Ctrl-E), bold is toggled on but I cannot toggle it off, I can add underline, I can change the font size.
    UPDATE: It seems that Adobe Acrobat is NOT reading the OTF font correctly! If I change to a different font, in the same family, the problem changes from set on bold to set on italics!
    It is specifically related to the font I am using but is ONLY a problem when using Rich Text fields. In other words, the entire font family works perfectly if I inserted a text box or use the font family in any other Adobe product.
    I have submitted a bug report: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&loc=en

    Another possibly revealing clue is that when I go to Text Field Properties > Appearance tab > Text / Font, I see the entire family of this particular font. However, when editing the text in the properties toolbar (Ctrl-E), only a small sub-set of this font family appears and the attributes behave in an odd manner. Example: normal font appears as italics but if I switch on BOLD, the italic attribute is gone... and other strange attribute problems.

  • How to Change Width of Rich Text Editor

    We are attempting to use a rich text editor. By default, the span for the RTE gets a width of 760px. This is much wider than we'd like.
    The id attribute of the span control gets set to cke_<PAGE_ITEM_NAME_HERE>, so this jQeury selector should obtain a reference to the control and allow us to change or remove the width attibute
    span#cke_P3_DESCRIPTION_2However, what we've notice is that the control does not exist until after the page has been loaded. In other words, if we do this in the "Execute when Page Loads" section, nothing happens
    $('span#cke_P3_DESCRIPTION_2').css('width','');We can confirm this by popping up an alert. In the page load section, this yields "0" but, in a button on the page, that gets clicked after the page is open, it yields "1"
    alert($('span#cke_P3_DESCRIPTION_2').length);So, since the control isn't actually there at load time, what's the best way to do this?
    -Joe

    Thanks for this tip, VC! Worked like a charm.
    I was having a problem with a rich text field in a modal region in one of the new responsive themes (theme 25). The page dutifully alters the spacing and layout of the page regions as the browser window is made wider or narrower, and the modal region also resizes appropriately. But the CKEditor window within the modal region stubbornly stayed at whatever value it defaults to (30 characters, which I guess translates to the number of pixels mentioned by the OP).
    I slightly modified your code below to set the width property to 100% instead of a fixed value and now the editor window expands to fill the available modal region width. Perfect!
    Mike

  • Incoming mail won't wont display rich text or graphics

    . Before updating my Intel iMac to Leopard, none of my incoming mail displayed the text or graphic that it was used to compose the mail i.e everything is in plain text . I took the computer to local Apple store and paid for 2 hours of the tech's time and he could not find the source of the problem. After upgrading to Leopard, it did improve a bit with some mail displaying the graphics and rich text but now it is happening again.
    I have been into Mail preferences and ticked the box "display remote images in HTML messages " . There is nothing in troubleshooting to help and it is getting annoying. I also have a 13" Macbook but it does not have the same problem as the rich text and graphics come through as sent. Hope someone can help.

    try this link
    http://support.apple.com/kb/TS2537

  • Rich Text in a XML Dynamic Form

    Hi guys,
    I'm having a problem accessing the property "richValue" of a text field.
    What I'm trying to do is get comments entered in a text field to be added to a list of comments(rich, text Field), similar to chat window. So each comment added (via a button click) will be formatted differently depending on other form parameters.
    Using LiveCycle Designer ES to create dynamic pdf form, target version 8.1 or higher. Testing using Acrobat Professional 8.1.2 .
    All text fields have richText switch on and also the Binding data format has been set to "XHMTL", only because Designer was whinging about it.
    Have tested:
    ]var field = event.target.getField("form1[0].#subform[0].txtAddComment[0]");
    console.println("Comment: " + util.spansToXML(field.richValue));
    ]undefined "is the result".
    Also tested:
    ]var field = event.target.getField("form1[0].#subform[0].txtAddComment[0]");
    var comments = event.target.getField("form1[0].#subform[0].txtComments[0]");
    ]comments.richValue = field.richValue;
    ]"nothing happens, no error, fields don't change nothing"
    OK is rich text supported in xfa dynamic forms?
    My aim is to be able to take someone's comments, format them and add them to a list of comments (like a log of comments), via javascript.
    Can anyone assist? It will be much appreciated.

    send me your form,will try and fix it for you
    [email protected]

  • Dynamic Action in CKE Editor / rich text

    Dear fellow developers,
    I created some dynamic actions in Apex 4.1.1, which allow me to create function keys in my application.
    For example on "key-down F10" a modal dialog opens or upon hitting "F11" the user is redirected.
    While this works as long as my Selection Type is DOM object "document", the actions are not fired once I enter the rich text editor (CKE) and it has received focus.
    Have you got an idea how to solve this problem?
    Creating an identical dynamic action and setting the Selection Type to jQuery Selector #cke_2 is to no avail.
    Many thanks,
    Sebastian

    No one having a hint?
    It is obviously due to the fact that the ckeditor is embedded in an iframe, which I don't have a selector for.
    I was able to add an id "#ckeditor" to the body of the iframe content but the usage of it fails.
    Maybe some code will illustrate it a little better:
    <span id="cke_P8_STR_BEARBEITUNG" class="cke_skin_kama cke_2 cke_editor_P8_STR_BEARBEITUNG" lang="de" style="width: 748px;" aria-labelledby="cke_P8_STR_BEARBEITUNG_arialbl" role="application" title=" " dir="ltr">
    <span id="cke_P8_STR_BEARBEITUNG_arialbl" class="cke_voice_label">WYSIWYG-Editor</span>
    <span class="cke_browser_gecko" role="presentation">
    <span class="cke_wrapper cke_ltr" role="presentation">
    <table class="cke_editor" cellspacing="0" cellpadding="0" border="0" role="presentation">
    <tbody>
    <tr role="presentation" style="-moz-user-select: none;">
    <tr role="presentation">
    <td id="cke_contents_P8_STR_BEARBEITUNG" class="cke_contents" role="presentation" style="height:100px">
    <iframe frameborder="0" allowtransparency="true" tabindex="0" src="" title="WYSIWYG-Editor, P8_STR_BEARBEITUNG, drücken Sie ALT 0 für Hilfe." style="width:100%;height:100%">
    <html lang="de" dir="ltr">
    <head>
    <body id="ckeditor" class="ckeditor cke_show_borders" contenteditable="true" spellcheck="true">
    </html>
    </iframe>
    </td>
    </tr>
    <tr role="presentation" style="-moz-user-select: none;">
    </tbody>
    </table>
    </span>Edited by: skahlert on 13.04.2012 10:53

  • Just moved my email from entourage to Mail. Having real problems with getting my signatures to work properly. When adding in a small company logo, windows computers only receive signature as an attachment. Am sending email as Rich Text. Any ideas on a fix

    Just moved my email from Entourage to Mail. Having real problems with getting my signatures to work properly despite sending email as Rich Text.
    When adding in a small company logo to the signature, PC's / windows computers only receive signature and logo as attachments.
    I've tried all possible fixes I can find including getting a PC user to format the logo but no joy. Has anyone experienced this and any ideas on a fix gratefully received.

    Send it as html so the signature is an image source URL

  • Making Rich Text Editor with PHP in Dreamweaver  - Problem with CKEditor...

    Hi,
    I am developing a website in Dreamweaver and using the platform of PHP and MYSQL. I need to develop a Rich Text Editor just like the one I am typing at the moment. With my recent searches I have come across with CKEditor as one of the possibilities to add a Rich Text Editor to my website. I have seen older versions of CKEditor also known as FCKEditor which I believe unfortunatley is out of date and obsolete now (discontinued). I cannot find any of the downloads now from anywhere on the web.
    I can find FCKEditor tutorials with PHP,  but can not find CKEditor tutorials for PHP (when I try googling it, it always gives me FCKEditor page). Can anyone please help me and tell me if I can still make Rich Text Editor using CKEditor and PHP?
    If yes, please guide me how? Any tutorials or reading material will be very helpful.
    Regards,
    Bilal . Khan

    Yes, you absolutely can use CKEditor to create a rich text editor with PHP/MySQL.I have tried several editors and it's my choice.
    Here is a link to the documentation page:
    http://docs.cksource.com/
    CKFinder is also very good in conjunction with CKEditor. Although it costs $59/per website, it's better than the free alternatives.

  • Facing problem to add component in a panel dynamically

    I face serious problem to add component dynamically on a jpanel. can any one help me?
    I have one panel inside a frame. And I have another 3 or 4 panel. dynamically i want to change the panel inside the frame with the other panel.
    can anybody help me with source code?
    Your earliest response is highly appreciated.

    remove is reflected immediately without calling
    validate() but it does not work for adding. please
    give me some code.Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html and http://www.yoda.arachsys.com/java/newsgroups.html

  • Problems with displaying Asian languages dynamically in a text box

    I have a text box that I am adding to the stage dynamically. The text box is a movieclip in the library. However, when it is added to the stage the message is not displayed. I have no problems with English or Spanish but for Chinese, Korean, and Japenese the message is not displayed. Here is the code in Chinese (when a certain condition is met:
    function whiteFlashCompleteF():void{
       ssMessageF("截图已添加至您的图片库");
    function ssMessageF(s:String):void{
        ssMessage.alpha = 0;
        addChild(ssMessage);
        ssMessage.x=stage.stageWidth/2;
        ssMessage.y=stage.stageHeight/2;
        ssMessage.tf.text = s;
        TweenLite.to(ssMessage,1,{alpha:1});
        TweenLite.to(ssMessage,1,{alpha:0, onComplete:ssMessageCompleteF, delay:3, overwrite:false});
    Do anyone have any ideas on how I can get the text to display?

    any text that is rendered in a dynamic textbox during runtime,
    has to consist of characters of a font you have properly embeded,
    (which might not be the case for this chinese message)

  • Gettinig 404 error when I try to add an embedded link in Rich Text area

    Hello everyone,
    I am using 9.0.4.1 and I am trying to enter a number of URLs into a rich text field. I highlight the text I want to be the link, then click the link button and enter the url. If I try to enter more than 3 (or 4, or 5, the number varies) links, when I click the Finish button, I get directed to 404 - file not found page. The URL of this page is server/pls/portal/PORTAL.wwv_edit_tab.editItem.
    Do any of you have any clue as to what is going on here?
    Any help would be greatly appreciated
    Jim Koch

    Christian,
    Thanks for the advice. We ended up logging a TAR regarding this, and after working with support, we came to the conclusion that an upgrade we performed last week was causing the problem and that we needed to install patch #4015165. We installed the patch, and now the problem appears to have disappeared.
    Thanks again everyone,
    Jim

  • Rich text editor problem

    Hi,
    I'm using stellent 7.5.1.
    I cannot upload pics and/or update text via the rich text editor .. The editor field opens, but just stays grey, i.e. they don’t have any option of entering or saving text.
    I have even checked Java version its fine.
    Do i need to change any config setting to enable to editor again?
    Thanks

    The 7.5 editor uses an ActiveX plugin, so it only works in Internet Explorer. There may also be security settings in Internet Explorer that might interfere with the way it works.
    If you get it going, try this article for some enhancements to the editor.
    http://webmonkeymagic.blogspot.com/2007/12/get-enhanced-contributor-editing.html

  • Printing problem from rich text email

    We're using Acrobat Pro 9.0, Windows XPSP3 and Office 2003SP3. This has also been tested with Office 2007 with the same results. The issue comes when a user receives an email that is in rich text format and has more than one PDF attached. The user wishes to right click on the email and print the email and attachments. Works fine when there is only one PDF but more than one PDF and only the first attachment prints. The next attachment produces an error: "There was an error opening this document. This file cannot be found."  This happens both when displaying PDF in browser is checked or not. Also happens if user has Acrobat open before printing the email or not. This does not happen when a  user receives an HTML email.
    Looking for a fix on this one. Already know work arounds of saving the attachments first, or printing the attachments individually. The user needs to be able to swiftly select a large number of emails and print them alll with attachments. Scanning through to figure out which ones failed to follow work arounds is too time consuming.
    Thanks in advance!

    everyone, thanks for all your help.
    i was able to find a working source code that will print a text file. as of the moment, i used this file and just modified it a bit to suit my need.
    if anyone is interested with that code, here is a link
    http://www.ftponline.com/javapro/2002_12/online/print_kgauthier_12_10_02/
    again, thanks for all you help.

  • InfoPath form, rich text fields, "There was a form postback error" InvalidOperationException, There has been an error while processing the form

    Using InfoPath 2013 browser enabled form.
    I am getting the above error on ALL Infopath Designed Rich Text fields, where the "Cannot be blank" attribute is set.
    To reproduce it, I create a custom list and custom list form with InfoPath 2013. I add 2 Rich Text fields and enable "cannot be blank". To raise the error, I put some data in the RT field. Skip to another field (so focus is changed and a postback
    occurs), then back to original field to delete the contents (to raise the validation).
    I originally thought it was associated with the HTMLCHKR.DLL not being registered (and I have re-registered it just in case), but the exception I get from the ULS logs reads (it is from a list AFTER I have re-registered the DLL):
    There was a form postback error. (User: 0#.w|myDomain\jc, Form Name: Template, IP: , Request: h t t p ://MyWebApp/MySite/Lists/rtAfterHtmlCHkrReg/Item/newifs.aspx?List=2212ff41-77b4-445b-931b-d7e538c9da91&Source=h t t p://MyWebApp/MySite/Lists/rtAfterHtmlCHkrReg/AllItems.aspx&RootFolder=&Web=3db49106-bdca-47bb-b4cd-a549d2d86aa7,
    Form ID: urn:schemas-microsoft-com:office:infopath:list:-AutoGen-2015-01-16T21:51:48:853Z, Type: InvalidOperationException, Exception Message: No content generated as the result of the operation.) 8cc5e09c-3665-903b-575a-faaac506c40a
    I noticed that errors associated with the HTMLCHKR.DLL not being registered would have some sort of COM exception (example: TYPE_E_LIBNOTREGISTERED or REGDB_E_CLASSNOTREG)
    I also should mention that this problem started happening about 3 weeks ago. We have extended the web application to handle HTTPS on the intranet zone (we had a reverse proxy project that did not eventuate) - would that cause something? How can I do further
    checking?

    Hi,
    I have done a test in my SharePoint, and I met the same issue with you.
    I created a custom list and custom list form with InfoPath 2013. I added 2 Rich Text fields and enabled "cannot be blank".  I put some content in the RT field, then delete the contents, I got the error message:"there has been an
    error while processing the form."
    Here is a similar post said that executing the command: regsvr32 "C:\Program Files\Common Files\Microsoft Shared\
    OFFICE14\htmlchkr.dll" will solve the issue.
    https://social.msdn.microsoft.com/Forums/en-US/eb2e0f6e-c8e4-4e92-ac5e-a09d72759eda/rich-text-field-error-in-webform?forum=sharepointcustomizationprevious
    But I just disabled "cannot be blank", and it solved the issue.
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

Maybe you are looking for