码迷,mamicode.com
首页 > 其他好文 > 详细

修改 CKEditor 超链接的默认协议

时间:2017-07-02 21:12:11      阅读:681      评论:0      收藏:0      [点我收藏+]

标签:log   java   value   class   span   协议   win   ini   content   

在 config.js 中添加如下代码

CKEDITOR.on( ‘dialogDefinition‘, function( ev )
{
		// Take the dialog name and its definition from the event data.
		var dialogName = ev.data.name;
		var dialogDefinition = ev.data.definition;
 
		// Check if the definition is from the dialog window you are interested in (the "Link" dialog window).
		if ( dialogName == ‘link‘ )
		{
			// Get a reference to the "Link Info" tab.
			var infoTab = dialogDefinition.getContents( ‘info‘ );
 
			// Set the default value for the URL field.
			// var urlField = infoTab.get( ‘url‘ );
			// urlField[‘default‘] = ‘www.example.xxxcom‘;
			
			var protocolField = infoTab.get( ‘protocol‘ );
			protocolField[‘default‘] = "";
		}
});

参考:

How Do I Set a Default Value for a CKEditor Dialog Window Field?

 

 

修改 CKEditor 超链接的默认协议

标签:log   java   value   class   span   协议   win   ini   content   

原文地址:http://www.cnblogs.com/forestk/p/7107066.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!