htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
Need to create a function or button to insert a new line.


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.

 


adm5005
Novice

May 9, 2003, 3:00 AM

Post #1 of 5 (1677 views)
Shortcut
Need to create a function or button to insert a new line. Can't Post

I have a strange request.

I have compiled HTMLarea into an htmlcompiler createing an exe file. Now they way I compiled it, it still uses the IE engine to run, but my problem is the enter key does not produce a new line.

In fact when you press the enter key nothing happens. Any ideas on how I can create a work around on this?

Does anyone have an existing function that will insert a new line from a button or on a enter key press?

I know this is strange but I need to figure this one out.

Please help.

ADM


Luis
Veteran

May 9, 2003, 11:57 AM

Post #2 of 5 (1650 views)
Shortcut
Re: [adm5005] Need to create a function or button to insert a new line. [In reply to] Can't Post

Try this code out:

below the lines:

if (ord == 16) { return; } // ignore shift key by itself
if (ord == 17) { return; } // ignore ctrl key by itself
if (ord == 18) { return; } // ignore alt key by itself

insert this code

if (ord == 13 && editEvent.type == 'keypress') {
editEvent.returnValue = false;
editor_insertHTML(objname, "<p>"); return;
}



Don't give up!!
http://webstationone.com/test/htmlarea


adm5005
Novice

May 9, 2003, 1:01 PM

Post #3 of 5 (1646 views)
Shortcut
Re: [Luis] Need to create a function or button to insert a new line. [In reply to] Can't Post

Thanks I tried and yes it works in a browser, but when compiled it doesn't work. It also works in HTML mode, but not when WYSIWYG mode.

Something else I found interesting and maybe connected. If you preview in an editor like Frontpage for example, it does the same thing. You can bold, underline and all other button functions except the Enter Key does not create a new line break.

If you are in HTML mode, the line break works. I can insert <br> and I can insert <p> when I return to WYSIWYG mode, the change have taken effect.

But the problem lies in not being able to simply click the Enter key and getting the new line or paragraph.

maybe a button would work better to force a new paragraph.

Anyone have any ideas how to do this?


prenaud
User

May 10, 2003, 12:06 AM

Post #4 of 5 (1628 views)
Shortcut
Re: [adm5005] Need to create a function or button to insert a new line. [In reply to] Can't Post

Do you mean to have a button like this?

It is already on several editors:

http://fslactivities.sd61.bc.ca/ezHTMLarea/

Pierre

ezHTMLarea - http://fslactivities.sd61.bc.ca/ezHTMLarea/



adm5005
Novice

May 10, 2003, 12:18 AM

Post #5 of 5 (1624 views)
Shortcut
Re: [prenaud] Need to create a function or button to insert a new line. [In reply to] Can't Post

Yes, I found this earlier. Thank you it worked perfectly.

ADM

 
 
 


Search for (options)