SoFunction
Updated on 2025-04-07

FCKeditor does not display problems in chrome

Some people on the Internet say that the following modification is OK, but it also depends on what system you are using. The level of the programmer determines the compatibility issue, but you can try it.

= true ; // This is a temporary property, while Safari support is under development.


After modifying false to true, it will display normally.

It should be a problem with the kernel WebKit used by Chrome, and it is necessary to modify the support of safari.

It is recommended that programmers should pay attention to browser compatibility issues when developing in the future.

fckeditor does not display any problem
No format, please refer to it

<html>
<head> 
<script src=/fckeditor/"></script>
</head>
<body>
<form action="" method="post" target="_blank"> 
<script>
var editor = new FCKeditor('message');
='/fckeditor/';
=280;
='Default';
();
</script>
<input type="submit" value="submit" name="button">
</form>
</body>
</html>


FCKeditor is not displayed, a blank page appears
The road is problematic. Set the relative path of fck in it

<appSettings>
<add key="FCKEditor:BasePath" value="/FCKeditor"/>
<add key="FCKeditor:UserFilesPath" value="/UploadFiles/"/>
</appSettings>

The above is the relative path where your Fck is located

The following is the folder path of the FK upload file. However, I got a background today because it was the boss book, and he used php to determine the current browser and version, and editing under chrome will not appear. You need to modify the function.

The original function

function IsCompatible()
	{
		global $HTTP_USER_AGENT ;

		if ( isset( $HTTP_USER_AGENT ) )
			$sAgent = $HTTP_USER_AGENT ;
		else
			$sAgent = $_SERVER['HTTP_USER_AGENT'] ;

		if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
		{
			$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
			return ($iVersion >= 5.5) ;
		}
		else if ( strpos($sAgent, 'Gecko/') !== false )
		{
			$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
			return ($iVersion >= 20030210) ;
		}
		else
			return false ;
	}

Modified functions

function IsCompatible()
	{
		global $HTTP_USER_AGENT ;

		if ( isset( $HTTP_USER_AGENT ) )
			$sAgent = $HTTP_USER_AGENT ;
		else
			$sAgent = $_SERVER['HTTP_USER_AGENT'] ;

		if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
		{
			$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
			return ($iVersion >= 5.5) ;
		}
		else if ( strpos($sAgent, 'Gecko/') !== false )
		{
			$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
			return ($iVersion >= 20030210) ;
		}
		else if ( strpos($sAgent, 'Chrome') !== false )
		{
			return 1;
		}
		else
			return false ;
	}

After testing, it will be displayed normally and solve the problem. Another problem is that you cannot use getYear to get dates under chrome. GetFullYear() is required, but there are also better solutions. You can refer to it.This articlearticle.