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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:03:00+00:00 2026-06-12T21:03:00+00:00

i want to save my text message in same format as it is typed

  • 0

i want to save my text message in same format as it is typed ans display it in the same format.

Suppose i type:

Hi,
   How r u? how is your daddy?

 Thanks & regards
 Your friend

but it will dispalyed as

Hi, How r u? how is your daddy? Thanks & Regards Your friend

in my view file i have something like this:

<table class="display stylized" id="act_details">
       <thead>
          <tr>
                 <th>Message Details</th>

          </tr>
        </thead>
            <tbody> 
               <!--<tr>
                  <td colspan="2">Message from <strong><%= @message.from %></strong></td>
               </tr>-->
               <tr>
                 <td colspan="2"><label>Subject:</label> <%= @message.subject %></td>
               </tr>
              <!-- <tr>
                 <td colspan="2" wrap><label>Message:</label> <%= word_wrap(@message.description, :line_width => 80 ) %></td>
               </tr>-->
                <% @replies.each do |reply|%>
                  <tr>
                    <td colspan ="2" wrap><label> Sent by <%= reply.from.capitalize %> on <%= reply.created_at %> </label> <br/><%= word_wrap(reply.description, :line_width => 80)%></td>
                  </tr>
                <%end%>
        </tbody>      
</table>

I am using rails 3.0.6. Is their any way to show the message as it is typed, i am sure their is something as i want but unable to get those. Any help will be thankful.

  • 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-06-12T21:03:04+00:00Added an answer on June 12, 2026 at 9:03 pm

    Hello friends i have got a solution. Rails has a built in method “simple_format“

    And it is so simple to use and works well. Thanks a lot to this.

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

Sidebar

Related Questions

I want to save large amounts of text then display them (first in table
I want to implement simple functionality to allow users to save their message text
I want to save a matrix to a text file, so I can read
I want to use Ckeditor for Entering text and I want to save that
Case is I want to prompt a message (Do you want to save changes?)
The problem is this.I want to save every message in MySQL DB and I
i want to save some text into my database with foloowing code. But i
I want to save My Data Type temporary in NSUserDefault. this data later pull
I want save the username and password when user login, and I added the
i want to save a variable to be global variable on all screens i

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.