<script>
var route_prefix = "{{ url(config('lfm.prefix')) }}";
var token = '{{Session::token()}}';
var urlEdit = '{{route('edit')}}';
var urlLike = '{{route('like')}}';
var editor_config = {
path_absolute : "",
selector: "textarea[name=body]",
plugins: [
"link image"
],
relative_urls: false,
height: 329,
file_browser_callback : function(field_name, url, type, win) {
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
var y = window.innerHeight|| document.documentElement.clientHeight|| document.getElementsByTagName('body')[0].clientHeight;
var cmsURL = editor_config.path_absolute + route_prefix + '?field_name=' + field_name;
if (type == 'image') {
cmsURL = cmsURL + "&type=Images";
} else {
cmsURL = cmsURL + "&type=Files";
}
tinyMCE.activeEditor.windowManager.open({
file : cmsURL,
title : 'Filemanager',
width : x * 0.8,
height : y * 0.8,
resizable : "yes",
close_previous : "no"
});
}
};
tinymce.init(editor_config);
</script>
我的文字区域看起来像这样
<textarea class="form-control" name="body" id="new-post" rows="50"
placeholder="new post">
</textarea>
答案 0 :(得分:0)
tinymce没有这样的内置限制。您将不得不寻找系统的其他组件。可以在那里找到限制。