mmi*_*mix 3 salesforce visualforce apex-code
随着12年春天的到来,旧的"黑客"转换丰富的编辑器将不再适用.在春季12之后可以做些什么来保留完整的CKEditor功能?
新的CKEditor是对象而不是基于URL的,需要一种新的方法.如果有人需要它,以下脚本将用完整版替换工厂编辑器布局,允许其他格式化选项(字体,颜色等).注意,我将高度设置为600px,根据自己的需要进行调整.此外,和以前一样,这只能在您自己的VF页面中工作,您无法更改"工厂"页面布局的行为.
$(document).ready(function(){
CKEDITOR.on('instanceReady', function(e) {
if (e.editor.config.magic) return;
var target = e.editor.config.bodyId;
var name = e.editor.name;
e.editor.destroy();
CKEDITOR.editorConfig = function( config ) { config.magic = true; }
CKEDITOR.replace(name, {
height : 600,
bodyId : target
});
});
});
Run Code Online (Sandbox Code Playgroud)
结果:

| 归档时间: |
|
| 查看次数: |
5928 次 |
| 最近记录: |