htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Add-Ons:
Relative links in htmlArea?


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


sketch
New User

Oct 4, 2004, 7:07 PM

Post #1 of 6 (6543 views)
Shortcut
Relative links in htmlArea? Can't Post

Hi,

Im using 3.0b. I want to make a relative link, eg <a href='index.php?page=1'>Page 1</a>, but htmlArea insists on making this link absolute --> page 1.



edit: it makes the link absolute when you re-edit a page - so its in the parser im assuming...


Since all the pages are created from within an 'admin' folder, but are to be displayed in a different folder, this is creating some issues.

Is there anyway to disable/override this autocompletion of URL's?


(This post was edited by sketch on Oct 4, 2004, 7:23 PM)


phoopee3
New User

Nov 30, 2004, 9:55 AM

Post #2 of 6 (6301 views)
Shortcut
Re: [sketch] Relative links in htmlArea? [In reply to] Can't Post

Has anyone found a solution to this issue yet? I have the same problem, and I am having trouble finding where the code is. I'll keep digging though.


muffinman
New User

Jan 11, 2005, 1:12 AM

Post #3 of 6 (5915 views)
Shortcut
Re: [phoopee3] Relative links in htmlArea? [In reply to] Can't Post

Same problem here. At first it creates the relative link ok, but when you save and re-edit or go to html-mode and back to wysiwyg and again back to html-mode, it adds the absolute path from the current page. It's quite annoying. Ideas, anyone...?


jighead
New User

Jan 18, 2005, 5:41 AM

Post #4 of 6 (5813 views)
Shortcut
Re: [sketch] Relative links in htmlArea? [In reply to] Can't Post

html attribute that can be used in hrefs:

autocomplete="off"

Hope this helps


jayham
New User

Jan 21, 2005, 11:01 AM

Post #5 of 6 (5746 views)
Shortcut
Re: [jighead] Relative links in htmlArea? [In reply to] Can't Post

where do you find autocomplete


2om
New User

Jan 24, 2005, 7:21 AM

Post #6 of 6 (5680 views)
Shortcut
Re: [jayham] Relative links in htmlArea? [In reply to] Can't Post

for relative URL you must change the output for img and

href ... in

HTMLArea.getHTML = function(root, outputRoot, editor) {


change to this

***
if (HTMLArea.is_ie && (name == "href" || name == "src")) {
value = editor.stripBaseURL(value);
}
if (!HTMLArea.is_ie && (name == "href" || name == "src")) {
value = editor.stripBaseURL(value);
}

***

and off any position wehre stand
HTMLArea.is_ie ? editor.stripBaseURL(link.href) :****

change to like this for exsample ... than you will have relative URL

HTMLArea.is_ie ? editor.stripBaseURL(link.href) : editor.stripBaseURL(link.getAttribute("href"))

 
 
 


Search for (options)