View Single Post
  #2 (permalink)  
Old Sep 2nd, 2007, 20:57
AdRock's Avatar
AdRock AdRock is offline
SuperMember

SuperMember
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: BBcode text editor

I have worked out how to add an email link which was pretty easy.

I am now stuck on changing of the font size and color.

I changed a bit of code which sorts the problem out but when i type a few lines and try to change the color or size of the text it wipes the form clean

I did change the function from this
Code: Select all
//Function for adding font color and size tags

function font(bbopen, bbclose) {
        var post = document.editform.post;
        post.value += bbopen + bbclose;
        post.focus();
        return;
}
to this
Code: Select all
//Function for adding font color and size tags

function font(bbopen, bbclose) {
        var post = document.editform.post;
        post.value += bbopen + post.value + bbclose;
        post.focus();
        return;
}
but it screws up the text.....any ideas how I can get this to work?

Last edited by AdRock; Sep 2nd, 2007 at 21:00.
Reply With Quote