CKeditor里面写内容怎么获取
Jun 23, 2016 pm 01:46 PM 这个是调用编辑器的代码 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();

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel

Simplified HTTP Response Mocking in Laravel Tests

Build a React App With a Laravel Back End: Part 2, React

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon
