Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
link entry for rich text editor
Old 12-23-2009, 09:02 AM link entry for rich text editor
Junior Talker

Posts: 4
Name: orhun
Trades: 0
iam trying to use the code at below

Code:
 
function link(word) { 
var name = prompt("Link:", "http://"); 
var aTag =  '[' + tag + '=/'; var btag = '/]';
var createlink = aTag + name + btag;
} 

<a href="#" onclick="link('a');"><img alt="Link" src="createlink.gif" border="0"></a>
for adding link to my rich-text editor.

i can create pop-up box for the "link section"... but.... could some help me to add the writtens on pop-up, to the text-area?(adding "createlink" to text-area)

the writtens for link, must be added to the text area like this:

[link: /www.site.com/][/link]
orhuns is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-30-2009, 09:07 AM Re: link entry for rich text editor
Extreme Talker

Posts: 246
Trades: 0
From your description, I think this is what you are asking for. Now this isn't perfect as it will always append the link to the end of the textarea.

Code:
<html>
<head>

<script>
function link() {
var name = prompt("Link:", "http://");

document.getElementById('txtArea').value = document.getElementById('txtArea').value + name;


}
</script>

</head>
<body>

<a href="#" onclick="link();"><img alt="Link" src="createlink.gif" border="0"></a>

<textarea id="txtArea" rows="10" cols="100"></textarea>

</body>
</html>
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to link entry for rich text editor
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09602 seconds with 12 queries