You are here

README.txt in UEditor - 百度编辑器 7.2

Same filename and directory in other branches
  1. 8 README.txt
  2. 7.3 README.txt
  3. 7 README.txt
DESCRIPTION
----------------
UEditor(百度编辑器) is Baidu web front-end R & D department developed
WYSIWYG rich text web editor, with a lightweight, customizable,
and focus on user experience and other characteristics,
the open source BSD license, allowing free use and modify the code.

I have used many editors, but ultimately I think UEditor is the 
best, so I want more people to know and use it.

if you have any question about this module, please create a 
issue and let me know, I will always always always ...keep 
actively maintained, enjoy!

Demo: http://ueditor.baidu.com/website/onlinedemo.html
The demo is chinese, You can use the English version on your download.

Installation
-------------
1. Download the ueditor in
http://ueditor.baidu.com/website/index.html.
2. Unzip it into sites/all/libraries,
so that there's like sites/all/libraries/ueditor/ueditor.all.js.
3. Do like this https://drupal.org/node/2286333
4. Enabled ueditor module.
5. Go to admin/people/permissions and grant permission to any roles that need to be 
able to upload file with ueditor.
6. Add ueditor for Wysiwyg profile at admin/config/content/wysiwyg 
7. Configure the module at admin/config/content/ueditor (Optional)

Known Issues
-----------------
https://drupal.org/node/2286333
https://drupal.org/node/2286537

Form Textarea Field
-----------------------

if you want to use ueditor to your custom form with form API, there is 
a simple example:

Form:

function MY_MODULE_example_form($form, &$form_state){
  $form['ueditor_example'] = array(
    '#type' => 'text_format',
    '#title' => 'Ueditor Example',
    '#format' => 'full_html',
  );
}

Form submit:

function MY_MODULE_example_form_submit($form, &$form_state){
  preg_match_all('/(.*?(src|href)=["|\'])(.*?)["|\']/ms',
  $form_state['values']['ueditor_example']['value'], $matchs);
  if(isset($matchs[3])){
    ueditor_file_register($matchs[3], $form_state['values']['form_id'], 'ueditor_example', '');       
  }
  ...

  Do some thing

  ...
}

Tips: The official website of the Chinese,
You can use the google translation, the operation so easy.

File

README.txt
View source
  1. DESCRIPTION
  2. ----------------
  3. UEditor(百度编辑器) is Baidu web front-end R & D department developed
  4. WYSIWYG rich text web editor, with a lightweight, customizable,
  5. and focus on user experience and other characteristics,
  6. the open source BSD license, allowing free use and modify the code.
  7. I have used many editors, but ultimately I think UEditor is the
  8. best, so I want more people to know and use it.
  9. if you have any question about this module, please create a
  10. issue and let me know, I will always always always ...keep
  11. actively maintained, enjoy!
  12. Demo: http://ueditor.baidu.com/website/onlinedemo.html
  13. The demo is chinese, You can use the English version on your download.
  14. Installation
  15. -------------
  16. 1. Download the ueditor in
  17. http://ueditor.baidu.com/website/index.html.
  18. 2. Unzip it into sites/all/libraries,
  19. so that there's like sites/all/libraries/ueditor/ueditor.all.js.
  20. 3. Do like this https://drupal.org/node/2286333
  21. 4. Enabled ueditor module.
  22. 5. Go to admin/people/permissions and grant permission to any roles that need to be
  23. able to upload file with ueditor.
  24. 6. Add ueditor for Wysiwyg profile at admin/config/content/wysiwyg
  25. 7. Configure the module at admin/config/content/ueditor (Optional)
  26. Known Issues
  27. -----------------
  28. https://drupal.org/node/2286333
  29. https://drupal.org/node/2286537
  30. Form Textarea Field
  31. -----------------------
  32. if you want to use ueditor to your custom form with form API, there is
  33. a simple example:
  34. Form:
  35. function MY_MODULE_example_form($form, &$form_state){
  36. $form['ueditor_example'] = array(
  37. '#type' => 'text_format',
  38. '#title' => 'Ueditor Example',
  39. '#format' => 'full_html',
  40. );
  41. }
  42. Form submit:
  43. function MY_MODULE_example_form_submit($form, &$form_state){
  44. preg_match_all('/(.*?(src|href)=["|\'])(.*?)["|\']/ms',
  45. $form_state['values']['ueditor_example']['value'], $matchs);
  46. if(isset($matchs[3])){
  47. ueditor_file_register($matchs[3], $form_state['values']['form_id'], 'ueditor_example', '');
  48. }
  49. ...
  50. Do some thing
  51. ...
  52. }
  53. Tips: The official website of the Chinese,
  54. You can use the google translation, the operation so easy.