Programmatically add the hyperlink to TextFlow
Hello
Currently, I add hyperlinks to a TextFlow as follows:
public function setHyperLink( linkInput:String ):void { if (editor.selectionActivePosition != editor.selectionAnchorPosition) { var content:String = TextConverter.export(editor.textFlow , TextConverter.TEXT_LAYOUT_FORMAT, ConversionType.STRING_TYPE).toString(); var selection:String = editor.text.substring( editor.selectionAnchorPosition,editor.selectionActivePosition ); var text:String = TextConverter.export( editor.textFlow, TextConverter.TEXT_LAYOUT_FORMAT, ConversionType.STRING_TYPE ).toString(); var arr:Array = text.split( selection ); var output:String = arr[0]+"</span>" + "<a href='"+linkInput+"' target='_blank'>" + "<span>"+selection+"</span>"+ "</a>" + "<span>"+arr[1]; editor.textFlow = TextConverter.importToFlow( output, TextConverter.TEXT_LAYOUT_FORMAT ); } }
It works fine until the selection: the string is '2008', which leads to a divided since the markup String contans 2008 incorect:
"< TextFlow whiteSpaceCollapse ="preserve"version ="2.0.0"xmlns =" http://ns.Adobe.com/TextLayout/2008 ">"
Anyone see an another way to get the textflow before and after a certain position?
Probably with "editor.textFlow.shallowCopy"? But I have FlowElements.
But how to join these FlowElements and my hyperlink together as textflow?
beforeLinkFlowElement + link + afterLinkFlowElement?
...
How to add links in this demo:
http://labs.Adobe.com/technologies/TextLayout/demos/
?
[EDIT:]
OK found:
http://tourdeflex.Adobe.com/Flex4.0/tlf/srcview/index.html
I'll study this now
[EDIT:]
OK I found that works, but how to set the default bind / the appearance of color? There is no default value after the application of this function?
private void changeLink(urlText:String,_targetText:String,_extendToOverlappingLinks:Boolean):void
{
if (activeFlow & & activeFlow.interactionManager is IEditManager)
{
IEditManager (activeFlow.interactionManager).
IEditManager (activeFlow.interactionManager) .applyLink (urlText, targetText, extendToOverlappingLinks);
activeFlow.interactionManager.setFocus ();
}
}
These Interfaces make it quite difficult to understand
If you find that the appellant in the tlf is null object, pls create it yourself.
tf.linkNormalFormat = new TextLayoutFormat();
tf.linkNormalFormat.color = 0xFF0000;
There are some attribute objects in TLF you need to deal with as the case may be, for example textflow.interactionManager.
Tags: Adobe Open Source
Similar Questions
-
I'm trying to add a hyperlink to a local document (Excel file) in the body of an email. I use 'SMTP Email send message' and tried wiring of several different string formats the body trying to attach a hyperlink and have had no luck.
Any ideas? I have the report generation tool, but do not have the Internet Toolkit.
Thank you very much
Mark
By inserting file:/// before the file name, a local link linkable was created. When read by mail Outlook/program that appears as a link.
i.e."file:///C:\Documents and Settings\user\excelsheet.xls" would connect to the Excel worksheet. This method works for local files.
Mark
-
How we can add the hyperlink in the screen.
Hello
I want to add a hyperlink in the window that opens another screen. How we achieve this.
Take a look at this thread.
http://supportforums.BlackBerry.com/T5/Java-development/make-an-email-label-clickable/m-p/19496#m65
Concerning
Bika
-
Add the hyperlink to the real banner
Hy. I just finished my banner but I need to add a hyperlink to a specific address. How this can be done? I'm quite new with Flash so please be detailed with the news.
Thank you!
For the hyperlink to a web page, you can use navigateToURL() in conjunction with a button and event-handling code. Create the button/movieclip/sprite, place it on the stage where you want the interaction to occur and then give it a name of instance via the properties panel. Let's say you name "btn".
Then place the following code in a new layer of the timeline in the same numbered box where is the button.
btn.addEventListener (MouseEvent.CLICK, clickedLink);
function clickedLink(evt:MouseEvent):void {}
var url: String = "http://, etc.; / assign the address hyperlink in quotes
navigateToURL (new URLRequest (url), "_blank");
}
If you wish to have the new open web page in the same browser window, replace "_blank" by "_self".
-
5.5 - How to add the hyperlink to URL on the page of the quiz?
Hi, I have a PPT background imported by hyperlinks to URLS. As-is, the work of hyperlinks to fine in Captivate. My problem is that I want it to be a background in a slide of questionnaire. (The quiz slide is a corresponding slide. I wish that the answers on the slide to hyperlink to the URL with more information on the topics. If the user does not know the answer by the view, he or she can open the hyperlink, do a little reading and research, and then choose an answer on the questionnaire slide.) These are the solutions I've tried:
- Copied and pasted slide as a background in a slide of questionnaire - hyperlinks do not work. (I assume that it uses the background image only).
- Deletion of hyperlinks in PPT slide - imported into Captivate - attempted to create the quiz slide hyperlinks using text boxes or click on the boxes - cannot add those. (I guess that Captivate does not allow any other interactive buttons on his quiz slides.?)
- Abandoned on the groundswell - tried default hyperlink Question and Answer buttons slide quiz - can't do. (I guess that Captivate does not have to perform several actions, objects of default quiz.?)
I would appreciate any advice you might have. Is my only option to create an additional slide with hyperlinks and then provide a separate questionnaire slide? ("Click on the links below to learn more about these topics. Then move to the next slide to complete the corresponding fiscal year. ") I guess that will work, but it seems awkward.
Thank you very much.
In 6 Captivate, you can add a form button to a question slide, and it has "Open URL" in its list of possible actions. More information on the buttons of form in this blog post:
http://lilybiri.posterous.com/want-a-button-on-question-slide-in-Captivate
I recently presented a webinar for Adobe on these form buttons. In this blog, you will find the link to the recorded webinar:
You cannot add interactive objects to a question slide in Captivate 5.5.
Lilybiri
-
How to add the hyperlink in the page of the ofa
Hi all
I have a requirement where I have a table in the form OPS with 5 columns, only a single column called pageid page; page id values must be hyperlink.
so when the user clicks on the hyperlink, it must open a page with empty fields, so that the user can enter data and click Save button.
Please someone tell me how to get this.or to give me links to simlilar it can help me :-)
Thank you.Hello
* / oracle/apps/fnd/frame/box in tools/labsolutions/webui/EmpDetailsPG * is the page where you want to navigate after clicking on the link, empNum and empName are the variable that will be passed to the next page and you can get the value of these variables in method PR only @EmployeeName and @EmployeeId are the way to assign the value of an attribute VO of the page where the link is created the value will be assigned to empNum, empName.
Thank you
Pratap -
How to add the hyperlink on front panel
Hello
I want to add hyperlinks on my front. After clicking on who can access run another VI of disc or simply give me the functionality of a booleon control.
I don't want to use the button for this.
I want these hyperlinks for my standalone application main menu items.
Have you tried a search? This has been asked before, and the proposed solutions were provided. See, for example
http://forums.NI.com/T5/LabVIEW/do-you-know-how-to-create-front-panel-like-Web/m-p/1289778
I think there may have been an idea posted in the Exchange of LabVIEW ideas as well. If this is not the case, do not hesitate to submit a suggestion so it can be voted on.
-
Hello
Is it possible to add hyperlinks in javascript, so that they can be assigned later in the document? Let me explain my thoughts:
This screenshot shows a list of the various documents (001 to 005) and the URL for the first document. I have a hyperlink to each of them automatically. Because the file is saved as 54K0504001.indd, I think it's possible.
What should I need:
1. a pop up with a question: "how many hyperlinks to do."
2. According to the reply, creation of new hyperlinks in the Panel with the full URL (if the answer is 2, I should get 2 links hyperlink, http://www.dekamer.be/FLWB/PDF/54/0504/54K0504001.pdf , and http://www.dekamer.be/FLWB/PDF/54/0504/54K0504002.pdf
OK, clear. It sounds simple enough:
main(); function main() { var num = prompt ('How many hyperlinks?', '1', 'Create hyperlinks'); if (num === null) { exit(); } function pad (n) { return ('00'+n).slice(-3); } var base = 'http://www.dekamer.be/FLWB/PDF/54/0504/54K0504'; for (var i = 1; i <= num; i++) { var hl = base+pad(i)+'.pdf'; app.documents[0].hyperlinkURLDestinations.add(hl, {name: hl}); } }
You could probably automate completely, but it is more work.
Peter
-
Add the hyperlink recompose document
Hello
I get documents of a company who uses hyphenation specific plugin which is their own.
I a script that adds hyperlinks by using:-linkDestination = myDocument.hyperlinkURLDestinations.add-linkSource = myDocument.hyperlinkTextSources.add-then myDocument.hyperlinks.add (linkSource, linkDestination, {name: Nom_lien_hypertexte});It causes the reconstruction of the text with different hyphenation I have not (and should not) have the specific unhappy plugin.
Is there a way to create hyperlinks without the current document recomposed (in fact no text or the style has changed, there is no need to recompose)?Kind regards
Lionel
PS: I use indesign CS5.5
Yes, to my dismay, I saw this happen on complete documents in the case: adding a simple XML or a hyperlink tag - that should have been totally transparent for text - suddenly made the text re - dial.
A possible solution for Lionel is to create rectangles on top of the text and assign hyperlinks to them instead. These rectangles could be created on a layer that is clean, so that they are eliminated easily if the text is changed.
A small disadvantage is that you can measure, down, left and right of the text - but not by the top! However, you can kind of fake it: make the rectangle a leader high amount and move it down by about a 1/3 of its height (eye or result).
-
How to add the hyperlink to the full report
Hello
I have a report and the last line display total report (using default apex - check check sum).
My last line like below
------------------------------------------------------
Total report | 10. 20. 30. 0 | 100.
------------------------------------------------------
My requirement to add hyper link to the numbers 10, 20, 30, 0, 100 total for the report.
Any help will be much appreciated.
Thanks in advanceShijesh,
There is really no way to do this. I only really see a way - jQuery. You will need to start by entering in the report and by replacing the "display this text when you print the report amounts" with something like:
<span id="repTotals">Total:</span>
This will give something to recover for jQuery. From there, you will have to go up to the line, then in specific columns of the line by replacing the content that the page loads with your hyperlinks.
Kind regards
Danhttp://danielmcghan.us
http://sourceforge.NET/projects/tapigen -
Add the hyperlink in a page to direct to a .pdf report in oracle jdeveloper, ADF
Hello
I want to put a hyperlink, which will lead the user to the report. but I have the problem with, "where should I put the pdf file" any help please?
Here is my code:
< a target = "_blank" href =' / faces/DocumentationKNM.pdf '> Guide Book < /a >
What should be the href?
Well, it depends of course when the pdf report can be found on your server, and if it is accessible from the web application. For this, it must be somewhere in the web root of your application. To access the report somewhere else on the server, you can implement a servlet and circulate the report from there.
Summary: we need describe your use cases in more detail.
Timo
-
Add the hyperlink to open a falsh movie
Hello
In Captivate 4: I am looking for a way to add a link to one of the slides that will open a URL.
Is it possible to do?
Thank you
Merav.
Hi Lilybiri
The scenario seems to me that the object button is pause the slide before click, no areas? So if the blade is paused and the click boxes don't release the break when they click, by disabling the option "Continue", would not keep the playhead paused?
Note that I didn't set up a corresponding scenario to fully test, but it seems to me that this is how it would work.
See you soon... Rick
Useful and practical links
Captivate wish form/Bug report form
-
Effect of substitution does not work once I have add the link
I have a photoshop button that has 2 States: Normal and rollover. Rolling works before you add a hyperlink to it, but when I add the hyperlink and listen to extracts from the website, the bearing stops running. Can you explain where I'm wrong? The transition works fine until I have add the link.
Thanks for your help!
The only way that it would not work is if you are linking to the same page as you. Other than that, the only other explanation is that your Muse program has a bug.
-
How to add programmatically to the appointment in the calendar
Hello
I want to add programmatically to the appointment in the calendar of my application. How can I do this? I use OS 5.0
Thanks in advance.
Hello
Also check
http://docs.BlackBerry.com/en/developers/deliverables/11935/Update_calendar_entry_info_565482_11.jspThank you & best regards
pp -
The system shuts down when I try to add a hyperlink. The hyperlink insertion page opens. But when I try to click on the link that reads "Microsoft Frontpage has stopped working. A problem caused the blocking of the program works correctly. Windows will close the program and notify you if a solution is available. »
Edited to add: if I type in the hyperlink, it seems to work. But in the past, I just clicked it. But now when I click on it is when she stops. Strange. Did not this on the Vista computer.
Hello CaptainKAG,
Thanks for posting on the Microsoft answers Forum.
I recommend you post in the Forum Office where this problem is related to FrontPage 2002. We can install on Windows 7, but is not fully compatible, so some features may not work properly. Office 2003 and Office 2007 are fully compatible with Windows 7.
Click here to post in the Forum Office.
Sincerely, Marilyn
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think
Maybe you are looking for
-
Order status of OSX Lion reported missing since January 30 - 2016
Hello After trying (I guess that all the) online Apple support web site - it's almost my last effort to find my W454927286 order. I just want to follow my order! So my question is simply: How to get to the Apple support Europe (E-mail contact only) w
-
PX6 - 300 d - double Raid 1 is not possible?
Hi guys, I hope I'm missing something, so I'm tender hand to support community. I've had a px6 for awhile now. I love. Works very well with VMWare hypervisors. I've been running a RAID 1 and a RAID 5 for over a year without any problems. Now, my need
-
I cannot get my Windows 7 files to all open in a window
Folder options are set correctly.
-
Not able to connect to the wireless router
Hi all I have a working wireless network managed by the router Dlink DIR - 655 that I can not connect my laptop HP Pavilion dv7-3165el with operating system Windows 7 SP1 64-bit, the network card Atheros AR9285 WiFi adapter 802.11.b/g/n of the "Devic
-
Illustrator CC (2015) update failed, error 49
Illustrator CC (2015) Update Failed, error 49... New attempt has failed. suggestions as to what I should in addition to sit and wait for someone to Adobe for getting back to me?