我有这个字段:
<form (ngSubmit)="postComment()" [formGroup]="commentForm">
<textarea formControlName="comment"></textarea>
...
Run Code Online (Sandbox Code Playgroud)
我想在 div 中显示值:
<div>{{commentForm.controls.comment.???}}</div>
Run Code Online (Sandbox Code Playgroud) 我试图做一个函数file_browser_callback,mais似乎不起作用:
在我的浏览器中:
Uncaught TypeError: a is not a function
Run Code Online (Sandbox Code Playgroud)
功能调用:
function elFinderBrowser (field_name, url, type, win) {
tinymce.activeEditor.windowManager.open({
file:"http://stores-concept:8899/app_dev.php/admin/elfinder/tinycme",
title: "elFinder 2.0",
width: 900,
height: 450,
resizable: 'yes'
}, {
setUrl: function (url) {
win.document.getElementById(field_name).value = url;
}
});
return false;
}
Run Code Online (Sandbox Code Playgroud)
我的小init:
jQuery(document).ready(function($) {
var $configs = {"language":"fr","file_browser_callback":"elFinderBrowser","plugins":"bootstrap code codemirror fullscreen preview table visualblocks link image media","toolbar1":"styleselect | bold italic | fontsizeselect | alignleft aligncenter alignright alignjustify | link image media | bootstrap | code preview","menubar":false,"toolbar_items_size":"small","codemirror":"path: \"CodeMirror\"","script_url":"\/bundles\/whadmin\/js\/plugin\/tinymce\/tinymce.min.js"};
var $textarea …Run Code Online (Sandbox Code Playgroud)