Performs code highlighting on the body of the element
npm install polymer-code-highlighter 
Performs code highlighting on the body of the element. Useful when Source Code (e.g. Java Code) needs to be rendered as part of View.
Demo of how this works is available here
First, make sure you have the npm (packaged with Node.js) installed.
Run sudo npm install --save polymer-code-highlighter to install the Code-Highlighter webcomponent.
`` public String getFirstName(){ public String getLastName(){ html`
Basic code-highlighter demo
class Person {
private firstName = "Vikram";
private lastName = "Rawat";
return firstName;
}
return lastName;
}
}
` js
import { PolymerElement, html } from '@polymer/polymer/polymer-element.js';
import './shared-styles.js';
import '../node_modules/polymer-code-highlighter/code-highlighter.js'
class MyView2 extends PolymerElement {
static get template() {
return html
;
}
}window.customElements.define('my-view2', MyView2);
``