FCK判断内容是否为空(如果只是去空格,那么这种方式是错误的)
在网上找到一段合适的代码,与大家分享。 实现代码如下: //判断fck的内容是否为空 var oEditor = FCKeditorAPI.GetInstance('content'); //这里的content是FCK的ID值 if(GetLength("content")<=0) { al
在网上找到一段合适的代码,与大家分享。 实现代码如下: //判断fck的内容是否为空 var oEditor = FCKeditorAPI.GetInstance('content'); //这里的content是FCK的ID值 if(GetLength("content")<=0) { al
实现代码如下:function abc() { var checkContent =FCKeditorAPI.GetInstance("editor");//获取实例 alert(checkContent.GetXHTML());//获取当前内容 var newelement = document.
实现代码如下: display(); $obj1 = Singleton::getInstance(); var_dump(($obj === $obj1));
有时我们需要在一个页面上使用多个Fck的实例,首先需要按照id获取fck的实例。例如: 实现代码如下: 使用FCKeditorAPI.GetInstance获取Fck实例。 实现代码如下: function FCKeditor_OnComplete(editorInstance) { oEdite
content相当于你例子中的FCKeditor1。 实现代码如下: //获取格式化的编辑器内容 function getEditorContents(){ var oEditor = FCKeditorAPI.GetInstance("content"); alert(oEditor.GetXHT
利用Javascript取和设FCKeditor值也是非常容易的,如下: // 获取编辑器中HTML内容 function getEditorHTMLContents(EditorName) { var oEditor = FCKeditorAPI.GetInstance(EditorName);
获取FCK的实例 FCKeditorAPI是FCKeditor加载后注册的一个全局对象,利用它我们就可以完成对编辑器的各种操作。 在当前页获得 FCK 编辑器实例: var Editor = FCKeditorAPI.GetInstance('InstanceName'); 从 FCK 编辑器的弹出
content相当于你例子中的FCKeditor1。 实现代码如下: //获取格式化的编辑器内容 function getEditorContents(){ var oEditor = FCKeditorAPI.GetInstance(“content”); alert(oEditor.GetXHT
实现代码如下:var editor = FCKeditorAPI.GetInstance("content"); editor.EditorDocument.body.innerHTML="";
形式如: 实现代码如下: varoEditor=FCKeditorAPI.GetInstance('content'); varcontent=oEditor.GetXHTML(true);************************************************* 利用Jav