Questions tagged [prettify]

A JavaScript module and CSS file that allows syntax highlighting of source code snippets in an HTML page.

145 questions
0
votes
0 answers

Format code within
 tags

I'm trying to make something, so you fill out a form, press a button, and it generates code below it with whatever you input in the appropriate place. I've been given dozens of "template codes" which will have 2 or 3 words in it change, depending on…
0
votes
1 answer

Formatting Open Source Licences ala StackOverflow/Github

In my project I want to include a Dialog that shows the open source licences of the libraries I use in the application. Particularly though, I want them to look a lot like this: That's how it looks on Github, I also noticed that Google plus for…
daniel_c05
  • 11,438
  • 17
  • 60
  • 78
0
votes
2 answers

prettify will cause "script is busy" warning if the code is long

I'm using prettify by Google. How to fix?
Mask
  • 33,129
  • 48
  • 101
  • 125
0
votes
2 answers

How to add "view:source" option in a textbox?

I know my title isn't that descriptive so let me try to explain it here. In my blog I want to add an option for user that when he clicks a small button named view:source he gets the the source code in raw format. I am using prettify.js for syntax…
RanRag
  • 48,359
  • 38
  • 114
  • 167
0
votes
2 answers

Yii`s jQuery.yii.js not loading first

i am using wmd editor which,it has its own js files that requires jQuery to be be loaded first,however Yii framework has its own Jquery library that is registered in the asset that loads after all head elements,Wmd editor crushes if jQuery is not…
Eliethesaiyan
  • 2,327
  • 1
  • 22
  • 35
-1
votes
1 answer

BeautifulSoup: tag enclosing formatting

when I prettify a soup, I am trying to get this: Instead of this: I checked bs4.formatter code and I didn't find an option related to my needs: def __init__( self, language=None,…
-1
votes
1 answer

Drop javascript in html and auto-format all and/or
 blocks

I am looking at this google prettify project: https://github.com/google/code-prettify In the usage section it says to use it like so:
class Voila {
public:
  // Voila
  static const string VOILA = "Voila";

  // will not…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
-1
votes
1 answer

How to print out the first and last 1000 lines using beautiful soup

I am trying to print out the first and last 1000 lines using "prettify' from BeautifulSoup. I have downloaded Kafka's The Metamorphosis to my hard drive and I've successfully created a BeautifulSoup object: Due to captcha issues with the Gutenberg…
James
  • 37
  • 1
  • 6
-1
votes
1 answer

XML Prettifying from file in Python

I have an xml file which looks like the example below. Many texts contain space as the start character, or have \n (newline) at the beginning, or other crazy stuff. I'm working with xml.etree.ElementTree, and it is good to parse from this file.…
Tomas Pytel
  • 188
  • 2
  • 14
-3
votes
2 answers

Load a javascript file on keyup

I know that I can call a javascript function on keyup in a input box. but is there any way to refresh a javascript file on keyup in my input box? I dowloaded prettify. I am creating a page just like stackoverflow's ask a question page. As we know…
user1763032
  • 427
  • 9
  • 24
1 2 3
9
10