HTML Editor and getting HTML Tags

Hi
i am using JTextPane to create Text Editor.I have added button to add Bold,or Italic Text.Text is shown as bold in the editor. I want to get the text of this Text Pane with HTML Text i mean in the form of Tags <B> text</b> for example.
But on the view it should not display those tags in the editor
Can any one please tell me how can i do it
Regards

I want to get the text of this Text Pane with HTML Text i mean in the form of Tags <B> text</b> This must be basic JTextPane question ! The method getText() will do this work for you.It will return the content within <html></html> with all required formatting.
Again ,if you like to place the content in the JTextPane ,us setText(String content) and it will be reflected as you liked.
But,the thing is your JTextPane's content type should be "text/html"
PS. Please post the swing related issues in PROJECT SWING forum.
Regards.

Similar Messages

  • HTML Editors and Greek Language

    Hi all,
    When using the HTML Editor the value that is stored in the database
    is
    &Delta &epsilon &nu &upsilon &pi ά&rho &chi &epsilon &iota&alpha &pi ό&theta &epsilon &mu &alpha (Deleted ; in the end of each character so that I can show you what I mean).
    instead of Δεν υπάρχει απόθεμα
    This doesn't happen when I use text item or text area.
    Can I do something about it?
    APEX version 3.1.0.00.32
    Thanks in advance

    Peggy,
    FrontPage 97 / 98 have both worked really well for us, however we
    discovered a slight hitch with 98 where the Editor would gobble up
    <?FORTE ..> tags inside the SELECT OPTION tag, but you can work around
    that one, apart from this FP98 is a great HTML editor. I also thought
    HotMetal was a good fit.These observations come out of evaluating about
    5-6 leading HTML editors.
    Some recommended steps in the process:
    1) Create a prototype by laying out all the HTML using an Editor. Figure
    out all the navigation within your web. More recent features seen in
    HTML editors such as JavaScript generation and DHTML / CSS support are
    really difficult to work out on your own, let the advanced Editors do as
    much dirty work for you as poss.
    2) Once the prototype is finalized, for all the pages requiring any
    dynamic content generation, figure out all the Tag Handlers you will
    need. Change the HTML Content by inserting the FORTE tags as required,
    code the corresponding Handlers.
    3) Figure out the relation between page requests and the security
    requirements for your pages, design the Session properties and data
    tracing across requests using the Session object.
    4) Do refer to all the Tech Notes on the Forte web site for known
    issues.
    As for the Java applets frontend, we have used Java - IIOP - Forte since
    early beta through every Forte release (3.0.X) and it works fine with
    WebEnterprise and release 30f2.
    - Sameer
    From: Peggy Lynn Adrian <[email protected]>
    Date: Wed, 07 Jan 1998 15:19:58 -0500
    Subject: WebEnterprise - HTML Editors and Java
    I'd like to know any opinions on HTML editors and their use with
    WebEnterprise. Have any of you done
    evaluations to determine the best editor to use with the Forte
    product? Also,
    do you have experience using
    a Java applet as the front-end to a Forte service object? In this
    instance,
    are you able to do so with Forte 30f2 and
    WebSDK?
    Thanks,
    Peggy Adrian
    Eli Lilly and Company

  • WebEnterprise - HTML Editors and Java

    I'd like to know any opinions on HTML editors and their use with
    WebEnterprise. Have any of you done
    evaluations to determine the best editor to use with the Forte product? Also,
    do you have experience using
    a Java applet as the front-end to a Forte service object? In this instance,
    are you able to do so with Forte 30f2 and
    WebSDK?
    Thanks,
    Peggy Adrian
    Eli Lilly and Company

    Peggy,
    FrontPage 97 / 98 have both worked really well for us, however we
    discovered a slight hitch with 98 where the Editor would gobble up
    <?FORTE ..> tags inside the SELECT OPTION tag, but you can work around
    that one, apart from this FP98 is a great HTML editor. I also thought
    HotMetal was a good fit.These observations come out of evaluating about
    5-6 leading HTML editors.
    Some recommended steps in the process:
    1) Create a prototype by laying out all the HTML using an Editor. Figure
    out all the navigation within your web. More recent features seen in
    HTML editors such as JavaScript generation and DHTML / CSS support are
    really difficult to work out on your own, let the advanced Editors do as
    much dirty work for you as poss.
    2) Once the prototype is finalized, for all the pages requiring any
    dynamic content generation, figure out all the Tag Handlers you will
    need. Change the HTML Content by inserting the FORTE tags as required,
    code the corresponding Handlers.
    3) Figure out the relation between page requests and the security
    requirements for your pages, design the Session properties and data
    tracing across requests using the Session object.
    4) Do refer to all the Tech Notes on the Forte web site for known
    issues.
    As for the Java applets frontend, we have used Java - IIOP - Forte since
    early beta through every Forte release (3.0.X) and it works fine with
    WebEnterprise and release 30f2.
    - Sameer
    From: Peggy Lynn Adrian <[email protected]>
    Date: Wed, 07 Jan 1998 15:19:58 -0500
    Subject: WebEnterprise - HTML Editors and Java
    I'd like to know any opinions on HTML editors and their use with
    WebEnterprise. Have any of you done
    evaluations to determine the best editor to use with the Forte
    product? Also,
    do you have experience using
    a Java applet as the front-end to a Forte service object? In this
    instance,
    are you able to do so with Forte 30f2 and
    WebSDK?
    Thanks,
    Peggy Adrian
    Eli Lilly and Company

  • Highlighted info in html editor and sending it in an email

    Is there a way to take everything that is highlighted in the html editor and send in an email?
    Either in the body of the default email client or as attachment in apex.mail or email client?
    Thanks.

    Hello,
    Maybe this link can help you: http://javascript.internet.com/page-details/highlighted-text.html
    I've been looking at the FCK Editor (which is what APEX is using) Javascript API's but didn't find a solution that quick, but my guess it's somewhere in there too.
    Nevertheless the above link provides you with something that works as well.
    Hope you like it.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • HTML Editor and reply to discussion post

    Hello,
    I am using Discussion Group provided by KM. In a discussion, when I reply to a post, the HTML Editor is opened. In the HTML Editor, not all the functions are available. The Editing functions (display, cut, copy, paste) and some of the Formatting functions are displayed. Other functions such as Inserting Objects (Insert image from KM, Insert link from KM, ...) are NOT available.
    Is it possible to make these "missing" functions available ?
    Thank you.

    Hello Amit,
    Thank you for your reply.
    The HTML Editor is set correctly. I checked with the KM explorer. When I used the menu New - HTML File..., the HTML Editor is opened with all the functions (including the Inserting Objects and Tables functions) .
    Is there any other configuration that I need to check?
    Regards.

  • How to parser a html page and get useful information?

    now ,I try to get the page by the url,after getting the whole page,
    is there any way to get the useful text ,and abandon other ,liks ,ad likes,
    other related links?
    I try to use java.util.regex.*;
    is there any other methods for dointg this?

    Regex isn't a good method unless your requirements are quite simple. In general if you want a Java HTML parser they are not hard to find -- "java html parser" is a good choice of keywords for an internet search.

  • Problem using pdk-html:multibox and pdk-html:checkbox

    Hi all,
    I am developing a PDK struts application using OC4J 10.1.2. I have to create some form pages which are going to have some checkboxes. I have tried to follow the following code in order to use the pdk version of the checkbox in my form:
    in jsp file
    <logic:iterate id="item" property="items">
    <pdk-html:multibox property="selectedItems">
    <bean:write name="item"/>
    </pdk-html:multibox>
    <bean:write name="item"/>
    </logic:iterate>
    Given an ActionForm setup like this
    private String[] selectedItems = {};
    private String[] items = {"UPS","FedEx","Airborne"};
    public String[] getSelectedItems() {
    return this.selectedItems;
    public void setSelectedItems(String[] selectedItems) {
    this.selectedItems = selectedItems;
    ....... //getters and setters of items//
    In the reset method I also reinitialize the selectedItems array like :
    selectedItems=new String[]{};
    But the value of the multibox is not reflected in the action class. To my surprise, the html code generated by the server is similar to ordinary checkbox which ideally should carry some portlet specific information like pdk-html:text
    Same is the case with single checkbox. I have created a boolean variable for the single checkbox in the actionForm class. But same problem frustrates me again. The value is not passed simply.
    Can anybody comment. Is this some kind of a bug or may be there is no support for checkbox and multibox in pdkstruts.jar (10.1.2.0.2).
    Best regards,
    Omer

    following below the code that generate the XML. I still need help.
    I hope someone can help me in this issue
    The servlet that generate the XML.
    response.setContentType("text/xml");
    String Xml = "";
    Xml = Xml + "<?xml version=\"1.0\"?>";
    Xml = Xml + "<?xml-stylesheet href=\"/XslGravaCrit.xsl\" type=\"text/xsl\"?>";
    Xml = Xml + "<!-- Here is a sample XML file -->";
    Xml = Xml + "<page>";
    Xml = Xml + "<title>Test Page</title>";
    Xml = Xml + "<content>";
    Xml = Xml + "<paragraph>What you see is what you get!</paragraph>";
    Xml = Xml + "</content>";
    Xml = Xml + "</page>";
    try{
    TransformerFactory tFactory = TransformerFactory.newInstance();
    byte[] arr=Xml.getBytes();
    ByteArrayInputStream bytes=new ByteArrayInputStream(arr);
    Source xsl=new StreamSource("../XslGravaCrit.xsl");
    Templates template=tFactory.newTemplates(xsl);
    Transformer transformer = template.newTransformer();
    transformer.transform(new StreamSource(bytes), new StreamResult(response.getWriter()));
    }catch(Exception e){
    System.out.println("Excecao 100: " + e.getMessage() + e.getLocalizedMessage());
    The XSL XslGravaCrit.xsl
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java"
    version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:output method="html" indent="yes" version="4.0"/>
    <xsl:template match="page">
    <html>
    <body><b>
    <xsl:value-of select="java:java.util.Date.new()"/>
         </b>
    <xsl:for-each select="/page">
    <xsl:sort select="paragraph"/>
    <xsl:value-of select="paragraph"/>
    </xsl:for-each>
    <i>Hello World</i>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>

  • Why does the BlackBoard HTML editor freeze and crash Firefox 3.6?

    Black Board uses a HTML editor that seems to be based on JAVA. I teach by added posts to threads and can use the editor or disable the editor in either case after adding some text the window freezes and I cannot add text or delete text. If I enable the HTML editor the text is gone, but if I then disable it I can add a few letters, but if I try to delete, it will again freeze. Disabling and enabling the HTML editor works several times and the FireFox will crash. Actually I do not care about the HTML editor. My preference is just to disable the HTML editor and add my classroom comments.
    Oddly the editor works on Safari, but its slow and clunky, so I disable the HTML editor and I can add my raw text with some selective HTML to get paragraphs and bold. I would rather go back to FireFox, but for now Safari works better.
    This is the HTML Editor per the about window:
    Objects Edit-on Pro 4.2.106.1, packaged with WebCT on Vista

    Try using CCleaner: http://www.piriform.com/ (:
    And good luck with that girlfriend vs. X thingey!

  • Hide "Save and Lock Button" Button in the HTML Editor

    hi,
    I have created a doc file and saved it as a webpage. Then i have uploaded the file to the KM Content. Now this file can be edited online. When i choose the Html Editor, i get 3 buttons. Out of this, i have to disable "Save and Lock Button" button. Can anyone please help me reganing this. This is urgent
    regards,
    pinki

    hi,
    Thanks a lot for your reply.
    In the renderbutton() button, the new buttons are being created. But if we comment that part of the code, i guess the new button will not be created. I am very new to all this. Please explain . i am talikng about the following code:
    if(lockResource.canExecute() && lockResource.isResourceLockedByMe())
                        //save = new Button(WdfEventDispatcher.dispatchableControlID(this, "onSaveAndUnlock", url));
                        //save.setDesign(ButtonDesign.STANDARD);
                        //save.setText(getBaseBundleString("com.sapportals.wcm.control.edit.ResourceEditControl", "btnSaveAndUnlock"));
                        save.setOnClick("onWdfEvent");
                        //buttonGrid.addComponent(buttonGrid.getCurrentRowIndex(), buttonGrid.getCurrentColumnIndex(), save);
                        //buttonGrid.setCurrentColumnIndex(buttonGrid.getCurrentColumnIndex() + 1);
    Actually, the problem is "Save and Unlock " button is behaving weirdly, even though, user is clicking in it , it is remaining locked. At first, we thought the user was clicking "Save and Hold Lock" by mistake. So we wanted to disable it.But now the problem is somewhere else. Can you please help
    regards,
    pinki

  • How can I use javascript in a Text Area with HTML editor??

    My question is... how can I use javascript in Text Area with HTML editor??
    I can use javascript functions that change the content of Text Areas but i can´t if i try in text area with html editor....
    I need to limit number of characters in a text area with html editor and i can´t.
    could anybody help me please?

    I have been experiencing similar problems with the HTML Editor and have managed to find an answer that should start to answer some of my questions. The Apex HTML Editor Standard is actually an HTML editor called FCKeditor. The FCKeditor has a Javascript API that can be found at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API. Unfortuately this doesn't seem to give the whole answer and I found more at http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:49607.
    I needed to get the text entered within my html editor standard (e.g. P1_MYTEXT) and use it within my javascript function. I did this by using the following script
    <script language="JavaScript" type="text/javascript">
    function showtext(){
    var oEditor = FCKeditorAPI.GetInstance('P1_MYTEXT');
    var editortext = escape(oEditor.GetXHTML(oEditor.FormatOutput));
    alert(editortext);
    </script>
    Hope this helps.
    Matthew

  • Problem with HTML Editor box in XML Form

    Hi all,
    I am using a HTML editor box in one of the XML form template. When I parse the data from HTML editor and apply my own style sheet and display in JSP page, it has no effect on it. Instead the style set by HTML editor box is being applied. Is there any way to override the style applied by HTML editor ?
    For example,
    Suppose  user enters "Hello" in HTML Editor box and saves the xml form.
    Then when I parse this data and apply my style sheet like
    <style="font-family:arial; font-size:12"><%= datafromXMLform() %>
    I should get "Hello" in arial font with size 12, instead I am getting size=1 because of style applied by html editor.
    Is there anyway to remove/override this style?
    Thanks in advance,
    Sandesh
    Edited by: sandesh kumbhar on Oct 27, 2008 4:12 PM

    Got it !!!
    In the property section of html editor in form builder , set the style as none/empty instead of standard.
    Sandesh

  • APEX Supplied HTML Editor (fckeditor) - Limit number of characters

    Hi
    Has anyone found a way of limiting the number of characters allowed in the HTML Editor that is supplied with APEX (3.1/fckeditor)
    I have had a look at the fckeditor web page and found a couple of plugins but I fear that this approach will require me to manually implement fckeditor, and not use the inbuilt one.
    I would also prefer to not do this with an application process as the user can overflow the editor and get the HTTP-400 Value param too long error.
    Regards
    Matt

    Dribble!
    does this help? Is their anyway to limit the character count on a textarea with html editor

  • Standard html Editor

    One of the text field , I use standard html editor to enter the text. I can copy text from any other text editors like MS Word etc,
    But Is there any way that I can copy an image from some place and paste to field through the html editor and insert a hyperlink on this image?.
    I copied an image from MS Word, but it is not visible after pasting to the html editor, I copied from other html pages , it worked, but I cannot add a Hyper link on this.

    Hello Sascha,
    Thanks for your reply.
    The initial requirement of client is to replace HTML editor with JCE editor.
    Will you able to tell me about the development effort for such integration.
    Secondly, am not sure this happens but just to be sure:
    Ive heard that some client users have edited the file offline but the moment they upload the doc/file in Portal/KM, some of the tags miss out.
    Including this, there are many other bugs in HTML editor and this is the reason why client wants to replace it.
    Thirdly, I had also suggested to go with Web Page Composer but then again, its buggy.
    We are on EP7 SP9
    Any thoughts on this?
    Awaiting Reply.
    Regards,
    Ritu

  • Replace standard HTML editor..Please guide

    Hello All,
    Is it possible to replace HTML editor with another editor like JCE editor?
    If yes, please share your experience
    If not with JCE, please let me know as to which other editors can the HTML editor be replaced with?
    If the HTML editor cannot be replaced, is there a way to provide another option for KM users...something like the 'Open With...'option we have while working on windows.
    Awaiting Reply.
    Regards,
    Ritu

    Hello Sascha,
    Thanks for your reply.
    The initial requirement of client is to replace HTML editor with JCE editor.
    Will you able to tell me about the development effort for such integration.
    Secondly, am not sure this happens but just to be sure:
    Ive heard that some client users have edited the file offline but the moment they upload the doc/file in Portal/KM, some of the tags miss out.
    Including this, there are many other bugs in HTML editor and this is the reason why client wants to replace it.
    Thirdly, I had also suggested to go with Web Page Composer but then again, its buggy.
    We are on EP7 SP9
    Any thoughts on this?
    Awaiting Reply.
    Regards,
    Ritu

  • How to create a WYSIWIG HTML editor

    I need to create a WYSIWIG HTML editor and I'm thinking of using Swing.
    I realise many have done this before and that there are products already on the market ranging from Coffee Cup to Dreamweaver.
    However, this will be for a specific application where my users will need to drop some composite objects on to the web page -- these objects will generate chunks of HTML containing some of my own attributes with a special syntax. These objects might be as simple as a textbox with a label, or something more complex.
    So the idea is that the user selects the object they wish to create by clicking a particular icon in a palette. The cursor changes to a cross-hair as the mouse is moved across some sort of canvas pane. The user clicks where they want the top left-hand corner of the object to be (rubber banding not necessary). A dialogue pops up asking for some context-sensitive properties for the object. At this point, the system can work out the HTML object it needs to create, i.e. tags, attributes, etc.
    So far the canvas pane has acted as a simple drawing surface, perhaps with a set of grid lines to aid the user in positioning. But at this point, know that we know the HTML object required, I want it to be rendered on the pane as HTML.
    Is it possible for a pane to be both a canvas an an HTML renderer like this, so that I can achieve a true WYSIWYG effect ? Does anyone understand what I'm talking about ?! Are there any examples of how I would go about this ?
    Thanks

    Is it possible for a pane to be both a canvas an an HTML renderer like this, so that I can achieve a true WYSIWYG effect ? Does anyone understand what I'm Check out JEditorPane and JTextPane for HTML support. You have to do JEditorPane.setEditable(false) to make it render html. It also SUCKS as a web container - no support for style sheets, forms, javascript, etc.
    It is definitely possible to add components into or over the JEditorPane to show lines and other things. I'm just not sure what the point of this is.

Maybe you are looking for

  • I somehow lost my bookmarks toolbar. How do I get it back?

    This happened after being gone a week with computer off. It coincided with my inability to click "restore previous session". The latter doesn't bother me too much, but I use the bookmarks toolbar all the time.

  • Error - FTR_EDIT (Unable to settle the deal using ftr_edit)

    Dear All, Dear All, While  settling the MM deal using T code - FTR_EDIT I am getting the bellow error messages.              1) Error Message : Recording position management: Error during distribution FTRM 100000000000                   Message no. F

  • Iphone 3gs only works while on wall charger

    Hi i have and iphone 3gs and it only will stay powered on while being plugged into a wall charger, then it wil freeze and turn off again, I have tried holding down the sleep and power button but it doesnt seem to help. Can anyone else help me so that

  • Bridge CC にて.ツールのPSccでバッジを当てたいのですが

    Bridge CC にて.ツールのPSccでバッジを当てたいのですが.先日PS2014をインストールしたところバッチを当てる際にPS2014が起動してしまいます. ファイルタイプの関連付けは.すべてPSccにしてあります. スタートアップスクリプトは.PSccにチェック有り.PS2014はチェック無し. Bridge のウィンドウからは.PSccにてファイルを開けるのですが.バッジの設定はできるのでしょうか? よろしくお願いします. 使用環境:Mac os 10.9.5

  • Install and use Adobe Digital Editions on a computer without internet access ?

    Hello, I have a pair of PCs, one of them, with Windows Vista, has never been connected to the internet since many years. It is used for word processing mostly. I didn't even bother to plug an ethernet cable inside or think about a Wifi USB key, in a