Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 530297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:10:54+00:00 2026-05-13T09:10:54+00:00

I have some user generated content I’m trying to render on my site. The

  • 0

I have some user generated content I’m trying to render on my site. The rich text box editor I’m using renders font changes using <font /> tags, which are overridden by CSS on the page.

Does anyone know if there is a way to allow rules defined using the <font /> tag to show through?

UPDATE
Since changing the control I’m using for my rich text editor is not an option and my users have no knowledge of HTML to understand the difference between a <font> tag and any other type of tag, I had no choice but to create a hack to fix my problem. Below is the code I used to solve it. It’s a jQuery script that changes all <font /> tag attributes into inline CSS.

(function() {
    $('font[size]').each(function() {
        var fontSize = this.size;
        if (fontSize == 1) {
            $(this).css("font-size", 8);
        } else if (fontSize == 2) {
            $(this).css("font-size", 9);
        } else if (fontSize == 3) {
            $(this).css("font-size", 11);
        } else if (fontSize == 4) {
            $(this).css("font-size", 15);
        } else if (fontSize == 5) {
            $(this).css("font-size", 20);
        } else if (fontSize == 6) {
            $(this).css("font-size", 25);
        }
    });
    $('font[face]').each(function() {
        $(this).css('font-family', this.face);
    });
    $('font[color]').each(function() {
        $(this).css('color', this.color);
    });
})();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:10:54+00:00Added an answer on May 13, 2026 at 9:10 am

    A year late, but thought I’d share nonetheless.

    I was frustrated by this, as well. I was using a freeware RTE JavaScript component that produced <FONT /> tags. It wasn’t convenient to replace it, as it was for a client and it was a callback to fix this CSS override problem.

    Unfortunately, none of the other solutions worked in my case, so after thinking I came up with this JavaScript solution:

    var fontEl=document.getElementsByTagName("font");
    for(var i=0;i<fontEl.length;i++) {
        var f = fontEl[i];
        if(f.size)
            f.style.fontSize=(Math.round(parseInt(f.size)*12*0.6)).toString()+'px';
        if(f.face)
            f.style.fontFamily=f.face;
        if(f.color)
            f.style.color=f.color;
    }
    

    The formula for converting font size is incorrect, but accurate enough to produce believable results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have some user generated content areas of my site. I want them
All, I'm writing a web app that will receive user generated text content. Some
I have some user specific JavaScript generated content I want to post to the
I am working on a site that depends on user generated content, and it
My site has user generated content. I noticed that if the user has quotes
I have a jsp page that is trying to reference some user defined classes.
I have some content that is generated by the Drupal CMS that contains strings
I have a lot of user generated content that has inline images in it,
I have the following requirement: Based on some user input, I need to generate
I have some user-submitted variables that I want to display in a different part

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.