1
我是Ember中的新成員。新資源中的TinyMCE
我嘗試在我的項目中使用TinyMCE。
<script type="text/x-handlebars">
{{outlet}}
</script>
<script type="text/x-handlebars" id="index">
Hi
</script>
<script type="text/x-handlebars" id="editor">
<form method="post" class="tinymce">
<textarea></textarea>
</form>
</script>
我app.js:
App = Ember.Application.create({});
App.Router.map(function() {
this.resource('editor', function() {
tinymce.init({
selector: ".tinymce",
menubar:false,
statusbar: false,
});
});
});
如果我打開www.site.com/index.html#/editor1 TinyMCE作品。如果www.site.com並單擊鏈接到編輯器TinyMCE不起作用(簡單文本區)。
我嘗試這樣做:
App.TransactionsView = Ember.View.extend({
templateName: 'editor',
didInsertElement: function(){
tinymce.init({
selector: ".tinymce",
menubar:false,
statusbar: false,
});
}
});
沒有。
我該怎麼做?