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 - Add-Ons:
WEBstationONE -- Paragraph formatting


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.

 


junglefish
Novice

Mar 5, 2004, 7:12 AM

Post #1 of 11 (4469 views)
Shortcut
WEBstationONE -- Paragraph formatting Can't Post

Oh, something else...

How come the WEBstationONE editor outputs its paragraphs with just a single opening <P> tag rather than wrapping paras in opening and closing tags <P>...para...</P>? (The original InteractiveTools editor uses closing tags.)

Can this be altered anywhere?

Cheers

Mick


Luis
Veteran

Mar 5, 2004, 12:53 PM

Post #2 of 11 (4459 views)
Shortcut
Re: [junglefish] WEBstationONE -- Paragraph formatting [In reply to] Can't Post

Hi junglefish:
I don't understand your question. What do you want?
Do you want to put closing </P> back into my version? or do you want to strip out closing </p> from original IT's version?

If your case is the first one, let me know and I'll tell you what to remove.

For the second case, attach your editor and I'll gladly do the conversion for you.

Greetings.


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


junglefish
Novice

Mar 5, 2004, 1:00 PM

Post #3 of 11 (4457 views)
Shortcut
Re: [Luis] WEBstationONE -- Paragraph formatting [In reply to] Can't Post

Hi Luis

I'd like the </P> put back please. editor.js attached.

Thanks

Mick
Attachments: editor.js (123 KB)


Luis
Veteran

Mar 6, 2004, 11:57 AM

Post #4 of 11 (4433 views)
Shortcut
Re: [junglefish] WEBstationONE -- Paragraph formatting [In reply to] Can't Post

Hi junglefish:

Just comment out line 2075 in editor.js

//unclean = unclean.replace(/<\/P>/gi, '');


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


(This post was edited by Luis on Mar 6, 2004, 11:57 AM)


junglefish
Novice

Mar 8, 2004, 3:40 AM

Post #5 of 11 (4410 views)
Shortcut
Re: [Luis] WEBstationONE -- Paragraph formatting [In reply to] Can't Post

Hi Luis

Thanks for that. However, although we've now got our closing </P> tags back I also get an unwanted <BR>, meaning that the code looks like this:

...end of para.</P><BR><P>New para...

Interestingly, the <BR> does not show up in the 'view source' of the editor window but is being output when the form is posted to the database.

I tried commenting out line 2071, to see if that helped, but it doesn't.

Yours,

Mick


junglefish
Novice

Mar 8, 2004, 3:49 AM

Post #6 of 11 (4408 views)
Shortcut
Re: [Luis] WEBstationONE -- Paragraph formatting [In reply to] Can't Post

Luis

Please disregard my last message about the extra <BR> tags! I made a mistake and didn't take into account some post-processing ColdFusion tags which were the source of that problem.

Your original solution worked fine!

Thanks again, your help is much appreciated.

Mick

PS. If you get a moment, you couldn't take a look at my earlier queries could you? (See http://www.interactivetools.com/iforum/Open_Source_C3/htmlArea_Add-Ons_F19/WEBstationONE_--_Anchors_and_Spellcheck_P24784/)


guiguy
New User

Mar 25, 2004, 11:38 PM

Post #7 of 11 (4295 views)
Shortcut
Re: [junglefish] WEBstationONE -- Paragraph formatting [In reply to] Can't Post

Luis (and any ASP programmers out there)...

Although junglefish found the problem with his </P><br><P>, I did not.

I'm using Dreamweaver MX 6.1 (UGH!), ASP, Access, on WinXP.

In editing the text, I just hit the Enter key, and it appears to store the text in the database just fine. But when I display the results in another ASP page, there is too much space between lines.

A look at the source shows that there is a <br> between the </P> and the <P>.

