-2

Hello I am using for a rails (2.3.4) BlueCloth (2.0.11) an want type my text in die text box and after that I want to copy the html preview, which is provided by BlueCloth.

Now: when ever I mark the html, BlueCloth unmark it. Can I FIX This?

here a Screenshot

imalik8088
  • 1,501
  • 5
  • 21
  • 39
  • Can you please clarify what you mean by "mark the html" and "unmark it"? Do you want to use JavaScript to copy the HTML preview sent to the web browser, or are you just asking how to use Ruby to convert markdown into HTML as a string using Bluecloth? – Phrogz Mar 02 '11 at 15:51
  • **update** I have to update the JavaScript because the JS is refreshing to fast and therefore I have to set the refreshing time lower. BUT THE JS FILE about 2000 Lines long? **CAN SOMEBODY HELP ME OUT**? – imalik8088 Mar 02 '11 at 16:03
  • You need to supply a lot more details about your situation. Please edit your question to add information (and I will remove my downvote). As it is, you are assuming that people know how your code is set up and what "too fast" means. – Phrogz Mar 02 '11 at 16:21

1 Answers1

0

Here's a random guess: look for setTimeout or setInterval in your 2,000 lines of JavaScript. Either will have two parameters (the first of which may be a very long function literal), like so:

setTimeout( ..., xxx );
- or -
setInterval( ..., xxx );

The integer xxx is now long to wait, in milliseconds. Make it however long you want. At this point this question appears to have nothing to do with Ruby, Rails, or BlueCloth.

Phrogz
  • 296,393
  • 112
  • 651
  • 745
  • THANKS for the help I have just increase the value of `code setInterval(function() { var text = textarea.val(); var html = converter.makeHtml(text); preview.html(html); htmlview.text(html); }, 10000); });` – imalik8088 Mar 02 '11 at 16:32
  • @aetbaar_444 If this solved your problem then you should click the checkmark next to the answer to "accept" it. And welcome to Stack Overflow! – Phrogz Mar 02 '11 at 16:33
  • Yeh I am from Germany and sorry for my bad english! :D AND the formatting – imalik8088 Mar 02 '11 at 16:36