This repository has been archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom-elements.json
63 lines (63 loc) · 2.69 KB
/
custom-elements.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
"version": "experimental",
"tags": [
{
"name": "prism-highlight",
"path": "./prism-highlight.js",
"description": "Syntax highlighting via Prism\n\n### Example\n\n```html\n<prism-highlight id=\"c1\" lang=\"markdown\"></prism-highlight>\n<script>\n document.querySelector('#c1').code = '# Test highlight';\n</script>\n```\n\nThe `lang` attribute is required and the component will not start parsing data without it.\n\nChanging the `lang` and `code` properties together, do it in less than 10 ms.\nThe element is set to commit changes after this time period. Otherwise it may display\nold and new code due to the asynchronous nature of the code highlighter.\n\n## Changes in version 4\n\nThe component supports only few syntax highlighting by default. It won't\nload other languages at runtime.The component consumer has to download definition\nbefore highlighting the code.\n\nThe component no longer uses Web Workers.",
"attributes": [
{
"name": "code",
"description": "A data to be highlighted and rendered.",
"type": "string"
},
{
"name": "lang",
"description": "Prism supported language.",
"type": "string"
},
{
"name": "raw",
"description": "When set it ignores syntax highlighting and only renders the code.",
"type": "boolean"
}
],
"properties": [
{
"name": "styles",
"type": "CSSResult[]"
},
{
"name": "code",
"attribute": "code",
"description": "A data to be highlighted and rendered.",
"type": "string"
},
{
"name": "lang",
"attribute": "lang",
"description": "Prism supported language.",
"type": "string"
},
{
"name": "languages",
"description": "Adds languages outside of the core Prism languages.\n\nPrism includes a few languages in the core library:\n - JavaScript\n - Markup\n - CSS\n - C-Like\nUse this property to extend the core set with other Prism\ncomponents and custom languages.\n\nExample:\n ```\n <!-- with languages = {'custom': myCustomPrismLang}; -->\n <!-- or languages = Prism.languages; -->\n <prism-highlighter languages=\"[[languages]]\"></prism-highlighter>\n ```"
},
{
"name": "raw",
"attribute": "raw",
"description": "When set it ignores syntax highlighting and only renders the code.",
"type": "boolean"
}
],
"events": [
{
"name": "url-change-action"
},
{
"name": "prism-highlight-parsed"
}
]
}
]
}