【发布时间】:2018-03-04 18:41:36
【问题描述】:
我在我的 angular 5 项目中使用 TinyMCE 编辑器,并且想要处理图像上传,我目前无法做到这一点。 这是我当前的代码:
<editor
name="questionStatement"
apiKey="somekey"
[init]='{
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 colorpicker textpattern"
],
toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
past_date_images: true,
external_plugins: { tiny_mce_wiris: "https://www.wiris.net/demo/plugins/tiny_mce/plugin.js" },
toolbar: "tiny_mce_wiris_formulaEditor, tiny_mce_wiris_formulaEditorChemistry"
}'
</editor>
我正在关注此代码示例 https://codepen.io/nirajmchauhan/pen/EjQLpV 来处理图片上传。我不明白,我如何将file_picker_callback 函数以角度传递给编辑器?
有没有其他方法,我应该如何处理图片上传?
我已尝试阅读文档,但找不到任何内容。我已经被这个问题困扰了很长时间,如果有人能够帮助我解决这个问题,那就太好了。
【问题讨论】:
标签: angular tinymce angular5 tinymce-4