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:
Why don't classes preview properly, while inline styles do?


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.

 


SanSui
Novice

Feb 18, 2004, 2:51 PM

Post #1 of 15 (4924 views)
Shortcut
Why don't classes preview properly, while inline styles do? Can't Post

Linked styles don't seem to work within the textarea preview. I'm using Luis's version of HTMLarea. Why don't classes work in this situation?

Also, how do I stop the script from removing the closing paragraph tags?


Luis
Veteran

Feb 18, 2004, 7:08 PM

Post #2 of 15 (4920 views)
Shortcut
Re: [SanSui] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

Hi San Sui:

Sure they work. Search for this.stylesheet and add the url to your css file.

this.stylesheet = "http://pathtoyourCssFile.css"; // full url to your css file

and add the line in red in if (cmdID.toLowerCase() == 'preview'), just below the title:

if (config.stylesheet) {
doc.writeln('<link rel="stylesheet" href="' + config.stylesheet +'" type="text/css">');
}


To stop the script from removing the closing paragraph tags, in function cleanHtml(unclean), remove the p from this line:
unclean = unclean.replace(/<\/(p|li|dt|dd)>/gi,"");

The rest will remove closing tags for </dd></dt></li>. You can take out any of them if you want.

Greetings.


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


SanSui
Novice

Feb 19, 2004, 9:30 AM

Post #3 of 15 (4907 views)
Shortcut
Re: [Luis] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

Ah, thanks a bunch! Cool

That did the trick. I guess my only real problem now is trying to add a dropdown box to apply styles from the stylesheet.


SanSui
Novice

Feb 19, 2004, 3:25 PM

Post #4 of 15 (4890 views)
Shortcut
Re: [SanSui] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

Oh, and while I've got your attention - is there an upload option within your editor for files/attachments? Or is there another plugin available with this function?

Would like to be able to make links to files through the editor, with upload option


Luis
Veteran

Feb 19, 2004, 6:29 PM

Post #5 of 15 (4888 views)
Shortcut
Re: [SanSui] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

Hi SanSui:

Glad to hear you solved your previous issue.

Regarding styles pulldown, I made a workaround sometime ago. I need to go through my old files and look for it. In the meantime, you can search here in the forum. The guy who requested advise on that mod is mossimo (as a reference for your search). The solution I made then is just the concept and it's not polished, so it could be buggy, but it might be of help for you.

Regarding the link to files insertion and upload, I've not worked on it. I know there is a nice mod made by Eisa. It's in ASP and access (I think). Mossimo has an ASP version too.

Greetings


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


SanSui
Novice

Feb 20, 2004, 9:18 AM

Post #6 of 15 (4873 views)
Shortcut
Re: [Luis] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

Thanks again for your help.

Unfortunately, I've not been able to get Eisa's version to function properly, though it seems nicely featured and has that nice access database feature. I searched for Barry-hunter's insert file script and was unable to find it. I'd prefer PHP vs. ASP, so it sounds like Barry's would be ideal


eisa
User

Feb 20, 2004, 3:24 PM

Post #7 of 15 (4866 views)
Shortcut
Re: [SanSui] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

Not much around here anymore, too much work to do.

Barry-Hunter did (as far as I know) never post his final solution for the combined insert link/link to file. Unfortunately I don't have the original PHP-file anymore because I have a different computer now. But if you know PHP, you should be able to make it work if you read this post:
http://www.interactivetools.com/forum/forum.cgi?post=11538

The solution isn't perfect, there are some situation it won't work properly, but since I'm not an expert on the area so I'm not sure if I will be able to make it any better.

http://www.savio.no/htmlarea/example.asp | Webdesign


pvollma
Novice

Feb 28, 2004, 5:28 PM

Post #8 of 15 (4792 views)
Shortcut
Re: [Luis] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

I could not find the this.stylesheet statement nor the if (cmdID.toLowerCase() == 'preview') statement in my copy of htmlarea.js 3.0 beta. Am I able to use this trick in this version?
Paul C. Vollmar


Luis
Veteran

Feb 28, 2004, 6:06 PM

Post #9 of 15 (4788 views)
Shortcut
Re: [pvollma] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

Hi pvollma:

This mod is for Version 2 only.

greetings


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


pvollma
Novice

Feb 29, 2004, 7:25 AM

Post #10 of 15 (4776 views)
Shortcut
Re: [Luis] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

OK, how do I use my own stylesheet in V3 so that while the user is editing or adding text, it looks as it will when the page is displayed on the site using the site's css?
Paul C. Vollmar


kwillems
User

Aug 2, 2004, 4:44 PM

Post #11 of 15 (4307 views)
Shortcut
Re: [pvollma] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

Luis, could you help me out here; i'm looking at your code, trying to let it make valid xhtml; i'm using some alterations Mossimo posted here a year ago.

But everytime closing tags like </li> and </p> are removed.

So for example

<ul>
<li>this</li>
<li>is</li>
<li>my</li>
<li>test</li>
</ul>

will become

<ul>
<li>this
<li>is
<li>my
<li>test </li>
</ul>


I was looking for this line: unclean = unclean.replace(/<\/(p|li|dt|dd)>/gi,"");
as you mentioned above, but could not find it.

So, my question: what part of your code is removing those tags? I would appreciate your help. I've been looking at the code now for days, but still can't find a solution.


(This post was edited by kwillems on Aug 3, 2004, 6:43 AM)


Luis
Veteran

Aug 4, 2004, 1:39 AM

Post #12 of 15 (4272 views)
Shortcut
Re: [kwillems] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

Hi Koen:

The line you mention is the right one, unless you are using an older version. If you want, attach your editor and I'll take a look.

Greetings


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


kwillems
User

Aug 4, 2004, 8:21 AM

Post #13 of 15 (4258 views)
Shortcut
Re: [Luis] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

That would be great Luis!

The editor i'm using is attached.
Attachments: editor.js (130 KB)


Luis
Veteran

Aug 4, 2004, 11:54 AM

Post #14 of 15 (4246 views)
Shortcut
Re: [kwillems] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

Hi kwillems:

Yes. You are using an older version. I can change it for the last one later tonight or, -if you prefer- I'm working on a configurable option to generate either HTML or XHTML which I think I'll finish on weekend. Let me know what you want.

Greetings


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


kwillems
User

Aug 4, 2004, 12:11 PM

Post #15 of 15 (4243 views)
Shortcut
Re: [Luis] Why don't classes preview properly, while inline styles do? [In reply to] Can't Post

An option to choose between HTML and XHTML would be great!!! I guess many users could make well use of such a function.

As you probably already noticed i've made some changes to the editor i use. I suppose that it it's not too difficult for me to build in your new option, after you've published it.
So to my opinion you better leave my editor apart and put your energy in finishing this new features.

By the way: as far as i can remember i use the latest version which i downloaded from your website. I will take a look again up there.

[edit:] I've just downloaded the version on the site of webstationone again (version from 24 october 2003), but i can't find a line like
unclean = unclean.replace(/<\/(p|li|dt|dd)>/gi,"");
in it. I don't know of any other, newer, versions.


(This post was edited by kwillems on Aug 4, 2004, 12:36 PM)

 
 
 


Search for (options)