Я использую угловое расширение ui tinymce. Я хотел бы знать, как установить следующий параметр, который я могу сделать в обычном JavaScript.Угловой UI TinyMCE: Как установить настройки по умолчанию
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' }
]
});
Не знаю, как использовать установку
$scope.tinymceOptions =
{
setup: function (ed) {
ed.onInit.add(function(ed) {
//SOME INITIALIZING CODE HERE
});
}
Любой помощь по настройке tinymceOptions будет оценен.
Положи в директиве. Ознакомьтесь с директивой Angularjs. – zsong