Looking at the data in the database directly in Access, I notice something very strange to me: the database displays the first line of my entry in the appropriate table. However, the subsequent lines are not displayed. Then, just to check, I placed my cursor after the </P> and hit the delete key. All of a sudden, the beginning of the next paragraph appeared!!! Apparently, there was some kind of line break that does not display in Access. I hit delete again after the last </P> and the third paragraph appeared.

Now, I'm a designer, not a coder, so I don't know how to fix this, however, I believe my observation is correct. It is certainly substantiated by finding the <br> between the </P> and <P> when I view the source of the displayed page.

Is there some code to prevent that from happening? Since it appears to be an access issue, I think it's going to be to write some ASP code to remove any <br> tags inside the displayed field. I don't believe you are an ASP person, so I'm hoping someone else will chime in here.

TIA...

GUIguy.


junglefish
Novice

Mar 26, 2004, 3:09 AM

Post #8 of 11 (4289 views)
Shortcut
Re: [guiguy] WEBstationONE -- Paragraph formatting [In reply to] Can't Post

Hi GuiGuy

My guess, and it is only a guess as I only know enough about Dreamweaver (urgh, spit!) to not use it, is that when you enter your text and hit return in DW, the damn thing is inserting some kind of special character.

Try testing by going into DW's text mode and checking the code before submitting to the database. Make sure your closing para tag and opening para tag are butt-weilded together like so:

...end of para.</P><P>Start of next para...

If that gets rid of your problem you'll then need to look at DW's settings and see if you can get it to not insert whatever it was inserting.

Of course I may be way off, but it's worth a try...

Regards,

Mick


Luis
Veteran

Mar 26, 2004, 8:37 PM

Post #9 of 11 (4267 views)
Shortcut
Re: [guiguy] WEBstationONE -- Paragraph formatting [In reply to] Can't Post

Hi guiguy:

I would bet it has something to do with the ASP that displays the results. I don't know ASP, so I cannot tell you what exactly to do.

Maybe you are using a script that was wrote to parse text from a normal textarea. If this is the case, all brake-returns (\n) might be being converted to <BR>'s. In perl, it looks something like this:

$str =~ s/\n/<BR>/gi;

I'm not sure but I think in ASP it should look something like

str = str.replace(/\n/gi, '<br>'); or maybe a regex.

I hope you can correct this issue soon.


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


guiguy
New User

Mar 26, 2004, 11:54 PM

Post #10 of 11 (4260 views)
Shortcut
Re: [Luis] WEBstationONE -- Paragraph formatting [In reply to] Can't Post

Thanks, Luis...

But, I searched carefully and could not find andy \n anywhere.

When I looked at some other databases not created with htmlArea but still saved to Access, it appears that each time you hit the enter key, Access adds some character that cannot be seen in Access, but that creates a line break. If I go into the database after I have entered a record with a plain textarea field, there are the line breaks, which, if I hit the Delete key at the end of the line, the two lines run together. That looks fine in the display.

However, with htmlarea, since htmlArea adds </P> and then <P>, that creates two line breaks, at least visually.

Since I don't think either of us is going to be changing MS Access in the near future, I guess we just have to create a workaround. Is there some way the editor can be modified to not place the </P> and then <P> when I hit enter, and just let Access do its thing?

BTW, I am using the regular editor, not your version. I think I would be interested in your version, however, after reading all the posts, I'm not sure which is the most stable version. If you want to make the mod (you can call it the "Access version") and post it, perhaps I could pick it up from there.

Many thanks for your great contributions to this forum...

GUIguy.


guiguy
New User

Mar 27, 2004, 12:32 AM

Post #11 of 11 (4258 views)
Shortcut
Re: [Luis] WEBstationONE -- Paragraph formatting [In reply to] Can't Post

Problem solved!!!

I was using a sample database from someone else and found a little include file that was adding the <BR>. I commented out that line and fixed the problem.

The moral: be wary when using sample code and don't drive others crazy until you've researched it carefully. Unsure

Thanks...

GUIguy.

 
 
 


Search for (options)