Questions tagged [redcloth]

RedCloth is a module for using the Textile markup language in Ruby.

RedCloth is a popular Ruby library for converting Textile-formatted text into HTML.

62 questions
2
votes
3 answers

How to convert RedCloth.to_html back into editable vanilla text?

I have with RedCloth saved plain text in a form and converted it to HTML. For example, writing this in my form, and saving it, would make it display the exact same way I wrote it : This sentence gets inserted into it proper html syntax to preserve…
Trip
  • 26,756
  • 46
  • 158
  • 277
2
votes
1 answer

Covert "back" to textile markup when editing post via RedCloth and Acts-as-Textiled?

Question: How can I "convert" my textile generated HTML back to textile markup in my app? Here's the situtation. I managed to piece together a poor man's blog editor in my Rails 3 app by implementing RedCloth and acts-as-textiled in my "posts"…
thoughtpunch
  • 1,907
  • 4
  • 25
  • 41
2
votes
2 answers

How can I get Textile to create links out of plain URL's?

Many of my users are typing in plain URL's and not using the Textile format for creating links. I would like Textile to just make the URL's linkable to the URL's. I don't really need to worry about XSS or anything malicious because it is an internal…
Sixty4Bit
  • 12,852
  • 13
  • 48
  • 62
2
votes
1 answer

An error occurred while installing RedCloth (4.2.7), and Bundler cannot continue

I have an app on the Heroku Bamboo stack and have been following the instructions here (https://devcenter.heroku.com/articles/cedar-migration) for migrating to the Cedar stack. My app has an older version of RefineryCMS (1.0.3) and I'm trying to…
Day Davis Waterbury
  • 2,052
  • 18
  • 31
2
votes
2 answers

Clang build error when trying to install Jekyll

I am trying to install Jekyll using the instruction on this page (https://help.github.com/articles/using-jekyll-with-pages). However, at the second step, bundle install, the following is output Gem::Ext::BuildError: ERROR: Failed to build gem native…
Ben Pious
  • 4,765
  • 2
  • 22
  • 34
1
vote
1 answer

Using helpers (or render partials) from custom RedCloth tags

I'm trying to call a view helper from a custom RedCloth tag and am having absolutely no luck at all. All of the examples I can find have the custom tag method create and return a literal string without calling any other method at all. I am trying…
Oliver
  • 191
  • 1
  • 1
  • 8
1
vote
1 answer

How to integrate redcloth with coderay

I want to use syntax highlighting along with redcloth. The description of coderay says: Fast and easy syntax highlighting for selected languages, written in Ruby. Comes with RedCloth integration and LOC counter. 1 But I did not find a…
Mark
  • 7,507
  • 12
  • 52
  • 88
1
vote
1 answer

NoMethodError: undefined method `name' for "RedCloth":String and can't run make due to ruby/config.h error

I tried the steps in Problems with the rails console, RVM and readline because when I try to run rails or rails console I get a NoMethodError: undefined method `name' for "RedCloth":String When I try following the steps in the other posts I get a…
Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
1
vote
1 answer

RedCloth escaping HTML output

After watching this RailsCast, I thought I'd give RedCloth a try. Unfortunately, it looks like I'm having an issue that involves the resultant HTML being encodeded instead of rendered as straight HTML. First I added the following to my…
Matt Huggins
  • 81,398
  • 36
  • 149
  • 218
1
vote
2 answers

Rails - Redcloth, how do I convert exsiting wysiwyg crap html?

I've seen the light, I'm converting my site over to RedCloth to use the wonderful textile markup. Problem is, I have a couple years worth of html content in my database that is not textile markup. How do I convert that into textile? Is there a…
jyoseph
  • 5,435
  • 9
  • 45
  • 64
1
vote
1 answer

restrict users from using certain tags on redcloth / textile in rails

Hey I'm trying to find a way to restrict users from using certain tags like h1. or h2.in the form field. Like I dont want them to be able to blow up the form field and spam. Is there way to do that or do I have to change it in the gem library?
daniel
  • 3,105
  • 4
  • 39
  • 48
1
vote
2 answers

How do I parse HTML in Rails?

I have a string with html tags in it saved. => "

hey man this is crazy g funk

\n

here i come with another crazy message from..

\n

dj eassssy d!@#!.

" How do you parse this so that it displays the way the HTML tags are implying? I…
Trip
  • 26,756
  • 46
  • 158
  • 277
1
vote
2 answers

Ruby DevKit not working for RedCloth and other gems on WindowsXP

I'm a completely new to RoR and don't have much web development experience. I usually give up at this point, but I need a RoR dev environment for a job and I can't pick the brain of the site's creator because he's someone outside of the company and…
Lyla
  • 2,767
  • 1
  • 21
  • 23
1
vote
2 answers

How to use rails3 with RedCloth. require 'RedCloth' not working

I have installed RedCloth, by using the devkit. Using gem install RedCloth. If I use plain irb, then require 'RedCloth' works fine. But if I use rails console and do require 'RedCloth', it says it can't find file to load. Please help. Rails…
Ram
  • 2,237
  • 4
  • 23
  • 27
1
vote
1 answer

How to pass parameters to RedCloth (Textile processor) from Jekyll

The RedCloth FAQ describes using the fold_lines option to disable hard breaks. What's the easiest way to pass fold_lines to RedCloth when it's called as part of Jekyll's build process? (am I just missing something in the Jekyll configuration guide?
everial
  • 302
  • 1
  • 10