开发者

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.

Change TinyMCE Default Image Dimension


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