简体   繁体   English

精美印刷的Java,XML,JavaScript…到HTML

[英]Pretty-print Java, XML, JavaScript, … to HTML

I have a step-by-step tutorial of how to setup our product. 我有一个逐步教程,介绍如何设置我们的产品。 I have to display lots of sample code in each step. 我必须在每个步骤中显示很多示例代码。 Following is the list of types of code I have to display in the page. 以下是我必须在页面中显示的代码类型列表。 What do I use to format everything? 我该如何格式化所有内容?

  • Java Code Samples Java代码样本
  • XML samples XML样本
  • iOS SDK Files (*.h and *.m) iOS SDK文件(* .h和* .m)
  • Javascript code samples JavaScript代码示例

My product UI is JavaScript based. 我的产品用户界面基于JavaScript。 We are using knockout bindings and MVVM. 我们正在使用敲除绑定和MVVM。

Edit : This is for our web based product. 编辑 :这是针对我们基于Web的产品。 We display some code samples on our tutorials page so that the user can copy paste the sample code into their IDEs. 我们在教程页面上显示一些代码示例,以便用户可以将示例代码复制粘贴到其IDE中。 Code should be displayed on an HTML page. 代码应显示在HTML页面上。

Checkout google-code-prettify , which is used here on Stack Overflow and code.google.com. 检出google-code-prettify ,在Stack Overflow和code.google.com上使用。 It works with Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, Makefiles, and Rust. 它可以与Java,Python,Bash,SQL,HTML,XML,CSS,Javascript,Makefiles和Rust一起使用。 You can see samples in its Gallery of themes . 您可以在其主题库中查看示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM