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 6624365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:38:37+00:00 2026-05-25T21:38:37+00:00

Basically when i type something in the textarea, i can change the font either

  • 0

Basically when i type something in the textarea, i can change the font either by inputting a size in a input box with id font_size or clicking the 64px button, once the font changes and i click done, i appended the value of what’s in the textarea to the image in the div with an id image_conv but the problem here is that it doesn’t take the formatted value of the text in the textarea to the div, i want the output in the div to be the formatted text value. Does anyone know how i can solve this?
Many thanks in advance.
ps: i uploaded the backgroung image of the text area on image shack so everyone could use it, i don’t know if it works though cos i haven’t tried it 🙂

 <html>  
<head>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript">
     function sixty_four() {
        var text_input = $('#textarea');
        text_input.css("font-size", "64px");
       }
     function append_font() {
       var text_input = $('#textarea');
       var font = $('#font_size').val();
        text_input.css("font-size", font + "px");
       }
      function text_manual() { 
      var text_value = $('#textarea').val();
      $('#image_conv').append(text_value);
      $('#image_conv').fadeIn('slow');
      }
    </script>

    <style type="text/css">
    #textarea {
    height:300px;
    width:300px;
    resize: none;
    }

    #image_conv {
        background: url(http://imageshack.us/photo/my-images/97/sliverc.png/) no-repeat left top;
        border: 3px solid #000;
        height:300px;
        width:300px;
    }


    </style>
    </head>

    <body>

    <textarea id="textarea"> </textarea><br/><br/>
    Font size:<input type="text" id="font_size"/><input type="button" id="font_size" value="Append Font" onClick="append_font()"/> 
    <input type="button" id="64px" value="64px" onClick="sixty_four()" /><br/><br/>
    <input type="button" id="manual_text" value="Done" onClick="text_manual()"/> 
    <div id="image_conv" >
    </div>
    </body>
    </html>
  • 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-25T21:38:39+00:00Added an answer on May 25, 2026 at 9:38 pm

    This is how you should do it:

    $('#sixty_four').click(function(){
        $('#textarea').css('font-size', '64px');
    });
    $('#font_size_btn').click(function() {
        $('#textarea').css('font-size', $('#font_size').val() + 'px');
    });
    $('#manual_text').click(function(){ 
        var $textarea = $('#textarea');
        $('#image_conv')
            .html($textarea.val())
            .css('font-size', $textarea.css('font-size'))
            .fadeIn('slow');
    });
    

    Demo

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

Sidebar

Related Questions

I basically want to implement something where you can type in any URI (
I basically have something like this: void Foo(Type ty) { var result = serializer.Deserialize<ty>(inputContent);
How can I basically carry out a unique constraint on a string data-type field.
So basically when I type something with an apostrophe, such as John's bike it
Basically I have a site where I want the user to input something, have
I've a field of type char(1) in my MySQL table which basically can have
I'm trying to mimic something similar to FB. Basically, users can post comments in
I would like to create a custom data type which basically behaves like an
I've used CCK to create a 'Travel Offer' content-type which basically just lists the
Basically I've got some structs of type Ship which are going to go on

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.