# Writing content in Textile format instead of HTML

**URL:** <https://www.ruby-forum.com/t/writing-content-in-textile-format-instead-of-html/180709>\
**Category:** Rails\
**Created:** [December 27, 2009, 5:20am UTC](https://www.ruby-forum.com/t/writing-content-in-textile-format-instead-of-html/180709 "2009-12-27T05:20:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unebaguettesvp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/47e85d/32.png) [@unebaguettesvp](https://www.ruby-forum.com/u/unebaguettesvp)\
**Post date:** [December 27, 2009, 5:20am UTC](https://www.ruby-forum.com/t/writing-content-in-textile-format-instead-of-html/180709/1 "2009-12-27T05:20:07Z")

</div>

People,

I have a simple rails web site and I have been creating some of the  
content files with HTML but thought I should be able to write them using  
Textile instead. eg I have an index file:

index.html.erb

that has links in it of the form:

[  
Description](http://domain_name.com.au/rails_project_name/mvc_name/file_name)

I have been looking around for hours but can’t find anything that helps

- I can do textilize with fields retrieved from database records but  
can’t see how to do it with content of URL files.

I presume it is possible? How?

Thanks,

## Phil.

Philip R.

GPO Box 3411  
Sydney NSW 2001  
Australia  
E-mail: removed\_email\_address@domain.invalid

–

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 removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

---

<div class="post-metadata">

**Author:** ![unebaguettesvp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/47e85d/32.png) [@unebaguettesvp](https://www.ruby-forum.com/u/unebaguettesvp)\
**Post date:** [December 28, 2009, 5:16pm UTC](https://www.ruby-forum.com/t/writing-content-in-textile-format-instead-of-html/180709/2 "2009-12-28T17:16:16Z")

</div>

Philip R. wrote:

> [  
> Description](http://domain_name.com.au/rails_project_name/mvc_name/file_name)

This link will return the page/file directly to the browser. It will not  
involve your Rails application at all (unless, of course, this URL is  
routed to a controller action). Web browsers do not understand Textile.  
They are designed to render HTML.

> I have been looking around for hours but can’t find anything that helps
> 
> - I can do textilize with fields retrieved from database records but  
> can’t see how to do it with content of URL files.
> 
> I presume it is possible? How?

Of course, you can textilize fields from a database and return the  
resulting HTML to the browser, which will render the HTML it receives.

Textile is designed to simplify formatting from end users. The Textile  
strings must be converted into HTML before the browser can render them.

I suppose you could write some content in Textile. Then run the content  
through a conversion to HTML. At that point you can store the HTML on  
your server and link to that. But. that gains you nothing really. You  
might as well write the content in HTML and be done with it. If you know  
Textile it’s not a big step to get the same thing in HTML.

Textile \< HTML. This makes learning, and writing, the HTML trivial.
