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:
html area experts ---- please help -- css styles


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.

 


esthera
User

Jul 30, 2004, 12:58 AM

Post #1 of 1 (3141 views)
Shortcut
html area experts ---- please help -- css styles Can't Post

I have edited html area code to allow stylesheets. (This is based on html area 2-- and actually Luis version.)

Please help me debug the following code --- I really need to get stylesheets working properly. (If you know a better way that really works -- I would also be interested in using it). I am desperate to get this working and will even pay if someone can help me out.


What the below code does is wraps <font class=xxx> before the text.
The problem is the code below is not closing the font tag after the text so I end up having html like the following

<FONT class="articledate"> xxxxx
<BR><FONT class="ecstyle"> xxxx
<BR><FONT
class="pagetitle"> dfdfdfdfd</FONT></FONT></FONT>

I need it to close the font before it opens the new font.
Any ideas? Please help.


Here is the relavant code:


else if (cmdID == 'FontStyle' && val) {
if(val!="remove"){
var rng = editdoc.selection.createRange();
if (rng.text.length > 0)
{editor_insertHTML(objname, '<FONT class="' + val + '">' + rng.text + '</FONT>');}
else
{editor_insertHTML(objname, '<FONT class="' + val + '"> </FONT>');}

button_obj.selectedIndex =0;
}
else{
var rng = editdoc.selection.createRange();
fontArray = getFont(rng.parentElement());
fontArray.outerHTML = fontArray.innerHTML;
}
}



You can see the page at http://www.familyaccountant.com/news/sample.html

I need it to work properly. Just like when you select a font the font changes when your start typing -- the same should happen with styles.

 
 
 


Search for (options)