默認CKEditor的變焦插件未包裹在IE10瀏覽器CKEditor的放大插件:文本不上纏繞變焦
0
A
回答
0
CKEDITOR.plugins.add('zoom',
{
requires : [ 'richcombo' ],
init : function(editor)
{
var config = editor.config;
// Inject basic sizing for the pane as the richCombo doesn't allow to specify it
var node = CKEDITOR.document.getHead().append('style');
node.setAttribute('type', 'text/css');
var content = '.cke_combopanel__zoom { height: 200px; width: 100px; }' +
'.cke_combo__zoom .cke_combo_text { width: 40px;}';
if (CKEDITOR.env.ie && CKEDITOR.env.version<11)
node.$.styleSheet.cssText = content;
else
node.$.innerHTML = content;
editor.ui.addRichCombo('Zoom',
{
label : 'Zoom',
title : 'Zoom',
multiSelect : false,
className : 'zoom',
modes:{wysiwyg:1,source:1 },
panel :
{
css : [ CKEDITOR.skin.getPath('editor') ].concat(config.contentsCss)
},
init : function()
{
var zoomOptions = [50, 75, 100, 125, 150, 200, 400],
zoom;
this.startGroup('Zoom level');
// Loop over the Array, adding all items to the combo.
for (var i = 0 ; i < zoomOptions.length ; i++)
{
zoom = zoomOptions[ i ];
// value, html, text
this.add(zoom + "", zoom + " %", zoom + " %");
}
// Default value on first click
this.setValue("100", "100 %");
},
onClick : function(sValue)
{
var body = editor.editable().$;
var value = parseInt(sValue);
body.style.MozTransformOrigin = "top left";
body.style.MozTransform = "scale(" + (value/100) + ")";
body.style.WebkitTransformOrigin = "top left";
body.style.WebkitTransform = "scale(" + (value/100) + ")";
body.style.OTransformOrigin = "top left";
body.style.OTransform = "scale(" + (value/100) + ")";
body.style.TransformOrigin = "top left";
body.style.Transform = "scale(" + (value/100) + ")";
// IE
body.style.zoom = value/100;
this.setValue(sValue, sValue + " %");
this.lastValue = sValue;
},
onRender: function() {
editor.on('mode', function(ev) {
// Restore zoom level after switching from Source mode
if (this.lastValue)
this.onClick(this.lastValue);
}, this);
}
});
// End of richCombo element
} //Init
});
+0
這不起作用,文本內容不包裝我們正在獲取x和y滾動條。 – 2015-04-02 13:46:54
+0
@Alfonsoml你可以在這個問題上幫助santosh。 – user3800528 2015-04-17 14:19:53
相關問題
- 1. 纏繞或不纏繞
- 2. 線上纏繞純HTML文本標籤
- 3. Bootstrap 3圍繞圖像纏繞文本
- 4. 纏繞的div
- 5. Powershell在導入時纏繞文本行
- 6. pypi上傳錯誤:纏繞
- 7. CSS線纏繞
- 8. 如何在ActiveReports 7中的圖像上纏繞文本?
- 9. mediaelements.js mp3不能纏繞
- 10. 按鈕不纏繞內容
- 11. 環形纏繞(x和y纏繞)2D陣列上一組位置的質心?
- 12. Bootstrap拉列纏繞
- 13. CKEditor插件不在插件文件夾
- 14. 文本溢出問題和文本非纏繞
- 15. 的iOS纏繞圖像
- 16. 纏繞無法上傳到pypi.org
- 17. CKEDITOR:如何創建一個插件變焦
- 18. 焦點事件不使用CKEditor從文本框觸發
- 19. 列不纏繞浮動元素
- 20. Flexbox - 圖像溢出而不是纏繞
- 21. 防止表格纏繞
- 22. 纏繞位置:相對
- 23. 錯誤與纏繞:SSLError:HTTPSConnectionPool
- 24. uiwebview纏繞長詞問題
- 25. CKEDITOR插件 - 驗證文本字段
- 26. CKEDITOR - 在CKEDITOR上安裝Coops插件
- 27. CKEditor - 插入文本setData後不工作
- 28. CKEDITOR,文本編輯器上的自動對焦onLoad
- 29. 在flex中,如何在圖像周圍纏繞文本?
- 30. xcode swift如何在圖像周圍纏繞文本
什麼問題縮放內容? – 2015-04-02 12:13:57
我們有默認的ckeditor縮放插件,當我們嘗試使用縮放插件時,文本內容不包裹在窗口中。我們正在獲得x和y滾動條。 – 2015-04-02 12:35:40
Zoom由CKEditor團隊維護。您應該向[插件](http://ckeditor.com/addon/zoom)的作者報告錯誤。 – oleq 2015-04-02 14:56:05