ThinkPHP3.0 correct configuration method for using Baidu ueditor... When using Baidu ueditor and configuring according to articles on Baidu, the editor may encounter problems that cannot be used by controls. by following my methods, the editor can be fully enabled. Configure the file upload path ...... Step 1: Download ueditor and put it in the Public folder .? Step 2: Configure ueditor? The editor_config.js file ?? ThinkPHP3.0 correct configuration method for using Baidu ueditor...
When using Baidu ueditor and configuring according to articles on Baidu, the editor may encounter problems that cannot be used by controls. by following my methods, the editor can be fully enabled.
Configure the file upload path ......
Step 1: Download ueditor and put it in the Public folder.
?
Step 2: Configure ueditor? Editor_config.js file
?
?
URL = window. UEDITOR_HOME_URL | tmp. substr (0, tmp. lastIndexOf ("\/") + 1 ). replace ("_ examples /",""). replace ("website/", ""); // you can configure the relative or absolute path of the ueditor directory on your website (the absolute path starting with http) // change to relative path... URL = window. UEDITOR_HOME_URL | "/Public/ueditor /";?
Step 3: Reference ueditor and write the following code in the template file you want to use ueditor:
?
The default import method of ThinkPHP is directly under the Public Directory. do not write the suffix
Step 4: set the rules for storing Model. class. php files:
?
?
Array ('text', 'htmldecode', 3, 'callback'), // The automatic completion rule of the ThinkPHP3 text field // text escape function htmldecode () {if (! Empty ($ _ POST ['text']) {$ contents = htmlspecialchars (stripslashes ($ _ POST ['text']); return $ contents ;}}?
Step 5: HTML page application and data extraction
?
?
{$ List. text | htmlspecialchars_decode}