WYSIWYG HTML editor messes up big time

Found a bug? Tell us!!
Post Reply
hgoor
Regular
Posts: 297
Joined: Thu Jan 06, 2005 11:46 am

WYSIWYG HTML editor messes up big time

Post by hgoor »

Ok, i have the latest version of Serendipity and I have huge problems with the WYSIWYG editor.

The biggest problem is the fact that it ignores new paragraphs so it just condenses any story in to one big blob. When I check out the HTML its like this:

Now, let's look at some details that came through:<p><i></i></p><p /><p><i>"Vista uses the Windows Graphics Foundation, or WGF. WGF 1.0 will use DirectX 9.0c as its primary interface, but Vista will also have the Next-Gen 3D API build in. You can see it as DirectX 10, but it's officially called WGF 2.0.</i></p><p><i></i></p><p /><p><i>

As you can see the tags are all messed up bigtime.

What is causing this??? I both happens on my Windows XP/MSIE system as well as when I use my Mac PowerBook running OSX and using Firefox (1.06)...

Help! it drives me crazy!

edit: link to pages: http://zion.demon.nl/serendipity
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")

Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: WYSIWYG HTML editor messes up big time

Post by garvinhicking »

The WYSIWYG editor HTMLArea can easily be in this state of messing up HTML tags when you copy/paste a lot around, often input breaks, hit enter and then move the cursor up again, then change italics and bold stuff back and forth.

Each of those actions may introduce new wrong HTML tags; this is fundamental to each WYSIWYG editor, as it's relying on browser internal functions which just don't behave well. You can only surcome this by only using copy/paste and moving around in little doses.

The display of your <p> Tags may be affected by your CSS stylesheet, as in some stylesheets the "p" is getting a 0px margin.

In your CSS style.css you can see this for example:

Code: Select all

.serendipity_entry p {
    margin: 0px;
    padding-bottom: 0px;
}
This means that paragraphs have no extra margin to them. You can edit this and change it to:

Code: Select all

.serendipity_entry p {
    margin-top: 0px;
    margin-bottom: 15px;
    padding-bottom: 0px;
}
If you want that extra spacing...

HTH,
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/
hgoor
Regular
Posts: 297
Joined: Thu Jan 06, 2005 11:46 am

Post by hgoor »

Ok, thanks for the info: so I should not copy & paste I guess?

As far as the stylesheet etc; I use a "out of the box" style that I never messed with myself. I guess I need to use another one that does not have this problem?

Thanks for taking the time to answer...
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")

Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Of course one of the reasons to use WYSIWYG editors is to be able to use copy+paste. So still use that, all I try to suggest is to use it carefully and if possible not to move around portions of text within the editor across formattings.

The "default" style just defines the 0px margin because it makes less problems to not span the paragraphs across too much spacing; I think this is included in several stylesheets. So it would be best that you adapt your template with the code I pasted...

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/
Post Reply