当前位置:编程学习 > C#/ASP.NET >>

Fckeditor运行后,点击插入图片或连接图标,弹出html代码,无法使用

最近碰到这个问题,烦人

[img=http://club.9kweb.com/handler.aspx?max_handler=down&action=attach&mode=image&id=2896&s=1][/img]
--------------------编程问答-------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
 *
 * This page is used by all dialog box as the container.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<script type="text/javascript">
// <![CDATA[

// Domain relaxation logic.
(function()
{
var d = document.domain ;

while ( true )
{
// Test if we can access a parent property.
try
{
var parentDomain = ( Args().TopWindow || E ).document.domain ;

if ( document.domain != parentDomain )
document.domain = parentDomain ;

break ;
}
catch( e ) {}

// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
d = d.replace( /.*?(?:\.|$)/, '' ) ;

if ( d.length == 0 )
break ; // It was not able to detect the domain.

document.domain = d ;
}
})() ;

var E = frameElement._DialogArguments.Editor ;

// It seems referencing to frameElement._DialogArguments directly would lead to memory leaks in IE.
// So let's use functions to access its members instead.
function Args()
{
return frameElement._DialogArguments ;
}

function ParentDialog( dialog )
{
return dialog ? dialog._ParentDialog : frameElement._ParentDialog ;
}

var FCK = E.FCK ;
var FCKTools = E.FCKTools ;
var FCKDomTools = E.FCKDomTools ;
var FCKDialog = E.FCKDialog ;
var FCKBrowserInfo = E.FCKBrowserInfo ;
var FCKConfig = E.FCKConfig ;

// Steal the focus so that the caret would no longer stay in the editor iframe.
window.focus() ;

// Sets the Skin CSS
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinDialogCSS ) ) ;

// Sets the language direction.
var langDir = E.FCKLang.Dir ;

// For IE6-, the fck_dialog_ie6.js is loaded, used to fix limitations in the browser.
if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 )
document.write( '<' + 'script type="text/javascript" src="' + FCKConfig.SkinPath + 'fck_dialog_ie6.js"><' + '\/script>' ) ;

FCKTools.RegisterDollarFunction( window ) ;
--------------------编程问答-------------------- 以前都好好的,可能服务器设置改变了还是怎么的,本来Fckeditor那个控件都是出现html代码的,但是找了网上的文章,
解决方法是:修改文件FCKEditor\editor\fckeditor.html,在window.onload = function()的函数第一行添加 
FCK.LinkedField.value=FCKTools.HTMLDecode(FCK.LinkedField.value);
管用能显示编辑器了,但是点击插入链接和插入图片按钮则 又是弹出html代码框框,没法插入链接或图片!
--------------------编程问答--------------------
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,