Last active
July 20, 2016 06:45
-
-
Save adriatic/93d2b44ac99bebcb80fac1bf78ca57ca to your computer and use it in GitHub Desktop.
Editor: Api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template > | |
<div id="example"> | |
<div class="box wide"> | |
<div class="box-col"> | |
<h4>Get value</h4> | |
<ul class="options"> | |
<li> | |
<button ak-button click.delegate="getValue()">Get value</button> | |
</li> | |
</ul> | |
</div> | |
<div class="box-col"> | |
<h4>Set value</h4> | |
<ul class="options"> | |
<li> | |
<textarea value.bind="setValueText" style="width: 200px; height: 80px" >new value</textarea> | |
</li> | |
<li> | |
<button ak-button click.delegate="setValue()">Set value</button> | |
</li> | |
</ul> | |
</div> | |
</div> | |
<textarea ak-rich-editor="k-resizable.bind: resizable; k-widget.two-way: editor" | |
style="height:440px"> | |
<p><img src="http://demos.telerik.com/kendo-ui/content/web/editor/kendo-ui-web.png" alt="Editor for ASP.NET MVC logo" style="display:block;margin-left:auto;margin-right:auto;" /></p> | |
<p> | |
Kendo UI Editor allows your users to edit HTML in a familiar, user-friendly way.<br /> | |
In this version, the Editor provides the core HTML editing engine, which includes basic text formatting, hyperlinks, lists, | |
and image handling. The widget <strong>outputs identical HTML</strong> across all major browsers, follows | |
accessibility standards and provides API for content manipulation. | |
</p> | |
<p>Features include:</p> | |
<ul> | |
<li>Text formatting & alignment</li> | |
<li>Bulleted and numbered lists</li> | |
<li>Hyperlink and image dialogs</li> | |
<li>Cross-browser support</li> | |
<li>Identical HTML output across browsers</li> | |
<li>Gracefully degrades to a <code>textarea</code> when JavaScript is turned off</li> | |
</ul> | |
<p> | |
Read <a href="http://docs.telerik.com/kendo-ui">more details</a> or send us your | |
<a href="http://www.telerik.com/forums/">feedback</a>! | |
</p> | |
</textarea> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Api { | |
resizable = { | |
content: false, | |
toolbar: true | |
}; | |
getValue() { | |
alert(`${this.editor.value()}`); | |
} | |
setValue() { | |
this.editor.value(this.setValueText); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Aurelia KendoUI bridge</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.common.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.rtl.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.default.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.mobile.all.min.css"> | |
<script src="https://kendo.cdn.telerik.com/2016.1.226/js/jszip.min.js"></script> | |
</head> | |
<body aurelia-app="main"> | |
<h1>Loading...</h1> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script> | |
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-kendoui-bundles/0.3.5/config2.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.developmentLogging() | |
.plugin('aurelia-kendoui-bridge', kendo => kendo.pro()); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment