But TinyMCE has file uploads baked right in! All that you need to do is implement a handler into your application to enable it. There are different ways to implement file uploads in TinyMCE, the docs have examples that can be used with native PHP and jQuery , but here I will run through the steps of adding the filehandler to a default Laravel installation.
First, is to make sure TinyMCE is loaded in your html. You can self-host the editor by downloading or including it in your dependencies with npm. For simplicity I will just load it from the cdn, don't forget to add your API key.
Next, you need to initialise TinyMCE in your JS file, ensure that the relevant plugins and toolbar options are enabled and use Axios to handle the file upload to the server. Here is the most basic example that I have added to the default app.
Asked 4 years, 9 months ago. Active 4 years, 9 months ago. Viewed 2k times. I have the below code and it is not working. Images below. Image of file choser If i were to open one of these files they would not be in tinymce textarea Improve this question. So what in particular is not working? You have provided no actual details.
Please review How to ask a good question: stackoverflow. Michael, in order to make it more clear what the issue is I added more detail towards the end of my post. Thank you for reviewing my problem and I look forward to your feedback and assistance. Well your code appears to do nothing with the selected file so I would not expect it to "appear" in the editor.
Have you seen this: tinymce. Michael, yes, I have seen the file-picker demo. That is for image files, and I want to do. HTML and. XML files. Add a comment. Active Oldest Votes. A simple file picker won't do everything you need. Improve this answer. Michael Fromin Michael Fromin So probably jQuery or ajax for upload UI right? There are many ways to get it done but using AJAX would be a pretty basic requirement.
Sign up or log in Sign up using Google.
0コメント