后台编辑文章,插入图片,插入文章链接提供下载

function insertFile(value){
	var oEditor = CKEDITOR.instances.content;
	if ( oEditor.mode == 'wysiwyg' )
	{
		// Insert the desired HTML.
		oEditor.insertHtml( "<a href='upload_file/"+value+"'>"+value+"</a>" );
	}
	else
		alert( 'You must be on WYSIWYG mode!' );
}
function insertImage(value){
	var oEditor = CKEDITOR.instances.content;
	if ( oEditor.mode == 'wysiwyg' )
	{
		// Insert the desired HTML.
		oEditor.insertHtml( "<img src='upload_image/"+value+"' title='"+value+"'>" );
	}
	else
		alert( 'You must be on WYSIWYG mode!' );
}

 

你可能感兴趣的:(下载)