Selecting html source from the text pane
Help!!
I am selecting text in the HTMLEditor text pane but when I look at the selected text it does not include tags like image and table tags. I would like to somehow grab the selected html source based on what is selected in the text pane. Is there a way to map the selected text in the editor textpane to the html in the editor sourcepane? I have not been able to find an answer in previous threads.
thanks,
Steve
here is the easiest way i know
using JEditorPane from the swing package
JEditorPane sourceViewer = new JEditorPane(http://www.google.com);
System.out.println(sourceViewer.getText());
or
JTextArea.setText(sourceViewer.getText);
several things to concider....
1. you dont have to add the component to abuse it, ie you dont have to show the JEditorPane you can just use its functionality
2. you cant JUST display the text in anything made to display html unless you removed the <html> tag. but that wont stop you from printing it or putting it into a JTextArea
Similar Messages
-
Problem removing html tags from the text retrived
Hi there,
I am using jdbc to connect the database and retriving the data. In one of the columns along with the description there are some html tags in few of the recors of that column. is there a way to retrive the text only ignoring the html tags in between. Or can i retrive and then strip off the html code in the text to display only normal text.
example of the data retrived which are pipe seperated and one of the columns has html tags in it:
209|The euphoria |187945-2|http://www.abc/lst.jsp?mktgChannel=I86023&sku=18791-2&siteID=qpF0HYnRugA|http://www.abc.com/assets/images/product/medium/18793-2_198.jpg|Rooftop Singers: Walk Right In | abc Music proudly presents THE FOLK YEARS, an unforgettable era in music history!<BR><BR><B>Featuring:</B><BR>
<LI>The most complete collection of folk and folk-rock songs ever put together -- 132 classics!
<LI>Original hits by the original artists!
Now i need to remove the tags before displaying this on the output. Is there a simple way to do this.
Thanks...Did you read the documentation of the trim() method,
where it describes which whitespace it removes?I believe his problem is that
"Some text here
<blah>
More text"becomes
"Some text here
More text"... and he wants ...
"Some text here
More text"So, your problem is that your regex isn't matching whitespace as well.
See the "Trimming Whitespace" section:
http://www.regular-expressions.info/examples.html -
Help Please - having difficulties creating af link from the text to an attached file i acrobat
I have been reading the help, but it just wonn't work when I try.
I have tried as followed (I am working with a danish version, and hope to matched the same word as in the english version of Acrobat Xpro):
1. From the toolbox i choose content and then 'hyperlink'
2. I mark the text from which i wish to make a link
3. Acrobat respond with an popup picture 'create a link'
4. From the popup I mark 'Open a side' and push 'next'
5. Acrobat respond with a new popup picture 'create / go to a side'
6. I go to the navigator and open the list with attached file's that I have embedded in my acrobat file.
7. I mark the to which i wish to make a link to
8. In the popup 'create / go to a side' that stilll is open, i push 'Mark hyperlink'
Then I hoped that I have created a link from the acrobat text to the attached file. In stead Acrobat has made a link to the same sidenumber that respond to the text from which i wish to make a link . F.ex. the linktext is on side 10 - then the link goes to side 10.
How do i do it right?
Please help.Hello Bernd
Thanks for a quick respond.
This corresponds to the text I have tried myself, but apparently I do something wrong
1. Open a PDF that contains a PDF file attachment – done
2. Go to where you want to create a link. If that location is in the file attachment, click the Attachments button in the navigation pane, select the file attachment, and click open.
Here I go to side number 10 from which I wish to make a link from (I am not open the attachment file at this moment, as the location not is inside the file attachment).
(I earlier also tried to mark the attachment file and click open, and It result that the attached file just opened normally without creating a link to the file).
3. Choose Tools > Content > link, and select the area for the link
Here I mark the text on side 10 from which I wish to make a link to a attached file
4. In the Create Link dialog box, set the link appearance, select Go To A Page View, and then click Next
Here I have selected ‘Go to a page view’ as told and I click Next
5. Set the page number and view magnification you want, either in the parent PDF document or in the file attachment, and then click set link.
Here I go to the navigation pane and mark the attached file from the file list (the files in the list hasn’t any side number in the list) and then I click Set Link.
Then I hoped that I have created a link from the acrobat text to the attached file. In stead Acrobat has made a link to the same sidenumber that respond to the text from which i wish to make a link . F.ex. the linktext is on side 10 - then the link goes to side 10.
What do I do wrong.?
Med venlig hilsen
Mogens Pedersen
Specialkonsulent
T 33 63 13 07
F 33 63 10 11
[email protected]<mailto:[email protected]>
Fra: Bernd Alheit [email protected]
Sendt: 2. marts 2012 13:11
Til: Mogens Pedersen
Emne: Help Please - having difficulties creating af link from the text to an attached file i acrobat
Re: Help Please - having difficulties creating af link from the text to an attached file i acrobat
created by Bernd Alheit<http://forums.adobe.com/people/Bernd+Alheit> in Creating, Editing & Exporting PDFs - View the full discussion<http://forums.adobe.com/message/4241290#4241290 -
How to select multiple values from the Parameters in the concurrent program
How to select multiple values from the Parameters defined in the concurrent program...and i believe multiple selection is not a direct feature of EBS, but is there any workaround solution to acheive mulitple selection?
I think there's no way to do that using standard feature.
Some workaround I use :
1. If the number of selections are fixed, you could use multiple parameters for the same valueset. For example :
Selection1 : <choose first selection>
Selection2: <choose 2nd selection>
..etc.
If you don't use it then leave it empty.
2. Use text varchar valueset and enter it manually and separate by comma (or other value) , eg : selection1,selection2,selection3....etc. -
After installing Maverics i can no longer propertly edit my work as I cannot mark different parts of text using cmd button. Shift works as before for highlighting all the text from starting point to selected point but I can no longer use cmd to highlight different areas of the text. Is this an OS bug? Or was the button for selecting different parts of the text changed? I tried everything...
It's just a small part of what makes Pages 5 so "stunning" (Apple's word). You think stripping out the nifty ability to mark non-contiguous passages of text was neat? Sure that was nice. But Apple has gotten rid of more, so much more. And for free!
Just wait till you put the product through its paces and you discover other nice features that are missing, such as (but not limited to):
- no linking of text boxes! Yes, that's right. Now a newsletter that had a "continued on page 6" or whatever will be broken by Pages 5. Stunning! (Even more stunning, Pages 5 will strip out all sorts of formatting from documents created with Pages 4.3 and it will do ao without warning and will save the document in a NEW unified file format so that it cannot be opened by Pages 4.3, thereby potentially losing users hours and hours of work. Stunning!
There's more!
- Pages 5 has no mail merge, no bookmarks, no images in headers/footers! Pages 4.3 has those features, but this stunning new release removes them.
- Pages 5 features vastly reduced and simplified set of templates (there used to be about 130 Apple-cupplied templates, now there are about 60).
- Page 5 also boasts NO RTF SUPPORT, so a paper your wrote with Apple's own TextEdit is not natively readable with Pages: Stunning!
- No detail was too small to omit in this stunning new release: the vertical ruler, so you can easily place text or an obejct at a certain place in a document: gone! Setting the default zoom: gone! Status bar reproting word count and pagecount (e.g., Page 4 of 48): Gone! View comments in the left side bar: Gone! Autocapitalization: Gone! Search & Replace: drastically simplified!
But here's the really good news: Pages 5 is just PERFECT for creating a one page-poster advertising a new concert by Apple employee Eddie Cue. What's more you can collaborate on it with someone else, even if they're using a PC. Now that's "stunning"! -
How to send mails in HTML format from the send mail step of workflow?
Hi,
I have a requirement where I need to send mails in the html format from the send mail step of the workflows.
But what I found out that the html tags are not renderd and as such the output is in plain text.
I know that there is an alternative of using an activity step and use my own custom code from within there,But due to certain business constraints, I need to use the send mail step only.
My SCOT settings are all right.
Please let me know how it can be done.
Thanks,
Samrat.Samrat,
It can't be done, you have to use your own activity step.
What are these constraints that refrain you from doing that?
Rgds,
Patrick -
Code
public void ScrollNews()
listsext.Ext(page);
combindedString = string.Join(Environment.NewLine, ListsExtractions.myList);
richTextBox1.SelectAll();
richTextBox1.SelectionAlignment = HorizontalAlignment.Right;
richTextBox1.AppendText(combindedString);
scrollerText = string.Join(Environment.NewLine, ListsExtractions.myListWithoutLinks);
scroller1.TextToScroll = scrollerText;
if (NewsLevels.newsLevel && NewsLevels.shouldStart)
UpdateTextControls();
scroller1.Start();
NewsLevels.shouldStart = false;
if (NewsLevels.newsLevel == false && NewsLevels.shouldStart)
UpdateTextControls();
scroller1.Start();
NewsLevels.shouldStart = false;
string[] rlines = richTextBox1.Lines;
richTextBox1.SelectionStart = 0;
richTextBox1.SelectionLength = rlines[0].Length;
richTextBox1.SelectionColor = Color.Red;
richTextBox1.Select(rlines[0].Length, rlines[1].Length + 1);
richTextBox1.SelectionColor = Color.Green;
RedColorAlert1();
if (lines == null)
label5.Text = "0";
else
label5.Text = lines.Length.ToString();
The line is:
richTextBox1.AppendText(combindedString);
I'm calling this method ScrollNews every X minutes with a timer.
The way it is now it will AppendText all the time. But i want it to Add the combinededString only if the text in combindedString was different from the text that is already in the richTextBox. Somhow to keep all the time the last text and compare it and
if there is a new text then appen it.public void Scroll()
listsext.Ext(page);
combindedString = string.Join(Environment.NewLine, ListsExtractions.myList);
richTextBox1.SelectAll();
StringBuilder sb = new StringBuilder();
sb.Append(combindedString);
richTextBox1.SelectionAlignment = HorizontalAlignment.Right;
richTextBox1.AppendText(combindedString);
The problem is that now it will keep adding to the richTextBox the content in combindedString over and over again. I need somehow to check each time if the content in combindedString already exist in the richTextBox if not meaning it's new content then AppendText
it.
If it's the same already exist do nothing don't add it.
EDIT
I write to a text file the content of the ombindedString variable .The first content the lines is the combindedString:
המשטרה עצרה אמא ל2 ילדים קטנים שבעלה נעצר בחשד למעורבות בעלה בכריתת עצים
15:03 דווח במקור בתאריך : 09.03.15 : שעה
http://rotter.net/forum/scoops1/189935.shtml
אדם החשוד בעבירת מין בקטינים נעצר לאחר שהתלונן על 2 שסוחטים אותו על רקע מעשיו
14:50 דווח במקור בתאריך : 09.03.15 : שעה
http://rotter.net/forum/scoops1/189932.shtml
אינדונזיה: 5 הרוגים בקריסת האנגר בנמל תעופה
14:44 דווח במקור בתאריך : 09.03.15 : שעה
http://rotter.net/forum/scoops1/189930.shtml
אום אל-פחם: מספר חשודים עוכבו בחשד למעורבות במימון טרור
14:04 דווח במקור בתאריך : 09.03.15 : שעה
http://rotter.net/forum/scoops1/189914.shtml
אלמנתו של רפ''ק ג'דעאן אסעד, שנרצח בפיגוע הדריסה, ילדה בן
13:05 דווח במקור בתאריך : 09.03.15 : שעה
http://rotter.net/forum/scoops1/189884.shtml
תנאי ליברמן לכניסה לממשלה עונש מוות למחבלים חובת חתימה על מסמך נאמנות
12:39 דווח במקור בתאריך : 09.03.15 : שעה
http://rotter.net/forum/scoops1/189868.shtml
תלמיד תיכון מרחובות חשוד שהפעיל מעבדה ביתית לזיוף תעודות זהות ואישורי מחלה
12:03 דווח במקור בתאריך : 09.03.15 : שעה
http://rotter.net/forum/scoops1/189856.shtml
הצביעות של רענן שקד: האשים את אמהות 3 החטופים ומגנה את חגי הוברמן
11:43 דווח במקור בתאריך : 09.03.15 : שעה
http://rotter.net/forum/scoops1/189848.shtml
And this is a screenshot i couldnt copy the text of the richTextBox1.Text
richTextBox1.Text content image
co uld be that the format of the text in the combindedString and the richTextBox1.Text looks different so it think it's not exist ?
Update:
Not sure if it's important but the combindedString i'm adding the text to it from the variable ListExtractions.myList
myList is List and i build this List like that:
private void ListToStringList(List<string> myl)
for (int i = 0; i < AllNews.Count; i++)
myl.Add(AllNews[i].text);
IFormatProvider provider = CultureInfo.InvariantCulture;
DateTime myTime = DateTime.ParseExact(AllNews[i].original_time, "DyyMMddTHHmm", provider);
string results = myTime.ToString("HH:mm דווח במקור בתאריך : dd.MM.yy : שעה");
myl.Add(results);
myl.Add(AllNews[i].link);
myl.Add(Environment.NewLine);
myListWithoutLinks.Add(AllNews[i].text);
myListWithoutLinks.Add(results);
myListWithoutLinks.Add(Environment.NewLine);
for (int i = 0; i < myl.Count; i++)
myl[i] = Regex.Replace(myl[i], @"\t|\n|\r", "");
And use it:
ListToStringList(myList); -
How do I transfer images from the assets pane over to the library pane?
Hi!
Wouldn’t that make sense to be able to quick drag n’ drop items from the assets-pane over into the library-pane?
…Making the workflow smoother.
This would help a lot in order to structure the folder’s hierarchy/content – e.g. in Hero_images; Logos; Whatever.
Otherwise, it’s quit fastidious:
Assuming I’ve already done some work in a project. Let’s say I have 70 images in my assets pane.
- I select each image, go to usage in the layout
- I context-menu-click in order to place the image into the library/Hero_images-folder
- Times seventy, oughf! :*
Drag n’ dropping from one pane to the other would be much comfortable, no?
Or did I missed something?
Any hints would be much appreciated!
CheersInsert the SD card into the iMac. Drag the photos from the iMac to the SD card.
If you want you can create a new folder on the SD card by selecting the SD card/Finder Menubar/File/New Folder -
I need to make a copy of an entire email, including the header w/the sender's info and time, etc. to insert into a letter, etc. How can I do this w/out cutting and pasting the header separately from the text. I know there is a way besides a screen shot but I've spend hours trying to find it.
Smurfslayer wrote:
For the particularly persnickety types you might want to expose the full headers in the email message as well. It's easy enough to do, from mail's 'menu' select "view"; then "message"; then all headers.
Another option you could use is a screen capture using Grab.
Activate Grab, then shift + command + w (for a window screen shot). Then confirm the window selection and click the mail message.
Dave
Why are you addressing this to me...?
I am not the OP... -
Show Select query result in the text file.
Hi all,
i want to show my select statment records in the text file.
thanks in advance.
Mob.you cannot do a select in a stored procedure.
you could do something like
SQL> set serverout on
SQL> spool output.txt
SQL> declare
x varchar2(40);
begin
select * into x from dual;
dbms_output.put_line(x);
end;
X
SQL> spool offor use the utl_file package (more powerfull, less secure, write on the db-server instead of the sqlplus-client) -
Take date from the text variable.
Hi Experts,
I am a BW consultant and I have one requirement please help .
i have one transparent table where i have a text field where i have a date stored in it.
I want this date in the date varaible.
If i am directly reading this tabel and putting it inyo the date varaible IT gives me error
as : Target field and source field are mismatched.
Please help me put this date in the date variable from the text varaible.
Regards,
RGHi
declare your variable the same type as the transparent table where you have the text field which stores date.
Eg:
if ztab is the table, and date is the field in the table, in your program, declare the variable as
DATA: l_date like ztab-date.
In the logic, move the data like
l_date = ztab-date
regards,
Arun -
I need my java program to read HTML tags from the browser...
so, i've made this java GUI, which can run from my internet explorer toolbar...
as of now, this program doesn't do anything, it just produces an interface with blank fields
i want these fields to automatically add information about the current web page on the browser... basically, is there any way that my java program can automatically read the HTML source of the web page opened? i just need it to be able to capture the page's URL and title.
i programmed it using NetBeans, and it runs from the .jre file outside of NetBeans. I got an icon for it to appear on my IE toolbar by editing my computer's registry. When I click on this icon, my GUI runs, but doesn't do anything. Can I get it to read (i.e. automatically output on one of the textfields on my GUI) the URL and title of the webpage that i'm currently on? I want this to work like Bookmarks/Favourites does, so that means i don't want to download every single webpage before reading from it.
any help will be greatly appreciated.I think that if you wanted to do this, it would involve something like the following:
Have your toolbar GUI listen on a local port
Set IE to proxy to localhost at that port
Tunnel/proxy all requests. This will allow you to intercept the page source and the original request. Between the request URL, the request payload, the HTTP headers of request and response and the response payload, that's everything the browser would 'see'. The downside of the above is that you cannot intercept SSL (HTTPS) requests. You might be able to use the Windows/IE API (native) to fetch page source, but this would definitely be an application and O/S specific solution.
- Saish -
How do I set BI Publisher to read html tags from the database?
How do I set BI Publisher (Release 10.1.3.4) to read html tags from the database? For example if the text is quoted with a bold tag I want my output to display the text in bold. Is there a setting or something I can set?
I took a look at Tim Dexter's blog as suggested and the sample worked, but for the elements in the xml file not for the value coming from the database, however this is good to know as well!
I have data in the data base column which looks like this:
'MS Applied <B(bold tag)> Mathematics</B(bold tag)>University of Southern California'
I want the data to be rendered like this:
'MS Applied <B>Mathematics</B> University of Southern California'.
In Report Builder on the property sheet I would set Contains HTML Tags property to Yes and the report would render correctly.
In BI Publisher 10.1.3.4 I can not seem set it to read this I have change the configure properties of the report to Character set to HTML and Make HTML output accessible to True. I just can't figure out what I'm missing.
Thank you for any assistance you can offer. -
Remove HTML tags from a text area
Hi, here is my problem:
I have a form with a text area item; this item is “Display as Editor HTML standard”. So it is possible to enter formatted text with tags HTML. Then I save the text in a table. In the column the text maintain the HTML tags. Afterwards I can put the text in a report, and I can see the formatted text with the tags HTML interpreted.
But I need also to use that text for other aims, (i.e. sending it in a mail) with the html tags removed.
Is there any way to remove HTML tags from a text item?
Regards
DarioFrom http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:769425837805
FUNCTION str_html (line IN VARCHAR2)
RETURN VARCHAR2
IS
x VARCHAR2 (32767) := NULL;
in_html BOOLEAN := FALSE;
s VARCHAR2 (1);
BEGIN
IF line IS NULL
THEN
RETURN line;
END IF;
FOR i IN 1 .. LENGTH (line)
LOOP
s := SUBSTR (line, i, 1);
IF in_html
THEN
IF s = '>'
THEN
in_html := FALSE;
END IF;
ELSE
IF s = '<'
THEN
in_html := TRUE;
END IF;
END IF;
IF NOT in_html AND s != '>'
THEN
x := x || s;
END IF;
END LOOP;
RETURN x;
END str_html;There's also a reqular expression approach that I've not tried. Remove HTML Tags and parse the text out of it -
How to extract HTML page from the internet
i am new to java, i wish to know how to extract Html page from the internet and also how to identify the differences between the images and text information?
You can create a java.net.URL that points to the file you want to "extract" and read the HTML code (or what ever that file contains) from there using the inputstream given by URL.openStream().
The difference between images and text... well, images are embedded in html using the img-tag. example: <IMG src="http://forum.java.sun.com/images/reply.gif" alt="Reply">. Attributes width, height, alt are sometimes left out and there may or may not be quotes around the values and everything is case insensitive... you'll be having hard time trying to parse the input so I'd suggest using existing parsers.
What are you trying to do anyway? You can load a URL directly to a JTextEditorPane with the setPage(URL page) method...
Maybe you are looking for
-
Hi All, I am new to B2B. I am getting following error in B2B Console please suggest what could be the reason and possible steps to resolve: Machine Info: (fcgemapptest05) Description: General Error StackTrace: Error -: AIP-50014: General Error at
-
what is
-
BI Content does it affect Upgrade to 3.5
Does BI Content affect Upgrade to 3.5
-
Personalising E-mail with accompanying form
Can anyone help? When we send out an adobe form for people to fill in and return the e-mail that goes out has Adobe logo all over it. Is there any way we can personalise email with our own company name/logo? Many thanks.
-
Is there a minimum width to Adobe AIR Help output?
Good day! I am trying to produce an Adobe AIR Help document which is 256x768 pixels in size; this document is to be displayed on the left of the screen and use only a quarter of the Desktop real estate. When I produce an Adobe AIR Help file using the