mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Revert "docs: Remove markdown.parser.type option"
This reverts commit a36c86c1828ae33d967a9847d604dd539a005ff7.
This commit is contained in:
parent
fddc459404
commit
33fb800bf3
6 changed files with 33 additions and 9 deletions
4
STYLE.md
4
STYLE.md
|
|
@ -7,7 +7,7 @@ app/styles/looknfeel
|
|||
Overall look and theme of the Zeppelin notebook page can be customized here.
|
||||
|
||||
### Code Syntax Highlighting
|
||||
There are two parts to code highlighting. First, Zeppelin uses the Ace Editor for its note paragraphs. Color style for this can be changed by setting theme on the editor instance. Second, Zeppelin's Markdown interpreter calls pegdown to emit HTML, and such content may contain <pre><code> tags that can be consumed by Highlight.js.
|
||||
There are two parts to code highlighting. First, Zeppelin uses the Ace Editor for its note paragraphs. Color style for this can be changed by setting theme on the editor instance. Second, Zeppelin's Markdown interpreter calls markdown4j to emit HTML, and such content may contain <pre><code> tags that can be consumed by Highlight.js.
|
||||
|
||||
#### Theme on Ace Editor
|
||||
app/scripts/controllers/paragraph.js
|
||||
|
|
@ -16,7 +16,7 @@ Call setTheme on the editor with the theme path/name.
|
|||
[List of themes on GitHub](https://github.com/ajaxorg/ace/tree/master/lib/ace/theme)
|
||||
|
||||
#### Style for Markdown Code Blocks
|
||||
Highlight.js parses and converts <pre><code> blocks from pegdown into keywords and language syntax with proper styles. It also attempts to infer the best fitting language if it is not provided. The visual style can be changed by simply including the desired [stylesheet](https://github.com/components/highlightjs/tree/master/styles) into app/index.html. See the next section on build.
|
||||
Highlight.js parses and converts <pre><code> blocks from markdown4j into keywords and language syntax with proper styles. It also attempts to infer the best fitting language if it is not provided. The visual style can be changed by simply including the desired [stylesheet](https://github.com/components/highlightjs/tree/master/styles) into app/index.html. See the next section on build.
|
||||
|
||||
Note that code block background color is overriden in app/styles/notebook.css (look for .paragraph .tableDisplay .hljs).
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 144 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 258 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 144 KiB |
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
layout: page
|
||||
title: "Markdown Interpreter for Apache Zeppelin"
|
||||
description: "Markdown is a plain text formatting syntax designed so that it can be converted to HTML. Apache Zeppelin uses pegdown."
|
||||
description: "Markdown is a plain text formatting syntax designed so that it can be converted to HTML. Apache Zeppelin uses markdown4j."
|
||||
group: interpreter
|
||||
---
|
||||
<!--
|
||||
|
|
@ -25,12 +25,28 @@ limitations under the License.
|
|||
|
||||
## Overview
|
||||
[Markdown](http://daringfireball.net/projects/markdown/) is a plain text formatting syntax designed so that it can be converted to HTML.
|
||||
Apache Zeppelin uses [pegdown](https://github.com/sirthias/pegdown) as a markdown parser.
|
||||
Apache Zeppelin uses [markdown4j](https://github.com/jdcasey/markdown4j) and [pegdown](https://github.com/sirthias/pegdown) as markdown parsers.
|
||||
|
||||
In Zeppelin notebook, you can use ` %md ` in the beginning of a paragraph to invoke the Markdown interpreter and generate static html from Markdown plain text.
|
||||
|
||||
In Zeppelin, Markdown interpreter is enabled by default and uses the [markdown4j](https://github.com/jdcasey/markdown4j) parser.
|
||||
|
||||
<img src="../assets/themes/zeppelin/img/docs-img/markdown-interpreter-setting.png" width="60%" />
|
||||
|
||||
## Configuration
|
||||
<table class="table-configuration">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Default Value</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>markdown.parser.type</td>
|
||||
<td>markdown4j</td>
|
||||
<td>Markdown Parser Type. <br/> Available values: markdown4j, pegdown.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Example
|
||||
|
||||
The following example demonstrates the basic usage of Markdown in a Zeppelin notebook.
|
||||
|
|
@ -45,11 +61,12 @@ Markdown interpreter leverages %html display system internally. That means you c
|
|||
|
||||
The markdown interpreter provides github flavored markdown.
|
||||
|
||||
<img src="../assets/themes/zeppelin/img/docs-img/markdown-example-github-flavored-parser.png" width="70%" />
|
||||
`markdown4j` parser provides [YUML](http://yuml.me/) and [Websequence](https://www.websequencediagrams.com/) extensions
|
||||
|
||||
### Supproted Plugins
|
||||
<img src="../assets/themes/zeppelin/img/docs-img/markdown-example-markdown4j-parser.png" width="70%" />
|
||||
|
||||
`pegdown` parser provides [YUML](http://yuml.me/) and [Websequence](https://www.websequencediagrams.com/) extensions
|
||||
### Pegdown Parser
|
||||
|
||||
`pegdown` parser provides github flavored markdown.
|
||||
|
||||
<img src="../assets/themes/zeppelin/img/docs-img/markdown-example-pegdown-parser.png" width="70%" />
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,14 @@
|
|||
"group": "md",
|
||||
"name": "md",
|
||||
"className": "org.apache.zeppelin.markdown.Markdown",
|
||||
"properties": null,
|
||||
"properties": {
|
||||
"markdown.parser.type": {
|
||||
"envName": "MARKDOWN_PARSER_TYPE",
|
||||
"propertyName": "markdown.parser.type",
|
||||
"defaultValue": "markdown4j",
|
||||
"description": "Markdown Parser Type. Available values: markdown4j, pegdown. Default = markdown4j"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
"language": "markdown",
|
||||
"editOnDblClick": true
|
||||
|
|
|
|||
Loading…
Reference in a new issue