How do I format text within a TextArea

Hello,
I would like to create a simple text editor that performs
syntax highlighting. In order to do so, I would need the ability to
set the style of individual pieces of text within a TextArea. Is
this possible? Do I need to subclass the TextArea (or perhaps the
Text control) to do this? Any pointers in the right direction would
be appreciated. Thanks!

The issues around formatting text in the Flash Player are
numerous. There are several experts who have weighed in on this,
including .
Axel
Jensen who has made available a modification of the
RichTextEditor component. Additionally,
Jesse Warden has several older
articles in his blog on this issue. Finally, there is a
commercially available Flash/Flex text editor developed by Igor
(last name unknown to me), and found at:
http://www.flashtexteditor.com/.
Overall, the issue of accurately formatting text in
Flash/Flex has been an exercise in frustration, especially when
trying to implement htmlText and CSS. I am absolutely amazed that
Adobe's documentation for this very important aspect of web
development is either unavailable or deeply flawed, and on top of
that: How is the Acrobat Connect Buzzword application able to do so
much with text formatting, clearly within a Flex Framework, and yet
no concrete documentation of the techniques are available

Similar Messages

  • Formatting text  within a TextArea in a GUI

    I am new to java but have built a simple telephone directory operated through a gui all works ok. Program displays results in the form of a column of record numbers a column of names & a column of telephone numbers all of which are appended to a textarea with a vertical scrollbar. This works well Except that even though i have made sure the length of each record is identical by trimming or adding spaces to the text strings I cannot get the columns of information to align accuratly.
    This method worked when i printed my results to standard output (System.out.println) but when used inside a textarea each character seems to take up a different amount of space.
    When sending the record Number / Name / Telephone Number to the text area I have just appended 1 long assembled string. Will add code if requested but have quite a few lines spread over several classes
    Thanks in Advance

    Cheers guys monospaced worked well but i will need to look at JTable more deeply at a glance it looks excellent. One more silly question if i may. I understand that if i am going to attempt to put my application on another machine i must ensure it has the minimum of the J2RE bundled with my application. Could you guide me to a link that supplies installation instructions for this process. have been looking cannot seem to find exactly what i need.
    Thanks Again
    Scott

  • How do I delete text from a textArea?

    How do I delete text from a textArea? I basically want the opposite of append(String)... I want something that removes a line from my TextArea. Anyone know?>

    If you want to remove only a specific part of the text, you have to get the String, take the parts before and after the removed part, append them back together and use setText to replace it in the textArea.

  • Can I display formated text on a TextArea

    I am developing a chat applet. I want to display texts from chatters in a TextArea with specific colour and font. But TextArea only contain a method AppendText(String) where displaying plain text is only possible. Please anyone help me to display formatted text in a TextArea(or any relavent component).
    Thank you very much.

    You will probably want to look at JEditorPane instead.

  • How to use formatted text in a static text/laben(or other) component?

    Hello everyone,
    my web application reads a VARCHAR from a SQL Server database which is bound to a static text/label component. The problem is that I don't manage to include line breaks this way.
    Is there any way to do it? It doesn't have to be using a static text or label component, I just want to display formatted text on a web page which was read from a database.
    Thank you very much for your help,
    Arthur

    unfortunately it doesn't work this way(or I am doing it wrong as I don't know anything about css)
    If I set white-space: nowrap the text is displayed in one single line ( so probably I implemented it the right way)
    but with white-space:pre he still ignores all the whitespaces!
    reading the same text (from a microsoft sql server table)with a textarea component all whitespaces and line breaks are shown! there has to be a way to make the static text or label component act this way(I don't want to use the textarea component because it's ugly and doesn't serve for my purpose).
    can anybody help me?
    edit: observation:
    if I use "nowrap" for the textarea component he still keeps all whitespaces WITHIN the string but displays the whole string in one line
    but somehow he deletes white spaces in the beginning of the string
    the static text/label components delete all whitespaces before AND within the string
    Edited by: Arthur... on Feb 15, 2008 9:34 AM

  • How to get formatted text into arrays

    Dear experts and helpers,
    For my project I import an RTF file and then read the data from it into 3 arrays. This works fine when just using the string contents of the paragraphs. However, the final script should be able to read and replace formatted text...
    Why use the intermediate arrays? Because otherwise I need to switch back and forth between two fm-documents (and one may be a book component).
    The imported file starts with a number of lines separated into two items by a TAB (» denotes a TAB, in FM \x08)
    [[Garneau, 1990 #12]]    »   [9]
    The right item may also be locally formatted text, e.g. [9]
    Then follow the same (or smaller) number of paragraphs with formatted text like this:
    [9] » D. Garneau, Ed., National Language Support Reference Manual (National language Information Design Guide. Toronto, CDN: IBM National Language Technical Centre, 1990.
    Is it possible to replace in the body of the function below the following piece
      while(pgf.ObjectValid()) {
        pgfText = GetText (pgf, newDoc);
        gaBibliography.push(pgfText);
        pgf = pgf.NextPgfInFlow;
    with this
      while(pgf.ObjectValid()) {
        gaBibliography.push(pgf);
        pgf = pgf.NextPgfInFlow;
    Do I need a special declaration of the array gaBibliography ?
    And how to get the right part of the intro lines as formatted thingy into array gaFmtCitsFmt ?
    Currently I read into arrays only the 'strings' (function GetText not shown):
    var gaFmtCitsRaw  = [];                           // left column in processed RTF
    var gaFmtCitsFmt  = [];                           // right column in processed RTF
    var gaBibliography= [];                           // bibliography lines from processed RTF
    // filename is something like E:\_DDDprojects\FM+EN-escript\FM-testfiles\BibFM-collected-IEEE.rtf
    function ReadFileRTF (fileName) {
      var nCits=0, nBib = 0, openParams, openReturnParams, newDoc, pgf, pgfText ;
      var TAB = String.fromCharCode(8);               // FM has wrong ASCI for TAB
      var parts = [];
      openParams = GetOpenDefaultParams();
      openReturnParams =  new PropVals(); 
      newDoc = Open (fileName, openParams, openReturnParams); 
      pgf = newDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf;  // get first pgf in flow
    // --- read the temp/formatted citations 
      while(pgf.ObjectValid()) {
        pgfText = GetText (pgf, newDoc);
        if (pgfText.substring (0,2) == "[[") {        // citation lines start with [[
          parts = pgfText.split(TAB);                 // get the two parts of the line
          gaFmtCitsRaw.push (parts[0]);               // Push the result onto the global array
          gaFmtCitsFmt.push (parts[1]);
          pgf = pgf.NextPgfInFlow;
        } else { break }
    // --- read the bibliography
      while(pgf.ObjectValid()) {                      // until end of doc
        pgfText = GetText (pgf, newDoc);
        gaBibliography.push(pgfText);
        pgf = pgf.NextPgfInFlow;
      newDoc.Close (Constants.FF_CLOSE_MODIFIED);
    } // --- end ReadFileRTF
    The next questions then will be how to modify Ian Proudfoot's FindAndReplace script to handle formatted text as replacement. IMHO i will need to use copy/paste ...

    Klaus,
    Working with text is about the most complicated thing to do within FrameMaker. It seems counter-intuitive, since it is about the easiest thing to do with the GUI. But alas, once you remove the ability to select with a mouse and type with a keyboard, text becomes a wild jungle of complexity.
    Text ranges are not too bad, once you get the general idea. It is just that... a range of text, like something you would select with a mouse. Like a mouse selection, it starts before some character in some paragraph and ends after some character in some paragraph. It may be the same paragraph, which is a selection within a paragraph. The character can even be the same, which is then just an insertion point (cursor) somewhere.
    So, a text range is a data structure that defines two paragraphs and two characters. In the jargon of scripting, the character is called an "offset." An offset is simply the number of characters past the beginning of said paragraph, where 0 is the beginning.
    For example, if you want to capture the first five characters of a paragraph as a text range, you can do this, where 'pgf' is some paragraph object:
    var textRange = new TextRange();
    textRange.beg.obj = pgf;
    textRange.beg.offset = 0;
    textRange.end.obj = pgf;
    textRange.end.offset = 5;
    If you want to capture a whole paragraph, change that last line to the number of characters in the pgf, or you can do this:
    textRange.end.offset = Constants.FV_OBJ_END_OFFSET;
    ...where that constant is just some built-in thing that means "get me to the end of whatever." It's a convenience of the interface.
    I'll also note that a text range is actually just an array of two text location structures, one named 'beg' and one named 'end.' If you think of a text location as defined by paragraph and an offset from the first character, maybe that will make more sense.
    Text item structures are a whole new mess of complexity. I can't possibly go into an explanation of them here.
    I think that many ES developers (definitely myself included) still use the FDK documentation because it is considerably more comprehensive. The two interfaces are largely parallel, but of course somewhat different in the language syntax. Consider that as a potential resource.
    Russ

  • How to display Formatted text in adobe form

    In adobe form, I want to display the text which is inputed by formatted text edit in WD ABAP application.
    It is always displayed as plain text like '<p>this is test text.</p>'. I have set the attribute Data Format to XHTML, Field Format to Rich Text for the Text Field in adobe form. But it doesn't work.
    How to display these formatted text?
    Thanks and Best Regards,
    Jun

    Hi Juergen,
    I found Your blog and found it  really interesting... though I was not able to use it: I (like Jun Li is asking, I guess) need to use a dynamic text, containing formatting informations (according the xhtml syntax).
    I tried to pass it to the form by an ABAP-dictionary based interface and by means of the context (in a webdynpro page), but both tries failed.
    Some suggestion will be greatly appreciated.
    Thankyou
    Simone

  • Nested Table: How to display formatted text in the form ?

    Hi,
    Scenario:
    I have a nested table, say TAB1, containing another table TAB2 which holds the formatted text.
    Sample data
    Entries in TAB1:
    Column1       Column2(TAB2)
    Text1         Data_from_tab2
    Text2         Data_from_tab2
    Text3         Data_from_tab2
    Requirement:
    The requirement is to display the data in TAB1 as it is maintained.
    Trials:
    I am aware of the fact that we can transfer the content of the nested table (in this scenario, TAB2) in another table(of type TLINE) defined as a global variable in the interface of the form. Then in the context area, we can define a 'TEXT' node and bind it to the table and choose the 'Dynamic text' for the 'text type' attribute and maintain the other atrributes.
    But this approach cannot solve the issue as it is a nested table.
    Kindly suggest how can I resolve this issue.
    Regards
    s@k

    Hi,
    if its like colum1, column2 (tab2).
    you can represent column2 as a nested table in the form. and put these tables structure intoa subform of type flowed.
    then you can have the required format.
    the same can also be acheived using nested subforms instead of tables.
    example of such scenario is PO & line items.
    po number1 , items 1
                          item 2
                          item 3
    po number2 , items 1
                          item 2
                          item 3
    hope this helps you.
    Cheers,
    Sai

  • How do I rotate text within a table Pages 4.3?

    Does anyone know how to rotate text within a cell in a Pages 4.3 table?

    You would have to use a floating text box over the cell. Make sure text wrap is turned off.

  • How to get the text of the textArea ?

    Hi, expert
    i have created a new component com1,
    then i created a table view name 'result'.
    then i add a textarea by modifying the result.htm
    textArea id     = "TAMSG"
                     text   = "test......"
    then i add a button in the result.htm
    the method of the button is  'EH_ONSENDMSG'
    then i input some text into the textArea on the page.
    now, how can i get the text of the textArea in the method 'EH_ONSENDMSG' ?
    thanks.
    oliver.

    Hi,
    problem was solved.
    i put the text into a value node.
    <thtmlb:textArea id     = "TAMSG"
                     text   = "//TEXT/TEXT2"
                     encode = "TRUE"
                     width  = "100%" />
    method EH_ONSENDMSG.
      DATA lr_col_wrap      TYPE REF TO   cl_bsp_wd_collection_wrapper.
      DATA lr_query_values  TYPE REF TO   if_bol_bo_property_access.
      DATA lv_str_msg TYPE string.
      lr_col_wrap = me->typed_context->text->get_collection_wrapper( ).
      lr_query_values ?= lr_col_wrap->get_current( ).
      lv_str_msg = lr_query_values->get_property_as_string( iv_attr_name = 'TEXT2' ).
    endmethod.
    regards.
    oliver.

  • How to save formatted text in Transparent or cluster table using WDA

    Hi All,
    From WDA application I want to save formatted text in Transparent or cluster table.
    What Datatypes/Data elements should take in Tables? Format should remain as it is.
    How can I achieve above requirement. Please guide step by step.
    Thanks in advance.
    Note : I will use FormattedText UI element in the view
    BR
    CW

    Hi,
    I am not sure may you can try XSTRING also..
    And you can check this for special char.
    http://www.google.co.in/url?q=http://forums.sdn.sap.com/thread.jspa%3FthreadID%3D1342827&sa=U&ei=ynTkTZDvNsbsrAepvIWsBg&ved=0CBYQFjAA&usg=AFQjCNEHLu2lPsOLP0m78AqWKjZPvBB8Yw
    Cheers,
    Kris.

  • How to display Formatted text view in adobe forms

    Hi Folks,
    We have a element formatted text edit/view in webdynpro so it is easy to make the text formates(Bullets, font sizes, etc..) in webdynpro, but the same feature is not available in Adobe forms designer...I don't find any element in the Adobe Library...
    If any body have an idea how to display the formatted text in adobe, please let me know the procedure.
    I have a html tag related data in my Ztable..I want to display this converted string from HTML Tab on adobe, please explain me how to fix this issue.
    Thanks,
    Naresh.

    Hi Juergen,
    I found Your blog and found it  really interesting... though I was not able to use it: I (like Jun Li is asking, I guess) need to use a dynamic text, containing formatting informations (according the xhtml syntax).
    I tried to pass it to the form by an ABAP-dictionary based interface and by means of the context (in a webdynpro page), but both tries failed.
    Some suggestion will be greatly appreciated.
    Thankyou
    Simone

  • I can't copy and paste formatted text within the same or between Word and Excel documents

    I run Microsoft Office Professional Plus 2010 (English) (Student Select)
    when I try to copy any formatted text or tables within the same or different Word documents I will always loose the formatting. This is also true if I try to copy formats or formatted tables within Excel or from Excel to Word, see example screenshot:
    When I have a look at my paste options via 'Alt', 'e', 's' or 'Paste special' it only lets me choose between "Unformatted Text" or "Unformatted Unicode Text", see screenshot:
    Here is what I tried already:
    - In the advance options menu all options are on "keep formatting"
    - I uninstalled and reinstalled the entire office suit but keep having the same problem!
    Any ideas?
    Thanks in advance,
    Boston

    I found the solution on another site, superuser.com, so I can't claim the solution as my own, but it worked for me. Kent Ng says: 
    I face the similar issue with Excel 2003. If you have installed Skype-Click-to-Call, just removed it to resolve this issue.

  • How do I move text within a cell down in "Numbers" please?

    I am trying to move text within a cell down in Pages. I use one cell as a topic and then add text in the  next row of a cell. It may seem strange to some but I have been doing it for years in Excel. Here is the best example I can give here:
    Customer
    Customer Notes
    ABC Company
    Imagine a long row of text here and I want to start a new line of text below this one without (within the same cell)
    Text would continue here but still within the same cell (I use to be able to just hit return in excel)
    Any ideas would be appreciated.
    Thanks so much! ;-)
    Thanks so much!

    Thanks so much Wayne... I spent quite a while searching for this to no avail lol.Have a great day!

  • How to Display  Formatted Text  IN ALV Column?

    HI experts ,
    I am displaying  ALV with Multiple Column's , One of the Column is TEXT(Fomatted text).
    When ALV is Displayed  TEXT Column Comes as Continues TEXT . and is Not Formatted .
    Now when i want to edit this text i am Calling another View  which contains text edit . This Text edit will display correct Formatted Text . but when i save it and Come back to ALV again i do see continues text .
    Is there  any way where in i can display  the Formatted text in ALV Column ?
    Any body have any clue with this ...
    Thanks in Advance
    Patil
    Edited by: Badarinarayan Patil on Feb 22, 2008 3:45 PM

    Hi Juergen,
    I found Your blog and found it  really interesting... though I was not able to use it: I (like Jun Li is asking, I guess) need to use a dynamic text, containing formatting informations (according the xhtml syntax).
    I tried to pass it to the form by an ABAP-dictionary based interface and by means of the context (in a webdynpro page), but both tries failed.
    Some suggestion will be greatly appreciated.
    Thankyou
    Simone

Maybe you are looking for

  • SharePoint 2013 and IE 11 issue - While creating a Web Part Page and Editing Web Part Properties

    I tried to edit a Web Part in SharePoint 2013 using IE 11 but I did not see the Edit Eeb Part dropdown menu at the top-right corner of the web part. Then I tried to create a Web Part page and I get the following error. Cannot create a Web Part Page w

  • No Customer debit during billing

    Dear Experts, Is there anyway to to debit certain GL instead of customer during billing  on the basis of payment terms or something else ? Thanks Ram

  • PCI Ethernet card problem.....please help!

    Hi everyone, I intalled yesterday a PCI Ethernet card (10/100) on my PowerMac G5. !0.5 immediately recogenize it and setted it with DHCP mode but internet looks to be slow so I chaged the configuration with static IP but with out any good result. Int

  • String stemming

    hi everyone, i have a program that searches a file for a string. i need to be able to implement functionality to this progam so that it can find like strings. for example when i search for run, i want runner and running to also be displayed as well a

  • My Iphone restores all the time?

    My Iphone always has to restore all the time? After I just restored it, it says that it needs to restore again!? Why does it need to restore all the time?