'how can i get the choose file and converted urls on click save button of image upload dialog modal in TINYMCE
<Editor
initialValue=""
value={value}
onInit={handleInit}
onEditorChange={handleUpdate}
onBeforeAddUndo={handleBeforeAddUndo}
init={{
selector: "textarea#file-picker",
file_browser_callback_types: "image",
file_picker_validator_handler: filePickerValidationCallback,
images_dataimg_filter: function (img) {
return !img.hasAttribute("internal-blob"); // blocks the upload of <img> elements with the attribute "internal-blob".
},
file_picker_callback: filePickerCallback,
file_browser_callback: function (field_name, url, type, win) {
console.log("file_browser_callback", field_name, url);
},
automatic_uploads: true,
pagebreak_separator: `<div class="page-break" style="page-break-after:always;"><span style="display:none;"> </span></div><p> </p>`,
plugins: [
"imagetools lists link image paste wordcount pagebreak image code fullscreen",
],
draggable_modal: true,
toolbar:
"fullscreen | code image pagebreak undo redo | formatselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent",
}}
/>;
the above code was my configuration for editor and image upload. i am getting data while input onchange but i need to get the callback and image data on save button event.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
