Browse files

Writing more readme...

  • Loading branch information...
1 parent eb9ca06 commit 8d529638a606936f9bbbeeb61162cab831d54db9 julmis committed Mar 5, 2006
Showing with 36 additions and 0 deletions.
  1. +36 −0 lib/editor/neweditor_readme.txt
View
36 lib/editor/neweditor_readme.txt
@@ -42,4 +42,40 @@ we'll startup the editor almost as usual:
After $editor->use_html_editor() -method is called $CFG->editorsrc array is cleared,
so these scripts are loaded only when necessary.
+Special usage
+=============
+
+In some rare cases programmer needs to force sertain settings. If you don't want to
+take care of both editor's settings you can force your module to use one editor only.
+In that case you'll have to pass an associative array as an argument
+for loadeditor function:
+
+
+ $args = array('courseid' => $course->id, 'name' => 'tinymce');
+ $editor = loadeditor($args);
+
+Then you can define settings for the editor that you wish to use. For setting up new
+settings use setconfig() method:
+
+ Tiny example1:
+
+ $editor->setconfig('mode','exact');
+ $editor->setconfig('elements','mytextarea');
+ $editor->setconfig('plugins','advhr,table,flash');
+
+ // Merge config to defaults and startup the editor.
+ $editor->starteditor('merge');
+
+ Tiny example2:
+
+ $args['mode'] = 'exact';
+ $args['elements'] = 'mytextarea';
+
+ $args['plugins'] = 'advhr,table,flash';
+
+ // merge config to defaults and startup the editor.
+ $editor->starteditor('merge');
+
+To be continue...
+
$Id$

0 comments on commit 8d52963

Please sign in to comment.