Mat*_*att 5 javascript tinymce angularjs angular-ui
我正在使用角度ui tinymce扩展.我想知道如何设置以下设置,我可以在常规JavaScript中执行.
tinymce.init({
selector: "textarea",
height: 250,
theme: "modern",
plugins: [
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons template paste textcolor"
],
toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media | forecolor backcolor emoticons",
image_advtab: true,
templates: [
{ title: 'Test template 1', content: 'Test 1' },
{ title: 'Test template 2', content: 'Test 2' }
]
});
Run Code Online (Sandbox Code Playgroud)
不确定如何使用设置
$scope.tinymceOptions =
{
setup: function (ed) {
ed.onInit.add(function(ed) {
//SOME INITIALIZING CODE HERE
});
}
Run Code Online (Sandbox Code Playgroud)
任何与设置tinymceOptions有关的帮助将不胜感激.
调节器
var app = angular.module('BDA', ['ui.tinymce']);
app.controller('PostCtrl', function ($scope, $http) {
$scope.tinymceOptions = {
theme: "modern",
plugins: [
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons template paste textcolor"
],
toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
toolbar2: "print preview media | forecolor backcolor emoticons",
image_advtab: true,
height: "200px",
width: "650px"
};
});
Run Code Online (Sandbox Code Playgroud)
HTML
<div ng-controller="PostCtrl">
<textarea ui-tinymce="tinymceOptions" ng-model="tinymceModel"></textarea>
</div>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6415 次 |
最近记录: |