FCKeditor的调试
Debugging 调试
The editor brings you a nice tool that helps you debug your code when customizing it to your needs through plugins or direct changes in the source code. You can enable debugging on it and a debug window will popup with your debugging messages. 这款编辑器提供了一个很不错的调试器,当你需要自定义插件时,或直接修改编辑器的源码时会很有用的。你可以开启调试,然后就可以将你的调试信息输出到一个弹出的调试窗口中。
To enable it just set the following key in the fckconfig.js file or in your custom Configuration File:
要开启调试,可以在配置文件中设置如下的选项:
FCKConfig.Debug = true ;
Debug Output 调试输出
Then, in your code, to show messages in the debug window, you can use the FCKDebug object. It has a single method called "Output" that sends messages to the debug window. This is its syntax:
然后,在你的代码中,可以使用FCKDebug 对象的 "Output" 方法来输出信息到调试窗口。下面是该方法的语法:
FCKDebug.Output( message, color, noParse );
Debug Output Object 要调试输出对象,可以用下面的方法:
FCKDebug.OutputObject( anyObject, color );
你可以在"editor/_source/internals/fckdebug.js" 文件中找到该对象以及他的方法的源码定义。休息,休息哈!