Manage Images

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
smiley
Regular
Posts: 11
Joined: Mon Jul 11, 2005 8:43 am

Manage Images

Post by smiley »

hi all,
I have a doubt in serendipity...can any one plz clarify???

I added an image in the new entry thru media without using the wysiwyg editor and saved it.

I added an image in the new entry thru Manage images in wysiwyg editor and saved it.

To my astonishment, I found in the serendipity_entries database that the iimage linking (<img style........) in both the entries is different.
using wysiwyg:
<img style="BORDER-RIGHT: 0px; PADDING-RIGHT: 5px; BORDER-TOP: 0px; PADDING-LEFT: 5px; FLOAT: left; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height="83" src="..." />
without using wysiwyg:
<img width='110' height='83' style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="..." alt="" />

But from the source code, I understand that both the ways it should go to same code(serendipity_image selector) and takes the same img.

SO where is this difference coming from???

I want to know the exact place where the <img style......> is written for a wysiwyg editor!!!!

plz help me......Its really storming my mind!!! :cry:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Manage Images

Post by garvinhicking »

The WYSIWYG editor depends on the browser, and thus rewrites EVERY html-code you paste. You cannot get around that, it's a basic functionality that the WYSIWYG editor maintains and converts its own HTML.

If you want full HTML control without interference, you cannot use WYSIWYG.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
smiley
Regular
Posts: 11
Joined: Mon Jul 11, 2005 8:43 am

manage images

Post by smiley »

Hi Garvin,
Its ok if it generates its own html code....But will it generate its own src also??
becos
if I dont use wysiwyg it is taking as : src="uploads/img.serendipitythumb.jpg"
if I use wysiwyg it is taking as:
src="http://localhost/serendipity/uploads/img.serendipitythumb.jpg"

But I dont want it to take the http://localhost/serendipity/ as it is creating a problem in dynamic linking of images on net.

Like if I use localhost and enter an image in my entry, that image can't be displayed when I use my website address on internet and viceversa
So I dont want that localhost to be added into my database even when using wysiwyg editor also.........
how can i do that??
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: manage images

Post by garvinhicking »

Yes, the WYSIWYG rewrites the SRC because of the sames reason. We cannot keep relative links with WYSIWYG editing in place, that's a restriction of htmlarea. You might want to try TinyMCE, but that does not interface with our image manager yet.

So you sadly will need to get used to the rewritten link. I think on Mozilla though th elink is not rewritten!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
smiley
Regular
Posts: 11
Joined: Mon Jul 11, 2005 8:43 am

Post by smiley »

ok garvin
thanks for ur valuable help....
Post Reply