Displaying 20 results from an estimated 9000 matches similar to: "newlines in text_area"
2009 Feb 24
2
Displaying line breaks & paragraphs using 'simple_format' ?
Hi there,
I need to:
1. STORE a text of the below format in a (MySQL) database (using a
''textarea''), and then
2. RETRIEVE & DISPLAY it in exactly the same format (meaning: keeping
all paragraphs/line breaks).
The intended text format looks like this:
***
Blah blahblah blah blah blahblah blah blah
blahblah blah blah blahblah blah, blah
blahblah. <- NEW
2006 Aug 14
3
New line char in a text area field on DISPLAY
I have a text_area to accept upto 1000 chars, which is stored as a blob
in mysql. When I try to display the saved data, I dont see the new line
characters - however I could see the newline characters in EDIT MODE. So
my newline char is lost during displaying. Any ideas how to fix it.
thanks
thila
--
Posted via http://www.ruby-forum.com/.
2006 Apr 15
3
Dumb newbie question - text formatting?
I have a MySQL "text" element that I''m trying to display, but it''s not
formatting (i.e. it''s all one big paragraph). In the AWD depot example
it doesn''t look like they do anything special, but they get formatted
text. I''ve tried it with both:
<%= show.description %> - puts text, and formats according to any HTML
tags I typed in.
2007 Jan 16
2
Using view helpers in migrations?
I''m writing a bloggish/CMSish thing. I had been using simple_format,
but my users requested a rich editor, so I added TinyMCE.
Anyway, I was trying to migrate the existing content (since TinyMCE
assumes it''s reading HTML-formatted text), and realized that I
couldn''t call simple_format (or other helper methods) from Migrations.
Can someone enlighten me here?
2005 Dec 21
8
text_area
Hi I''d like to know how to add default text text area using the function
text_area. I ''ve tried using value = "....." to do this but with no
luck.
Could some one please answer my simple question?
Thanks.
Dan.
--
Posted via http://www.ruby-forum.com/.
2006 Jan 17
14
Going nuts on ''\n'' to <br />
Hi all,
Is there no way to easily resolve this. It can''t be that I''m the first that
wants this, and it wouldn''t be RoR if it''s not possible.
On the mysql prompt with the select description from todos .. linefeeds are
show, so they are there.
This is the actual contents with a linefeed after the ":"
"Project contacts:
delete table, point
2008 May 29
4
ruby's simple_format method is not working for spaces.
Ruby''s simple_format method is not working for spaces. so how to add and
what to add in simple format method code so it also work for spaces?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2008 Jan 16
4
ActionController::InvalidAuthenticityToken in LoginController
Hi,
I''m having a problem trying to get a login controller working. When I
try and post to my login controller I get the following error:
ActionController::InvalidAuthenticityToken in LoginController#login
login_controller:
class LoginController < ApplicationController
def login
case request.method
when :post
if @session[''user''] =
2008 Jul 26
4
simple_format, (long) urls, and wrapping
I''m using simple_format to format and display posted content from
users. This content sometimes has urls in it.
The problem I''m having is that if the urls are long enough to wrap,
they do, but the url gets split with a <br> tag. Then, if the user
clicks on the link, only the first, non-wrapped part of the link gets
posted to the browser... and that''s an invalid
2006 Mar 29
6
Comments for a blog
Hello,
I''m making a blog and I need some function that convert the text
writed for a user in a textarea into a formated text.
I think to use h, but it forget paragraph breaks and I
like allow some tags.
By
Daniel
2006 Apr 06
2
text_area and :value
I''m trying to use the text_area() method and would like to populate the
text block with initial text.
According to this: http://dev.rubyonrails.org/ticket/3752 there was a
fix put in place, but I''m ont sure how to integrate this.
How do I get the :value parameter to show up within the textbloc instead
of the html attributes?
--
Posted via http://www.ruby-forum.com/.
2007 Dec 27
17
2.0 & "Agile Web Dev..." book
Just running through the first little project (depot) in ''Agile Web
Development with Rails''. It isn''t scaffolding like it says it should
in the book.
After running:
>rails -d mysql depot
then SQLing:
drop table if exists products;
create table products (
id int not null auto_increment,
title varchar(100) not null,
description text not null,
image_url varchar(200)
2013 Mar 13
2
Form_for text_area
Hi all, Since I am new to ruby on rails. I''m stuck in some minor issue.
I am using form_for in my view.
In that I am using a text text. So, My question is, how to add a default
value to the text_area along with the row and col values.
Please help me out ASAP.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To
2007 Aug 17
3
Clear text_area value onfocus
Hi!
I have a "text_area" that looks like this...
<%= text_area ''business'', ''otherDigitalDesc'', "cols" => 25, "rows" =>
4, "value" => "Enter Description if Yes..." %>
Right now, if I submit it, it adds "Enter Description if Yes" into the
database. It would be nice to not have it enter
2007 Mar 29
1
improving on: truncate(..) + rendered text ?
Hello all,
In a summary page I need to show the 1st 100 chars of textilized messages.
Problem: truncate(..) would often cut in the middle of html tags =>
random result.
My first idea was to "repair" the broken text with Hpricot (as I use
it elsewhere in the project), but it''s not perfect:
<h1>abcd</h
would give
<h1>abcd</h</h1>
(I also use
2006 Jan 21
1
text_area content with text_area and not text_area_tag ?
Hello,
Is it possible to fill the textarea content when using the text_area
function ?
Why there is 2 , + or - similar class : FormHelper and FormTagHelper ?
2006 Apr 13
4
equivilent to PHP''s nl2br?
Hey all, this is a pretty simple question but I can''t seem to find
anything on the wikki or google... Is there a Ruby/Rails equivilent to
PHP''s nl2br function?
--
Posted via http://www.ruby-forum.com/.
2006 May 15
1
Simple: How to use TextHelper in a controller
I''m having trouble succesfully getting access to the
ActionView::Helpers::TextHelper.strip_tags
method from one of my controllers.
If I try to call it directly using
ActionView::Helpers::TextHelper.strip_tags
I get
undefined method `strip_tags'' for ActionView::Helpers::TextHelper:Module
What is the preferred way to make ActionView helpers available to a
descendant of
2006 Mar 06
2
Convert \n newlines to html <br>
I have a textarea that accepts a shipping address, so I need to convert
newlines when it is displayed as html. I am new to ruby, and rails so an
example would be appreciated. I want to do this in the ''display'', not
the stored text if possible, since I use the newlines when generating a
pdf.
Thanks.
charley
--
Posted via http://www.ruby-forum.com/.
2012 Apr 22
2
how to avoid newlines & tabs in file opening?
i have uploaded file,but when i am opening it in R,using
> u<-file(file.choose(),"r")
>k<-readLines(u)
>k
> k[1:120]
is has all /t (tabs)& newlines, how to avoid it,
can i take first 3 columns only in table form (lines starts with # not
important for me)
uploaded file:-
http://r.789695.n4.nabble.com/file/n4577757/rabata.txt rabata.txt
--
View this message in