View Full Version : No auto <br> in openWYSIWIG

04-20-2006, 08:29 PM

This script is great, and it's working well.

I'm using it in a php page that's updating a database, and those fields are, on another page, put into a layout in chunks of html.

This isn't exactly a bug, but it's certainly bugging me.

There's a default option in the script to add a <br> if there is no text entered.
I used php to reset that to "" (blank), but that only works if NO text was entered.

The <br> is also added after the text in the field *most* of the time, but not always... not sure why that is.

It's also not always right at the end... sometimes it's like "...<br></span>".

I've looked through the JS, but that isn't my thing, and I don't quite get what's making this happen.

I'd love to just take that out... not sure why it's there in the first place.

04-20-2006, 08:41 PM
Another bug: the images are never preloaded. There's a minute delay when mousing over the buttons for the first time. This is barely noticeable to me with my 10MB/s connection, but could be a serious irritation to, say, 33k users.

04-21-2006, 02:47 AM
Yeah, but for my purposes, this is a behind the scenes thing. I noticed that too, and it's a delay on my home connection (fast cable... maybe avg of 600k) and at school with a T1. Not a big deal though, 'cause it's only for managing the site for myself... however, that's a good thing to note.

Any ideas on the <br>?

Twey, 10MB/s? Wow. I want that :D

04-24-2006, 07:56 PM

Any ideas on the <br>?

When I use this, it gives me output as html text, not html code. ie "<" is "&lt;", so it doesn't work to display on the next page.

How can I fix this?

EDIT: Ah. Weird. If you click "text" instead of "html" mode, then it saves as &lt; vs. html where it does save as <.
So... nevermind, I guess.
Any way to set it NOT to "fix" it when set to "text"?

And... still stuck on the <br>

04-25-2006, 07:49 AM
Sorry to triple post, but no one's answered my question, and I have another one.

Again, any ideas on the <br>? I'm really stuck here... and I have no clue.

As for the other issue, here's what I'd like.
It seems that the plain text view sents 'coded' code, so it's displayed, not used as html. So... all I need to do is set it to "html" view BEFORE clicking SUBMIT.

Is there a way that I could setup an action "onClick" for submit that would change it to "html" mode then submit the form?

Info would be great, as would a specific code, but a general code for the submit button doing something before sending (making a function happen... I can track that down myself, maybe), would be nice.


04-25-2006, 09:31 AM
If no-one's answered, it's probably because no-one knows :)

04-25-2006, 07:16 PM
Well... sure.

Here's a MUCH more general question, then:

How can I set the submit button to trigger a JS function BEFORE submitting?

04-25-2006, 07:52 PM
The submit event is called before actually submitting, as evidenced by the fact that you can return false and cancel it.

04-26-2006, 12:08 AM
Sure, but I'm asking how.

I'm really unfamiliar with using JS... trying to get into it, but other stuff is higher on my list... mainly php.

I mean... <input type="submit" onClick="jsfunc()"> That's it?

Just figure out the function name, and put it there, and it's done?