Browse Source

Millie's review

pull/1014/head
Shikha 6 years ago
committed by GitHub
parent
commit
ca3a37991c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      plugins/codesample.md

25
plugins/codesample.md

@ -25,6 +25,18 @@ By default, `codesample` uses `http://prismjs.com/` to embed the code samples wi
> Prism.js and prism.css need to be added to a page for syntax highlighting to work. See the instructions below to learn how to do this.
### Using Prism.js on your web page
You need to add `prism.js` and `prism.css` to your page in order to get the syntax highlighted code samples on your webpage (as created by the Code Sample plugin). The Code Sample plugin uses the following languages: markup, javascript, css, php, ruby, python, java, c, csharp and cpp. You can generate the `prism.js` and `prism.css` files on the [download](http://prismjs.com/download.html) page at the Prism website.
#### Example of using the Prism.js script
```html
<link rel="stylesheet" type="text/css" href="prism.css">
<script src="prism.js"></script>
<pre class="language-markup"><code>...</code></pre>
```
## Options
### `codesample_languages`
@ -52,19 +64,6 @@ tinymce.init({
toolbar: 'codesample'
});
```
### Using Prism.js on your web page
You need to add `prism.js` and `prism.css` to your page in order to get the syntax highlighted code samples on your webpage (as created by the Code Sample plugin). The Code Sample plugin uses the following languages: markup, javascript, css, php, ruby, python, java, c, csharp and cpp. You can generate the `prism.js` and `prism.css` files on the [download](http://prismjs.com/download.html) page at the Prism website.
#### Example of using the Prism.js script
```html
<link rel="stylesheet" type="text/css" href="prism.css">
<script src="prism.js"></script>
<pre class="language-markup"><code>...</code></pre>
```
## Live example
{% include codepen.html id="codesample" %}
Loading…
Cancel
Save