Map html tags to text display in jeditorpane

hi,
i am looking for some way to map the position of a tag in a html i/p to the actual display in the JEditorPane... below are the details of why i need this feature...
i have a JEditorPane whose text is set from a html file i/p... and i have a JTree which is like a table of contents for the content in the JEditorPane... when i click on any of the jTree nodes, i want to scroll the JEditorPane to the position corresponding to that element in the text...
currently i am doing a string search (for ex, "1. My_First_Heading: ") and getting the position from the editorPane.getDocument().getText() method and then using a modelToView() to determine the scrollBar position...
but i would like to have a more correct searching method, since the string could appear at many places... i would like to have some anchor or some tags defined at the place of each table of content element in the JEditorPane's html i/p... then search for those tags and somehow map the position in the html to the position in the display...
is there a way i can do this...
thanks,
prasuna

Hi Tarabyte,
Actually wanted to know how to map the postion of any tags in the html to the display in the jeditorpane...
Hi StanislavL,
Thank you very much for your answer... it solved my problem... awarded the 5 duke dollars to you for that...
Cheers,
Prasuna

Similar Messages

  • Html tags i Text item

    Hello,
    I would like to know if it is possible to use html tags in text items?
    null

    Thank you but I still have problem.
    I make an text item like this:
    <h1>En rubrik</h1>
    <B>text kommer nu<B><P>Nytt stycke
    The <H1> tag or <B> does not work in Netscape 4.75. It works in IE 5
    Whe have Portal V 3.0.6.6.5 Ias 1.0.2.0.1 for Sun Sparc solaris.
    The same thing worked when we tested on NT.
    Could you please help me with this?

  • HTML Tags in Text View

    Is it possible to use HTML tags to format a string displayed
    within a text view.  If so how?

    Jonathan,
    No, this is impossible for TextView.
    In WD ABAP it is possible using FormattedTextView UI control.
    See my post that describes workaround for WD Java: /people/valery.silaev/blog/2005/11/23/display-formatted-text-using-webdynpro-for-java
    VS

  • Can i use HTML tag in text when sending contens as "Attachement(PDF)".

    Hi all!!
    i try to add html tag on ibot email text column.
    is it possible?
    - in ibot delivery content.
    send content as Attachment(PDF)
    "if sent as attachement, include this text" <--- mark this field
    and below multi line input column, can i use html tag, for example,
    Yahoo
    thanks in advance.
    Edited by: vingorius on 2010. 10. 31 오후 7:27

    hi vingorius ,
    No you cant include html but u can use variables
    To add a variable in a text message to provide context for the iBot attachment
    1. Click the following option:
    If sent as attachment, include this text
    2. Type the text into the text box with a session variable, a repository variable, or a presentation variable using the syntax shown in the following table:
    Variable Type
    Syntax
    Repository @{Variable_Name}
    Session @{NQ_SESSION.Variable_Name}
    Presentation @{Variable_Name}
    For example, Dear, @{NQ_SESSION.Variable_Name}, here is your personalized Weekly Sales Territory Update.
    NOTE: If you want to use the @ character, you need to precede it with the \ (back slash) character to separate it from the variable syntax. For example, Dear @{NQ_SESSION.DISPLAYNAME}, \@ New York, appears as Dear Joe Smith, @ New York.
    Source : BI Guide
    Thanks,
    Saichand.v

  • HTML tags in text-only e-mail notification (with HTML attachment)

    Greetings,
    Our "Purchase Order Review" e-mail notifications (as generated by the WF-Mailer) have HTML tags in the message body (which is "plain-text" text-only), with an HTML attachment. (The attachment looks good, and is what we are expecting.) All our e-mail notifications are text-only (which is how we want them), and this is the only kind of notification that is generating HTML tags in the 'text-only' message body.
    We'd like to keep the HTML attachment as it is, but we want to have the e-mail message body be text (without any HTML tags). The other option that would be acceptable is to NOT have any message content at all, and only the HTML attachment.
    Can either of these options be done, and how do we go about doing them?? Thanks!! -- Tom
    Tom Buck
    [email protected]
    PS: Here is a partial sample of the "text-only" message content...
    <HTML><HEAD></HEAD>
    <BODY BGCOLOR="#FFFFFF"><b>Oracle Workflow Notification (FYI)</b>
    <br>
    <hr>
    <P><table width=100% border=0 cellpadding=2 cellspacing=1 cols=3 rows=2>
    <!-- header -->
    <tr>
    <!-- ORACLE, ship-to, PURCHASE-ORDER -->
    <td width=45% valign=top>
    <!-- ORACLE -->
    <font color=black size=+2>
    BUTLER MANUFACTURING
    </font><br>
    <font color=black> BUTLER MANUFACTURING COMPANY
    <br> BUTLER MANUFACTURING HEADQUARTERS
    <br> 1540 GENESSEE ST.
    <br> KANSAS CITY
    , MO
    64102
    <br> US
    </font> </br>
    </td>
    <td width=25% valign=top>
    <!-- ship-to -->
    etc..., for another couple hundred lines. -- Tom

    in the notifications properties you will see two tabs, in one you can enter your message in text and in another you can enter in html. not sure if you had tried these.
    hth
    satish paul
    Greetings,
    Our "Purchase Order Review" e-mail notifications (as generated by the WF-Mailer) have HTML tags in the message body (which is "plain-text" text-only), with an HTML attachment. (The attachment looks good, and is what we are expecting.) All our e-mail notifications are text-only (which is how we want them), and this is the only kind of notification that is generating HTML tags in the 'text-only' message body.
    We'd like to keep the HTML attachment as it is, but we want to have the e-mail message body be text (without any HTML tags). The other option that would be acceptable is to NOT have any message content at all, and only the HTML attachment.
    Can either of these options be done, and how do we go about doing them?? Thanks!! -- Tom
    Tom Buck
    [email protected]
    PS: Here is a partial sample of the "text-only" message content...
    <HTML><HEAD></HEAD>
    <BODY BGCOLOR="#FFFFFF"><b>Oracle Workflow Notification (FYI)</b>
    <br>
    <hr>
    <P><table width=100% border=0 cellpadding=2 cellspacing=1 cols=3 rows=2>
    <!-- header -->
    <tr>
    <!-- ORACLE, ship-to, PURCHASE-ORDER -->
    <td width=45% valign=top>
    <!-- ORACLE -->
    <font color=black size=+2>
    BUTLER MANUFACTURING
    </font><br>
    <font color=black> BUTLER MANUFACTURING COMPANY
    <br> BUTLER MANUFACTURING HEADQUARTERS
    <br> 1540 GENESSEE ST.
    <br> KANSAS CITY
    , MO
    64102
    <br> US
    </font> </br>
    </td>
    <td width=25% valign=top>
    <!-- ship-to -->
    etc..., for another couple hundred lines. -- Tom

  • Remove HTML tags in text

    Hi,
    I have to read some text from a text editor, that can be formatted for example with Bold, which means that when I execute the function to read its content, it returns something like this:
    Do you know how can I remove these HTML tags from the text?
    Thanks in advance.
    Regards,
    Sónia Gonçalves

    Hi,
    Something like this should do the trick.
    report  ztag.
    data: v_data type char30 value '<H>blablabla</H>'.
    if v_data(1) = '<' and
      v_data cs '>'.
    * Remove the HTML opening header
      shift v_data left up to '>'.
      shift v_data left.
    * Remove the HTML closing header
      shift v_data right up to '<'.
      shift v_data right.
      shift v_data left deleting leading space.
    endif.
    write: / v_data.
    Regards,
    Darren

  • Html tags br and hr in JEditorPane

    I have a JEditorPane that is used to display html data. The data is obtained from an xml file, transformed to html using a stylesheet and rendered in the JEditorPane using setContentType("text/html") and setText() methods. However the <br/> and <hr/> tags used in the html cause problems in that a '>' sign shows up at the location of these tags in the JEditorPane. So if I have a <hr/> in the html, a horizontal line followed by a > sign is rendered in the JEditorPane. I am unable to figure out whats going on, the html is rendered fine in browsers.
    Also is there a way to get rid of the <? xml version etc etc ?> tag at the beginning of the generated html without resorting to String manipulation exercises.
    Any help will be appreciated. I am using jdk 1.4
    Thanks in advance
    RS

    I am trying to figure out how to get rid of the pesky > signs. The html that I have used is pretty basic, just some text formatted by the <p>, <br> and <hr> tags., Is there any documentation on what JeditorPane supports (which html version or what tags) and what it does not.

  • HTML tags not displayed when using Data Template

    Hi All...
    I'm developing a BI Publisher report in which one of the columns is a clob data type. I'm using an xsl stylesheet to format the data present in the clob column.
    I've developed the report using data template as the data set. The problem is the clob column which has the HTML tags where not displayed properly...for example
    the tag starting with
    <
    is replaced with
    & lt;
    I did a couple of searches in this forum and in tim's blog but couldn't find a proper solution...
    http://blogs.oracle.com/xmlpublisher/2007/01/formatting_html_with_templates.html
    API and HTML Formated Content
    Re: Problem with text data elements containing escaped HTML codes
    HTML Output from CDATA
    Re: HTML formatted output
    Re: Special characters in CLOB are making report fail
    Re: Formatting of HTML tag problem
    I'm using BI Publisher standalone:Release 10.1.3.2. In one of the threads..
    Re: Special characters in CLOB are making report fail
    I came to know that data template cannot generate proper HTML tags for release 10.1.3.2. Is there any work around way to get the proper HTML tags when data template is used as a data set?
    Thanks in Advance...
    Edited by: user10280715 on Dec 9, 2008 3:13 PM

    Issue could be with the data that is selected in the other environment. It generally happens that the ALV will not give the same results as in the DEV in the other systems.
    Possible errors could be the control break statements in the loop...endloop block. validate the correctness of the control break stmts if any.

  • HTML tags in Hidden Item not displaying correctly

    I have created a HTML Text Region which includes a Javascript function. The function references a Hidden Item also created and linked to the region. The Hidden item returns a text field from the database with concatenates multiple rows together into a single string with HTML tag -br- between each row.
    The tags are not been recognised as HTML tags and is displayed :-
    -br-Record 1-br-Record 2-br-Record 3-br-'
    I want the page to display :-
    Record 1
    Record 2
    Record 3
    Any ideas?
    Message was edited by:
    pjturley
    Message was edited by:
    pjturley
    Message was edited by:
    pjturley

    Hello,
    Check to make sure you don't have those items set to escape html.
    Past that are you sure your javascript is putting in the &lt;br /&gt; tags correctly? before you submit fire a alert that shows the value of the hidden item and make sure it's correct there.
    Carl

  • SharepointWebControls RichTextField also display HTML tags

    Hi,
    I'm having an issue upon using SharepointWebControls:RichTextField in my custom Page Layout. When I input values on this field, it also displays the html tag in the display form. Do you have workaround for this? Thanks. :)
    Regards,
    Napster

    Hi Juan,
    Thanks for your reply. I have tried it and a richtextbox was displayed on my page layout but just got a problem upon saving and publishing the page, I think the values that I entered in the control can't be saved. I just went back in using the RichTextField
    and made a workaround by creating a script that will hide the html tags showing in my Display and Edit Form page. 
    Regards,
    Napster

  • HTML tag data displayed in IMAP emails.

    I have recently moved from BES to BIS (my firm has stopped using BES).  My personal POP3 account still works ok.  My work account is now set up via BIS using IMAP to our Exchange server.  BES service books have been deleted.  Email to IMAP account works except that HTML tag data gets displayed in the body of the email (see attached comparison between two accounts of same email). HTML is enabled for both accounts.
    I'm also getting duplicate emails - when I access an existing email in Outlook it seems to generate a duplicate on my BB.
    Any ideas?

    Hi Ernie ~
    Thanks for helping...
    I just checked all my old messages, and now those do not display HTML, either.
    One message which used to display correctly now says this when I preview it:
    "Your Email Client does not support MIME encoding. Please upgrade to
    MIME-enabled Email Client (almost every modern Email Client is MIME-capable)."
    (...boy, if this gets out it could be embarrassing to Mac users everywhere...)
    I cannot get my .mac accounts to be viewed at all (see my recent topic post on this, too), so here I am referring to a Yahoo POP account. Messages display just fine, incidentally, if I read my mail online using Yahoo's webmail reader, even in Safari.

  • HTML Tag issue

    Hi all,
    Html tag line is displaying as button and text box in Report region. When i enter the following text (*<input type="button" value="Submit" />*), it is displaying as textbox and button in report region. Here i am setting the column link and when i click the column it takes me to another page. If i remove the column link, then the text is displaying as i entered. Here i need to set the column as well as the text needs to be displayed as i enter.
    Thanks for help!

    apexlearner wrote:
    Html tag line is displaying as button and text box in Report region. When i enter the following text (*<input type="button" value="Submit" />*), it is displaying as textbox and button in report region. Here i am setting the column link and when i click the column it takes me to another page. If i remove the column link, then the text is displaying as i entered. Here i need to set the column as well as the text needs to be displayed as i enter.It is not at all clear what you are attempting to describe here. To avoid confusion, try reproducing the problem on apex.oracle.com.

  • HTML tag list

    Hello,
    Any one knows where I can get a list of HTML tags supported in JTextPane or JEditorPane? This will be very useful to avoid coding unsupported HTML contents.
    Thanks in advance.

    hi!
    have you seen this class
    javax.swing.text.html.HTML.Tag?
    :)

  • HTML Tag Soup?

    I am new to Application Server. I have tried setting an xhtml strict dtd, yet when the portal page is produced and I view source, I have serious tag soup. I get a mixture of html 4 and xhtml 1.1 tags, tags in all caps, tags all lowercase, and tags either not closing or closing in the wrong order.
    Maybe someone has found a work around for this, but I could use with some advice so I can make my sites W3C compliant.
    Please help!
    Regards,
    Michael

    apexlearner wrote:
    Html tag line is displaying as button and text box in Report region. When i enter the following text (*<input type="button" value="Submit" />*), it is displaying as textbox and button in report region. Here i am setting the column link and when i click the column it takes me to another page. If i remove the column link, then the text is displaying as i entered. Here i need to set the column as well as the text needs to be displayed as i enter.It is not at all clear what you are attempting to describe here. To avoid confusion, try reproducing the problem on apex.oracle.com.

  • HTML tag selective filtering

    Hi,
    I am new to the Oracle 9ias portal development. I have the difficulties with the HTL tag filtering. Can PDK do the selective tag filtering?
    Here is the detail information:
    I have one page which have serveral <style media="media_name" type="text/css"></style> entries in one web page. There is one special style tage will define the image location with the absolute positions of the web page. It will crewed up the portal page if I am using the porlet with a tab. How can I filter the specific <style media="screen" type="text/css"> tag with affect other <style> tage?
    I have tried <headerTrimTag>&lt;style media="screen"</headerTrimTag>
    But it won't work.
    I appriciate if anyone can throw some hints on it.

    apexlearner wrote:
    Html tag line is displaying as button and text box in Report region. When i enter the following text (*<input type="button" value="Submit" />*), it is displaying as textbox and button in report region. Here i am setting the column link and when i click the column it takes me to another page. If i remove the column link, then the text is displaying as i entered. Here i need to set the column as well as the text needs to be displayed as i enter.It is not at all clear what you are attempting to describe here. To avoid confusion, try reproducing the problem on apex.oracle.com.

Maybe you are looking for

  • How to find out which "purchased items" are not authorized?

    I have an iPhone 5, and my son has an iPod touch that are both synced to iTunes on my MacBook Pro. Since I upgraded the MBP to Yosemite, I can no longer sync the apps on the iPod; it always responds with "The iPod could not be synced because this com

  • I5 or i7 - Which is best for me?

    Hello, Apple Community I currently have a netbook from HP that I think is quite dated and I would like to get rid of. It is running very slow in the processor and graphics aren't up to par as I would like them to be. I've been looking into getting a

  • How to activate iMessage, how to activate iMessage

    How do I get my iMessage to work?

  • CSS to inline styles

    I never thought I'd be asking this EVER. But, I need to convert CSS styles to inline styles. Can this be done in DW or does it need to be done by hand?

  • Jakarta struts

    whatz a good way to start learning struts framework ? bookd articles tutorials... thanks