HTML Editor to use within ASPX page

Hi there,

I want to use a HTML Editor on my web page i also want to add a character count functionality with this.

I have tried FreeTextBox but not able to add the charachter count with this.

help please

regards,
Ali ShahSQL DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Johny BravoCommented:
Discussed here,
http://forums.freetextbox.com/default.aspx?g=posts&m=8311


<FTB:FreeTextBox
            StripAllScripting="True"
            ClientSideTextChanged="TextCount"
            id="ftbAnyOldText"
            ShowTagPath="false"
            AutoGenerateToolbarsFromString="false"
            PasteMode="Text"
            runat="Server"
            width="550"
            height="200"
            DesignModeCss="style/html-editor.css">
<!-- dynamically display the current character count -->
<input type="text"
           name="remainingChars"
           size="4"
           readonly
           maxlength="4"
           class="charcount"
           value="1000" />
<input type="text"
           name="countText"
           readonly
           class="charcounttext"
           value="characters left" />
<!-- Javascript function -->
<script type="text/javascript" >
    function TextCount(ftb)
    {
        var html = ftb.GetHtml();
        html = html.replace(/(<([^>]+)>)/ig,""); //strip html so that we only count text
        html = html.replace("&nbsp;","");
        var count = 0;
        var output = "";        
        if ((1000 - html.length) > 0)
            {
                document.getElementById('remainingChars').value = 1000 - html.length;
                document.getElementById('remainingChars').style.color = "#000000";  
                document.getElementById('countText').value = "characters left";
                document.getElementById('countText').style.color = "#000000";  
            }
        else
            {    
                count = 1000 - html.length;
                output = count.toString();
                document.getElementById('remainingChars').value = output.replace('-','');
                document.getElementById('remainingChars').style.color = "#BB0000";    
                document.getElementById('countText').value = "characters over";
                document.getElementById('countText').style.color = "#BB0000";    
            }
    window.status = html.length;
    }    
</script>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ali ShahSQL DeveloperAuthor Commented:
Thanks this has worked for me
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.