Changes between Version 1 and Version 2 of Documentation/Plugins/Linker


Ignore:
Timestamp:
04/04/05 12:43:31 (14 years ago)
Author:
niko
Comment:

added examples

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/Plugins/Linker

    v1 v2  
    55The Linker plugin provides an enhanced link dialog for inserting/modifing links to files, or mailto: links to email addresses.  The plugin when registered with an editor replaces the editors default createlink button. 
    66 
     7Linker plugin displays a Tree where the user can select the file he wants to link. 
     8Currently there are two methods for filling this tree: 
     9 
     10=== 1. using an external backend-file === 
     11(default, returns all files found in DOCUMENT_ROOT) 
     12{{{ 
     13editor.config.Linker.backend = _editor_url + 'plugins/Linker/scan.php'; 
     14}}} 
     15scan.php should return code like this one: 
     16{{{ 
     17// <<node-list>> = [ <<node>, <<node>>, ...]   
     18// <<node>> = one of the following four types 
     19// 1. "a.html" -- URL without children or title 
     20// 2. ["a.html", <<node-list>>] -- URL without title but with children 
     21// 3. {url:"a.html",title:"A URL"} -- URL with title 
     22// 4. {url:"a.html",title:"A File",children:<<node-list>>} -- URL with title, and children 
     23[ 
     24  "e.html",                         
     25  ['f.html', ['g.html','h.html']],  
     26  {url:'i.html',title:'I Html'},    
     27  {url:'j.html',title:'J Html', children:[{url:'k.html',name:"K Html"},'l.html',['m.html',['n.html']]]}  
     28] 
     29}}} 
     30Type 3 and 4 nodes would be the preference, I'd go so far as to deprecate type 1 and 2. 
     31 
     32=== 2. using configuration-variables === 
     33{{{ 
     34editor.config.Linker.backend = null; 
     35editor.config.Linker.files = [ 
     36                               "e.html",                         
     37                               ['f.html', ['g.html','h.html']],  
     38                               {url:'i.html',title:'I Html'},    
     39                               {url:'j.html',title:'J Html', children:[{url:'k.html',name:"K Html"},'l.html',['m.html',['n.html']]]}  
     40                             ]; 
     41}}} 
     42 
    743This plugin incorporates the dTree javascript tree widget by [http://www.destroydrop.com/javascript/tree/ Geir Landr].  dTree has been slightly modified to improve performance. 
    844