Image Uploader requirements
A server-side upload handler script uploads local images to a remote server. The script must:
This server-side upload handler script must return a JSON object containing a "location" property. This property represents the remote location and filename of the newly uploaded image.
{ location: '/uploaded/image/path/image.png' }
This option allows custom CSS styles to be set as a string. The styles are injected into the head of the page containing the editable area. In TinyMCE’s classic mode, it is injected into the head of TinyMCE’s iframe. In inline mode, it is injected into the head of the page TinyMCE is rendered in.
content_style styles are not saved within TinyMCE’s content. If they are needed for display purposes, ensure the styles are also included in the page the content will be displayed on.
Example: Applying one CSS style using content_style
tinymce.init({ selector: 'textarea', // change this value according to your HTML content_style: 'div { margin: 10px; border: 5px solid red; padding: 3px; }' });
This option allows you to disable the image dimensions input field in the image dialog.
Default value: true
Example: Using image_dimensions
tinymce.init({ selector: 'textarea', // change this value according to your HTML plugins: 'image', toolbar: 'image', image_dimensions: false });
This option allows you to enable the image title input field in the image dialog.
Default value: false
Example: Using image_title
tinymce.init({ selector: 'textarea', // change this value according to your HTML plugins: 'image', toolbar: 'image', image_title: true });