Hi Everyone,
We will be using FCKEditor to allow for basic content management on our site. Some of the pages we have will contain links to public and protected member documents. If an author is editing a page we would like for the following functionality to occur:
1. Select text and click on a custom button that will open a popup window. The popup window will contain a list of documents pulled from our tables.
2. User selects a document - which will return a URL to the file.
3. The returned URL will be applied to the selected text.
4. Once the page is saved, the selected text will now be a clickable link and not be surrounded by <a> tags.
We have created a custom toolbar and button because the existing link button does not meet the needs for this. We are hoping that this can be achieved easily with the custom toolbar. Ideally this should be cross-browser compatible since our understanding is that document.selection is not Firefox supported.
Thank you all in advance for your help
We will be using FCKEditor to allow for basic content management on our site. Some of the pages we have will contain links to public and protected member documents. If an author is editing a page we would like for the following functionality to occur:
1. Select text and click on a custom button that will open a popup window. The popup window will contain a list of documents pulled from our tables.
2. User selects a document - which will return a URL to the file.
3. The returned URL will be applied to the selected text.
4. Once the page is saved, the selected text will now be a clickable link and not be surrounded by <a> tags.
We have created a custom toolbar and button because the existing link button does not meet the needs for this. We are hoping that this can be achieved easily with the custom toolbar. Ideally this should be cross-browser compatible since our understanding is that document.selection is not Firefox supported.
Thank you all in advance for your help
Re: Create a clickable link on selected text
Seems like you want to customize the link dialog, but on the other side you state that you don't want <a> tags
Re: Create a clickable link on selected text
I don't want the <a> tags to appear within the content. For example, I've seen demos where text is selected, a link is applied, but the content in the page (not the source code) appears like this:
"Here is your document: <a href="http://xxxxxxxxx">My PDF</a>"
Instead, I'd rather have it appear as so:
"Here is your document: My PDF"
In this example, the link is actually a clickable link. Examples I have seen in the past, have included the <a href=""></a> tag in the content itself, therefore not making it clickable.
Thanks
Re: Create a clickable link on selected text
Re: Create a clickable link on selected text
Thanks