Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-10-13 06:44:35

c3r34l_k1ll4
New member
Registered: 2005-10-13
Posts: 3

problem with img code.... Help needed!

Hi, sorry for my english,
I've a problem with img code.

If I insert in html mode this code <img src="/url/image.gif" /> and I switch to text mode, automatically the editor put the name of my server...
It transforms the code in <img src="http://serverurl/url/image.gif" />.... I think it's normal, but I've a problem because I use this editor in a textarea in Vignette. The server for editing and the one for publishing are different so, if the code changes the image in the publishing server don't shows...

How can I force the url to remain as the begin?

Sorry for my english too! Thanks in advance. Any help will be really appreciated!
CK

Offline

#2 2005-10-15 22:34:50

bjorn
New member
Registered: 2005-07-26
Posts: 6

Re: problem with img code.... Help needed!

Yes, same here.

it would be nice to be able to post relative paths like: "/images/myImage.jpg"

instead of: "http://myserver.com/images/myImage.jpg"

is this somehow possible to config, I use the ImageManager Plugin.

Offline

#3 2005-10-15 22:49:49

bjorn
New member
Registered: 2005-07-26
Posts: 6

Re: problem with img code.... Help needed!

Okay, so I searhed some more... here the solution:

In your config of the editor add the baseHref, like this:

        xinha_config = xinha_config ? xinha_config : new HTMLArea.Config();
        xinha_config.baseHref = 'http://yourwebsite.com/';

Offline

#4 2005-10-17 02:21:37

c3r34l_k1ll4
New member
Registered: 2005-10-13
Posts: 3

Re: problem with img code.... Help needed!

Thanks a lot for your reply.
The second solution is great for me.

Best regards,
CK

Offline

#5 2005-10-17 07:34:41

c3r34l_k1ll4
New member
Registered: 2005-10-13
Posts: 3

Re: problem with img code.... Help needed!

Hi, I've tried the second opportunity but without results...

I've inserted thi code in my webeditor.js

xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config();
xinha_config.baseHref = 'http://www.mio.com/';

But if I switch to html mode and insert this code <img src="/url/myimage.jpg" /> the webeditor automatically transform this code in
<img src="http:/myhost/url/myimage.jpg" /> instead of <img src="http://www.mio.com/url/myimage.jpg" />... Why?
What's wrong?

Thanks in advance, any help will be really appreciated!
CK

Offline

Board footer

Powered by FluxBB