marked-element
This element is compatible with Polymer 0.5 and lower only, and will be deprecated.
You can check out a similar 0.8-compatible version of this element at https://github.com/polymerelements/marked-element
Element interface to the marked library
This element is compatible with Polymer 0.5 and lower only, and will be deprecated.
You can check out a similar 0.8-compatible version of this element at https://github.com/polymerelements/marked-element
Need to add below else to textChanged. Otherwise previous value of innerHTML is displayed.
textChanged: function (oldVal, newVal) {
if (newVal) {
this.innerHTML = marked(this.text);
} else {
this.innerHTML = "";
}
},
Hello. As I was doing a demo for a presentation, getting issues from github and taking their body and using the marked-element to print the markdown.
Unexpectedly, it executed the code and changed my app in Chrome (altough in Firefox it did not).
The example I used is actually from a polymer issue from the github api, so this code should show the error:
<html>
<head>
<base href="http://polygit.org/polymer+:master/components/">
<link href="polymer/polymer.html" rel="import">
<link href="marked-element/marked-element.html" rel="import">
<link href="iron-ajax/iron-ajax.html" rel="import">
</head>
<body unresolved>
<template is="dom-bind" id="app">
<iron-ajax url="https://api.github.com/repos/Polymer/polymer/issues/2481" last-response="{{issue}}" auto></iron-ajax>
<marked-element markdown="{{issue.body}}">
<div class="markdown-html"></div>
</marked-element>
</template>
</body>
</html>
All of it.
From @ethancalvo on September 25, 2015 13:17
it appears all the marked-elements with a class of iron-doc-viewer have the hidden class applied to the content node.
This is making dev a bit more time-consuming.
Copied from original issue: Polymer/polymer#2478
Strictly nice-to-have for parity with embedded markdown; using attributes works great now, thank you.
http://plnkr.co/edit/GHMJPsyB7EQVkEvaK5uW
In installing marked I noticed that the marked dependency is installed as a sibling of this element (they are both installed under bower_components). Is there a reason for this?
I think that marked should live inside marked-element to make dependency management and possible vulcanization better.
Thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.