|
<div class="cols-sample-area" style="height:400px;position:relative;">
<textarea id="rteSample" ej-rte e-width="100%" e-value="rteValue" e-minWidth="150px"></textarea>
<br />
<button id="btnOpen" ej-button e-click="openDialog">Open Dialog</button>
<div id="dialog" ej-dialog e-title="RTE content" e-close="closeDialog" e-target=".cols-sample-area" e-showOnInit="false">
<span class="label_value" ng-bind-html="rteValue">{{rteValue}}</span>
</div>
</div>
<script type="text/javascript">
angular.module('syncApp', ['ejangular']).controller('syncCtrl', function ($scope) {
$scope.rteValue = "<b>Description</b>: The Rich Text Editor (RTE) control is an easy to render in client side.";
$scope.openDialog = function (args) {
$("#btnOpen").hide();
var rteObj = $("#rteSample").data("ejRTE");
$("#dialog").ejDialog("open");
$("#dialog").ejDialog("setContent",rteObj.getHtml()); // setting content to the Dialog
}
$scope.closeDialog=function(args) {
$("#btnOpen").show();
}
});
</script>
|