* Readonly document view.
[redakcja.git] / platforma / static / filebrowser / js / TinyMCEAdmin.js
1 function CustomFileBrowser(field_name, url, type, win) {
2
3     var cmsURL = "/admin/filebrowser/browse/?pop=2";
4     cmsURL = cmsURL + "&type=" + type;
5
6     tinyMCE.activeEditor.windowManager.open({
7         file: cmsURL,
8         width: 820,  // Your dimensions may differ - toy around with them!
9         height: 500,
10         resizable: "yes",
11         scrollbars: "yes",
12         inline: "no",  // This parameter only has an effect if you use the inlinepopups plugin!
13         close_previous: "no"
14     }, {
15         window: win,
16         input: field_name,
17         editor_id: tinyMCE.selectedInstance.editorId
18     });
19     return false;
20 }
21
22
23 tinyMCE.init({
24     mode: "textareas",
25     theme: "advanced",
26     language: "en",
27     skin: "o2k7",
28     browsers: "gecko",
29     dialog_type: "modal",
30     object_resizing: true,
31     cleanup_on_startup: true,
32     forced_root_block: "p",
33     remove_trailing_nbsp: true,
34     theme_advanced_toolbar_location: "top",
35     theme_advanced_toolbar_align: "left",
36     theme_advanced_statusbar_location: "none",
37     theme_advanced_buttons1: "formatselect,bold,italic,underline,bullist,numlist,undo,redo,link,unlink,image,code,fullscreen,pasteword,media,charmap",
38     theme_advanced_buttons2: "",
39     theme_advanced_buttons3: "",
40     theme_advanced_path: false,
41     theme_advanced_blockformats: "p,h2,h3,h4,h5,h6",
42     width: '700',
43     height: '200',
44     plugins: "advimage,advlink,fullscreen,visualchars,paste,media,template,searchreplace",
45     advimage_styles: "Linksbündig neben Text=img_left;Rechtsbündig neben Text=img_right;Eigener Block=img_block",
46     advlink_styles: "internal (sehmaschine.net)=internal;external (link to an external site)=external",
47     advimage_update_dimensions_onchange: true,
48     file_browser_callback: "CustomFileBrowser",
49     relative_urls: false,
50     valid_elements : "" +
51     "-p," +
52     "a[href|target=_blank|class]," +
53     "-strong/-b," +
54     "-em/-i," +
55     "-u," +
56     "-ol," +
57     "-ul," +
58     "-li," +
59     "br," +
60     "img[class|src|alt=|width|height]," +
61     "-h2,-h3,-h4," +
62     "-pre," +
63     "-code," +
64     "-div",
65     extended_valid_elements: "" +
66     "a[name|class|href|target|title|onclick]," +
67     "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]," +
68     "br[clearfix]," +
69     "-p[class<clearfix?summary?code]," +
70     "h2[class<clearfix],h3[class<clearfix],h4[class<clearfix]," +
71     "ul[class<clearfix],ol[class<clearfix]," +
72     "div[class],"
73 });
74
75