Save image with Tinymce - tinymce

I implemented Tinymce on a website and it's being used as a content editor by the owner of the website (the content is saved in a .txt file). I would like to know if it is possible to save an image uploaded in the tinymce editor into a specific folder on the server.
Thanks!

You'll be able to choose a specific location for image uploading using the images_upload_url property. You can read more on that and our Image Uploading API here: https://www.tinymce.com/docs/configure/file-image-upload/

Related

TinyMCE 5 - Is there a way to accept only uploaded Image, using the "image" plugin?

I want to allow uploaded images only, not images linked from external websites. Is there a way to only display the "Upload" section of the "image" plugin/dialog?
The image plugin does not have a built in configuration option to do what you want. As TinyMCE is released under an open source license you could certainly modify the code of that plugin to get your desired outcome.

TinyMCE 4.3 - how to get Image Tools to save edited images as files

I don't manage to get the Image Tools plugin to actually upload the images to the server. I upload images with the jbimages plugin with no problem. But when a picture is edited with the Image Tools, although there's the uploading bar, which gets to 100%, it seems that it's only uploaded as a blob. The page calls the tinymce.activeEditor.uploadImages() function when submitting the form data, but it doesn't work.
I use the 'postacceptor.php' file from the example (defined in 'images_upload_url') and the 'images_upload_base_path' is defined as well.
The files are not uploaded to the server, and the img src remains a blob.
What could the problem be?
Thanks!
What debugging have you done in your PHP code? Is the code being triggered? Does the file appear in the posted content? You need to narrow down where in the process things are failing.
Is the issue that TinyMCE is not posting the edited image or is the issue that the image is posted and the PHP code is not properly saving the image and returning valid JSON?
How did you configure TinyMCE?
Does an edited image get posted to your server code?
What is in that form post?
If you disable the jbImages plugin does that change anything?
Without more details it will be very difficult to help you figure this out.

How to show the uploaded file in File picker in Moodle?

Hi I am working with Moodle 2.9.1. Here I have a form for upload a question and an answer file. I successfully upload the answer file to a location and inserted the question text and answer file name in database.
Now I want to edit the question, while editing the question the already uploaded file will be shown in the file picker area.
How can I show the uploaded file in filepicker area??
For text editor I can use
$mform->addElement('editor', 'desc', get_string('description'));
$mform->setDefault('desc', array('text'=>$defaulttext));
Please help me..
The filepicker element is used for uploading a single one-off file, that will be processed (and then, usually, discarded). If you are wanting a file that remains part of the Moodle storage and will reappear when you reopen the form, then you should use a filemanager (and restrict to a single file, if needed).
There are details in the Moodle docs about how to use this https://docs.moodle.org/dev/Using_the_File_API_in_Moodle_forms#filemanager (including re-populating the 'draft files' area when you load the form).

How to create custom metadata tag for CQ

I am trying to create a custom metadata tag for all JPEG images. Following the documentation this is what I did in /apps
However, when I upload a new JPEG file I don't see the tag I've added (Atest)
Am I missing something? I copied /libs/dam/content to /apps/dam/content and just kept the assetededitors folder and I modified the formitems under the image/jpeg folder as shown in the screenshot.
The asseteditors node allows you to change the classic DAM metadata editor, available under the /damadmin. The screenshot attached in the comment presents new touch UI which can be enhanced using Javascript as in this article.

Upload images with tinyMce

I have this plugin advImage which I use in tinyMce. I want the user to be able to upload images from his own computer. However, the plugin only allows images which are on the server to be uploaded. How can I change this? If I choose an image from my desktop for uploading, the path is Content/documents/editorImages/myImage.jpg. How to change this?
This might be what you are looking for. Give it a try.
There exists a plugin named MCImageManager from the developers of tinymce, but this is not free.