CKeditor里面写内容怎么获取

WBOY
풀어 주다: 2016-06-23 13:46:04
원래의
892명이 탐색했습니다.

这个是调用编辑器的代码 error_reporting(0); 
include './ckeditor/ckeditor.php'; //include ckeditor.php
$ckeditor = new CKEditor;

include './ckfinder/ckfinder.php';
$ckeditor->editor('content');
CKFinder::SetupCKEditor($ckeditor, true, true);

?>

我百度用这样的方法: $editor = CKEDITOR.replace("content");
$content=$editor.getData();

但是输出这样的错误 Notice: Use of undefined constant CKEDITOR - assumed 'CKEDITOR' in D:\xampp\htdocs\belong\add.php on line 5

Fatal error: Call to undefined function replace() in D:\xampp\htdocs\belong\add.php on line 5  求指导,,,纯属PHP菜鸟


回复讨论(解决方案)

一直用js 版本的~

这个可以一句代码获取:
http://www.162100.com/162100editor/

我是用JS版的
提交时直接获取textarea的ID

js:
取值:

var text=CKEDITOR.instances.content.getData();
로그인 후 복사

赋值:
CKEDITOR.instances.text1.setData('你好');
로그인 후 복사

用js版的吧,好用些

用js版的吧,好用些


请问js版的如何获取

var text=CKEDITOR.instances.content.getData();

원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!