Displaying 20 results from an estimated 90000 matches similar to: "Ruby code highlight in html"
2006 Feb 26
3
how to format and syntax highlight code in html
I''ve written my own blog (I know typo is better, but I wanted the
experience of writing my own) and I want to add syntax highlighting to
it. I''ve read about using the ruby gem syntax but I can''t figure out
how to implement it. I''ve also wondered if it could be used in my case.
How does it work when you have a long line of code but the <div> your
2006 Feb 13
11
ROR code syntax highlighting on blog?
I am interested in putting the cool syntax highlighting for ROR code. What''s the best way to do that? Is it using textilize or another formatting language? Or do I need special stylesheets?
Any assistance is appreciated.
Thanks
Frank
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
-------------- next part
2006 Jun 12
2
in_place_editor consumes html tags?
I''ve got a bog-standard view which displays textilized data. In the same
view, I have an in_place_editor which uses load_text_url to bring in
non-textilized data when editing.
Now, if I have html tags in the data loaded from load_text_url, they
appear to go missing. I can see the tags in the output from my
controller method using the console, but the tags are not shown in the
2009 Mar 16
2
R-code in html help pages: syntax highlighting
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
A follow up to my previous post. It'd be good to have syntax
highlighting in the html help pages. There is highlight
(http://www.andre-simon.de/) which seems to be open source. Since code
is delimited in the help file format, it should not be too difficult
to run a highlighting program (actually, vim and emacs do this too)
recursively and
2010 Apr 25
2
Ruby randomly converting quotes to html
If anyone understands:
def some_method
"<script type=''text/javascript''>
whatever(''element'');
</script>"
end
=>
<script type="text/javascript">
whatever(‘element’)
</script>
Any idea what could create that strange behavior?
--
Posted via http://www.ruby-forum.com/.
--
You received
2007 Feb 17
0
Truncate and textilize
Hi, this is probably an obvious question, but I want to textilize and
truncate the same thing. Nesting them in parenthesis didn''t seem to work
for me. Here is what I have:
<%= truncate(friend.about_me, length = 140, truncate_string = "...") %>
How do I get it to recognize textile as well?
Thanks!
Dave
--
Posted via http://www.ruby-forum.com/.
2008 Oct 06
2
textilize with --- (3 dashes) removes text
Hi,
using --- (3 dashes) at the end of a string that is textilized,
results in a single hr tag without any text. This seems weird to me.
Am I overlooking something?
>> av = ActionView::Base.new
>> av.textilize("sometext ---")
=> "<hr />"
Cheers,
Jan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2008 Jan 15
0
Firefox and Effect.Highlight problem
Hi,
I have a little problem with the highlight effect.
onsuccess of an ajax request I highlight a <tr>, It works perfectly
under IE7 and each time the ajax.request is triggered the highlight
happen, the problem comes under FF. The effect only appear on the
first time and then doesn''t work anymore although the ajax.request is
completed.
If anyone has an idea I would be pleased to
2007 Mar 01
3
Ajax.PeriodicalUpdater using Effect.Highlight to highlight newly loaded div
Hi folks. So far I have managed to get dataloading into a div froma
php script. This script just passes the time on the server in a div to
the javascript below. I am trying to get the last loaded data to call
Effect.Highlight but it seems to highlight the 2nd last data instead.
Can anyone see what''s going wrong here? I''ve tried everywhere to solve
this.
Check the code in action
2006 Oct 09
2
page.visual_effect :highlight
I have some code that will do the highlight, fade effect on a block of
text. It seems to work just fine until it is fired multiple times very
rapidly.
The end color matches a grey background and the start color is a yellow.
Say its run 4 times a second for 3-5 seconds. When the flashing catches
up the text will fade for the last time to the end color, then the
background will switch to a
2006 Sep 19
0
Effect.Highlight interferes with Effect.toggle
I''m using something like an accordion, but the div containers have some
elements in them that use Effect.Highlight (i.e. InPlaceEditor and
Ajax.Checkbox, one of my SAU classes). If I click the element that
starts the Effect.SlideUp or some other similar effect, and then mouse
over an element starting an Effect.Highlight, the highlight cancels the
SlideUp. Or, if the Effect.Highlight
2007 Jun 06
1
highlight and pagination
I made a search-field which shows all hits and highlights the all
words searched for:
def suche
if params[:link][:suchfeld] == "description"
@description = "show"
@highlight = params[:suche]
end
@link_pages, @links =
paginate :link, :order_by => ''url'',
:conditions =>
2005 Dec 24
2
Textilize on ajax update
I''m writing a basic to-do
application. I''m using a form_remote_tag to submit the entry to my
controller, which then returns the entry to be displayed in the table
of to-do items. However, I''d like to be able to "textilize" the entry
without having to reload the page. Is there any way to have my ajax
function textilize the text before displaying it in the list?
2011 Jan 23
2
RedCloth 4.1.1 vs. 4.2.3 - weird behaviour with notextile
For a community project I aim to combine RedCloth and Coderay and on doing
this, I might have found an issue with RedCloth.
I pushed a demo to Github:
https://github.com/markusproske/redcloth_coderay_demo
The index (http://localhost:3000/) demonstrates the issue.
In brief:
A page consist of textile. The textile contains @@@ruby somecode @@@
The textile is first feed into Coderay via a helper
2010 Jul 19
0
redcloth with rails3 and ruby 1.9.2
is redcloth working with rails3 and 1.9.2?
I don''t see it here - http://railsplugins.org/
redcloth 4.2.3 throws this exception when trying to use the method
textilize:
uninitialized constant ActionView::Helpers::TextHelper::RedCloth
I might need to use the 1.9.2.
can you guide me how to use the 1.9.2 version? (I assume i''ll have to
clone the repo but not sure what to do next).
2006 Sep 15
7
is there a multiline ruby "comment" approach? like java's /* code */ ???
Hi,
Just wondering if there is a way to easy comment out a block of ruby code
without putting the "#" characters on each line?
Is there an equivalent to java''s /* */, for example:
/* askdf
asd
fasdf
as
dfasd
fa
*/
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 May 05
3
Plugin for displaying Java Code with Syntax Highlighting in a RoR website?
Hello folks,
I only want to display (not execute) java code on a java tutorial
website coded in RoR. Is there any plugin or method how i can display
the java code with syntax highlighting on a RoR html site?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group,
2006 Apr 25
4
redcloth poblems
Hi, I''m having some problems with redcloth(3.0.4 gem) and textilize.
I have a string:
"h2. hello
_what''s up?_"
which is being textilized as:
<h2>hello<br />
<em>what’s up?</em></h2>
so no paragraph and h2 wrapped all the way.
the input is coming from firefox 1.5.2 on a mac
Anybody got any idea what the problem might be?
--
2006 Mar 10
2
textilize != RedCloth.new ?
For me, textilize(stuff) produces nasty stuff - <br>''s instead of
enclosing <p>''s and some closing <h*>''s are missing. RedCloth.new(stuff)
works fine though. Isn''t textilize supposed to produce the same output?
Or do I need to tweak something?
Joe
--
Posted via http://www.ruby-forum.com/.
2006 Mar 25
2
Textilize problems with line breaks
I''m having a problem formatting some text. I have a textarea that I
input my text into, which will then be put into an e-mail and sent out.
The problem I am having is when there is a single line break.
Multiple line breaks work fine (hitting enter twice), but single line
breaks don''t seem to work properly.
Take the following input:
Line1.
Line2.
Line3.
Line4.
Using