Change TinyMCE Default Image Dimension
After selecting an Image from 'Image list', there shows the image 'Preview' and a 'Dimensions' dropdown, with default value 'Original' selected. How do I set selected default to 'Preview (400x400)' and therefore have 'myPhoto.png开发者_C百科/image_preview' for HTML content.
Look inside the TinyMCE egg at Products/TinyMCE/skins/tinymce/plugins/ploneimage/ploneimage.htm.pt
Change this line (95):
<option tal:repeat="item portal_tinymce/getImageScales" tal:attributes="value item/value" tal:content="item/title" />
to:
<option tal:repeat="item portal_tinymce/getImageScales" tal:attributes="value item/value; selected python: 'Preview' in item['title']" tal:content="item/title" />
TinyMCE use Plone global image handling settings for image scaling/tag render. Look for it at Controlpanel > Image handling.
Url address should be $YOUR_PLONE_URL/@@imaging-controlpanel
精彩评论