File: tinymce

package info (click to toggle)
picolisp 3.1.0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,100 kB
  • sloc: ansic: 14,205; lisp: 795; makefile: 290; sh: 13
file content (31 lines) | stat: -rw-r--r-- 1,042 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Using the TinyMCE Javascript/HTML WYSIWYG editor in PicoLisp applications

1. Install the 'tinymce' package

   $ apt-get install tinymce

2. In the application's runtime directory, create a link to the tinymce
   installation, e.g.:

   $ ln -s /usr/share/tinymce/www tinymce

3. In your application, 'allow' the tinymce installation directory:

   (allowed ("myApp/" "tinymce/")
      ... )

4. On each page where you want to use tinymce in textareas, insert two calls to
   'javascript' somewhere at the beginning, but before the first textarea,
   e.g.:

   (action
      (html 0 "Title" "lib.css" NIL
         (javascript "tinymce/tiny_mce.js")  # Insert two lines
         (javascript "lib/tinymce.js")
         (form NIL
            ...
            (gui '(+BlobField) '(txt : home obj) 60 8 "Memo")  # Use textareas

5. Normally, you would use an application-specific configuration. In that
   case, copy "lib/tinymce.js" to "myApp/tinymce.js", modify the plugins,
   buttons etc, and use (javascript "myApp/tinymce.js") in your code.