Ember Tiny MCE
Ember Tiny MCE
by cyclomarc
HTML
<script src="http://libraries.azurewebsites.net/js/bootstrap-2.3.2.js"></script>
<script src="http://libraries.azurewebsites.net/js/moment-2.1.0.js"></script>
<script src="http://libraries.azurewebsites.net/js/handlebars-1.0.0-rc.4.js"></script>
<script src="http://libraries.azurewebsites.net/js/ember-1.0.0-rc.6.js"></script>
<script src="http://libraries.azurewebsites.net/js/ember-data.js"></script>
<link rel="stylesheet" href="http://libraries.azurewebsites.net/css/bootstrap-2.3.2.css">
<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script type="text/x-handlebars">
<h2>Tiny MCE</h2>
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="index">
<form method="post" action="somepage">
App.IndexController.bodyText value:</br>
{{bodyText}}
</br></br>
Bound to Ember.TextField:<br>
{{view Ember.TextField valueBinding='bodyText'}}
</br></br>
Bound to Ember.TextArea:</br>
{{view Ember.TextArea valueBinding='bodyText'}}
</form>
</script>
JavaScript
var App = Ember.Application.create({
LOG_TRANSITIONS: true
});
App.Router.map(function () {});
App.IndexRoute = Ember.Route.extend({ });
App.IndexController = Ember.Controller.extend({
bodyText: '...'
});
App.IndexView = Ember.View.extend({
didInsertElement: function(){
tinymce.init({
selector: "textarea"
});
}
});