All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.polymer.marked.element.MarkedElementElement Maven / Gradle / Ivy

There is a newer version: 1.9.3.1
Show newest version
/*
 * This code was generated with Vaadin Web Component GWT API Generator, 
 * from marked-element project by The Polymer Project Authors (https://polymer.github.io/AUTHORS.txt)
 * that is licensed with https://polymer.github.io/LICENSE.txt license.
 */
package com.vaadin.polymer.marked.element;

import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.core.client.js.JsProperty;
import com.google.gwt.core.client.js.JsType;

/**
 * 

Element wrapper for the marked library.

*

<marked-element> accepts Markdown source either via its markdown attribute:

*
<marked-element markdown="`Markdown` is _awesome_!"></marked-element>
 * 
 * 
 * 

Or, you can provide it via a <script type="text/markdown"> element child:

*
<marked-element>
 *   <script type="text/markdown">
 *     Check out my markdown!
 * 
 *     We can even embed elements without fear of the HTML parser mucking up their
 *     textual representation:
 * 
 *     ```html
 *     <awesome-sauce>
 *       <div>Oops, I'm about to forget to close this div.
 *     </awesome-sauce>
 *     ```
 *   </script>
 * </marked-element>
 * 
 * 
 * 

Note that the <script type="text/markdown"> approach is static. Changes to
the script content will not update the rendered markdown!

*/ @JsType public interface MarkedElementElement extends HTMLElement { public static final String TAG = "marked-element"; public static final String SRC = "marked-element/marked-element.html"; /** *

The markdown source that should be rendered by this element.

* * JavaScript Info: * @property markdown * @type String * */ @JsProperty String getMarkdown(); /** *

The markdown source that should be rendered by this element.

* * JavaScript Info: * @property markdown * @type String * */ @JsProperty void setMarkdown(String value); /** *

Renders markdown into this element’s DOM.

*

This is automatically called whenever the markdown property is changed.

*

The only case where you should be calling this is if you are providing
markdown via <script type="text/markdown"> after this element has been
constructed (or updating that markdown).

* * JavaScript Info: * @method render * */ void render(); /** *

Renders markdown to HTML when the element is attached.

*

This serves a dual purpose:

*
    *
  • Prevents unnecessary work (no need to render when not visible).

    *
  • *
  • attached fires top-down, so we can give ancestors a chance to
    register listeners for the syntax-highlight event before we render
    any markdown.

    *
  • *
* * JavaScript Info: * @method attached * */ void attached(); /** * * * JavaScript Info: * @method detached * */ void detached(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy