com.vaadin.polymer.prism.PrismHighlighterElement Maven / Gradle / Ivy
The newest version!
/*
* This code was generated with Vaadin Web Component GWT API Generator,
* from prism-element project by The Polymer Project Authors (https://polymer.github.io/AUTHORS.txt)
* that is licensed with http://polymer.github.io/LICENSE.txt license.
*/
package com.vaadin.polymer.prism;
import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
/**
* Syntax highlighting via Prism.
* Place a <prism-highlighter>
in your document, preferably as a direct child of
<body>
. It will listen for syntax-highlight
events on its parent element,
and annotate the code being provided via that event.
* The syntax-highlight
event’s detail is expected to have a code
property
containing the source to highlight. The event detail can optionally contain a
lang
property, containing a string like "html"
, "js"
, etc.
* This flow is supported by <marked-element>
.
*/
@JsType(isNative=true)
public interface PrismHighlighterElement extends HTMLElement {
@JsOverlay public static final String TAG = "prism-highlighter";
@JsOverlay public static final String SRC = "prism-element/prism-highlighter.html";
/**
* Adds languages outside of the core Prism languages.
* Prism includes a few languages in the core library:
*
* - JavaScript
* - Markup
* - CSS
* - C-Like
Use this property to extend the core set with other Prism
components and custom languages.
*
* Example:
* <!-- with languages = {'custom': myCustomPrismLang}; -->
* <!-- or languages = Prism.languages; -->
* <prism-highlighter languages="[[languages]]"></prism-highlighter>
*
*
* JavaScript Info:
* @property languages
* @type !Object
*
*/
@JsProperty JavaScriptObject getLanguages();
/**
* Adds languages outside of the core Prism languages.
* Prism includes a few languages in the core library:
*
* - JavaScript
* - Markup
* - CSS
* - C-Like
Use this property to extend the core set with other Prism
components and custom languages.
*
* Example:
* <!-- with languages = {'custom': myCustomPrismLang}; -->
* <!-- or languages = Prism.languages; -->
* <prism-highlighter languages="[[languages]]"></prism-highlighter>
*
*
* JavaScript Info:
* @property languages
* @type !Object
*
*/
@JsProperty void setLanguages(JavaScriptObject value);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy