1 - fields: {name: Akapity, position: 0, slug: akapity}
2 model: toolbar.buttongroup
4 - fields: {name: Autokorekta, position: 0, slug: autokorekta}
5 model: toolbar.buttongroup
7 - fields: {name: Bloki, position: 0, slug: bloki}
8 model: toolbar.buttongroup
10 - fields: {name: 'Dramat ', position: 0, slug: dramat}
11 model: toolbar.buttongroup
13 - fields: {name: "Elementy pocz\u0105tkowe", position: 0, slug: elementy-poczatkowe}
14 model: toolbar.buttongroup
16 - fields: {name: Mastery, position: 0, slug: mastery}
17 model: toolbar.buttongroup
19 - fields: {name: "Nag\u0142\xF3wki", position: 0, slug: naglowki}
20 model: toolbar.buttongroup
22 - fields: {name: "Pocz\u0105tek dramatu", position: 0, slug: poczatek-dramatu}
23 model: toolbar.buttongroup
25 - fields: {name: Polecenia, position: 0, slug: polecenia}
26 model: toolbar.buttongroup
28 - fields: {name: Przypisy, position: 0, slug: przypisy}
29 model: toolbar.buttongroup
31 - fields: {name: Separatory, position: 0, slug: separatory}
32 model: toolbar.buttongroup
34 - fields: {name: Style znakowe, position: 0, slug: style-znakowe}
35 model: toolbar.buttongroup
37 - fields: {name: Wersy, position: 0, slug: wersy}
38 model: toolbar.buttongroup
45 params: '{"tag": "akap"}'
48 tooltip: wstawia akapit
56 params: '{"tag": "akap_cd"}'
59 tooltip: "ci\u0105g dalszy akapitu po wewn\u0105trzakapitowym wtr\u0105ceniu"
65 label: akapit dialogowy
67 params: '{"tag": "akap_dialog"}'
69 slug: akapit-dialogowy
70 tooltip: wstawia akapit dialogowy
78 params: '{"tag": "akt"}'
89 params: '{"tag": "autor_utworu"}'
100 params: '[["fulltextregexp", {"exprs": [["\ufeff", ""], ["$[\\s]*\\d+[\\s]*^",
101 ""], ["-\\s*^", ""], ["\\,\\.\\.|\\.\\,\\.|\\.\\.\\,", "..."], ["<(/?)P([aert])",
102 "<$1p$2"], ["[\u2014\u2013\u2010-]+", "---"], ["(\\d)---(\\d)", "$1--$2"],
103 ["(\\S)---(\\S)", "$1-$2"]]}], ["lineregexp", {"exprs": [["^\\s+|\\s+$",
104 ""], ["\\s+", " "], ["(,,)\\s+", "$1"], ["\\s+(\")", "$1"], ["([^\\.])(\\s*)</p",
105 "$1.$2</p"], ["([,\\.:;!\\?])([^\\s\\\\])", "$1 $2"], ["([^\\s])\\s+([,\\.:;!\\?])",
108 slug: basic_correction
109 tooltip: "Wykonuj\u0119 podstawow\u0105 korekt\u0119 tekstu."
110 model: toolbar.button
115 label: "zamiana cudzys\u0142ow\xF3w 1"
117 params: '{"exprs": [["\u00ab|\u201e", ",,"], ["\u00bb", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
118 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
119 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
120 scriptlet: lineregexp
121 slug: cudzyslow-francuski
122 tooltip: "zamiana \" na ,, oraz \xABa\xBB na ,,a\""
123 model: toolbar.button
128 label: "zamiana cudzys\u0142ow\xF3w 2"
130 params: '{"exprs": [["\u00bb|\u201e", ",,"], ["\u00ab", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
131 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
132 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
133 scriptlet: lineregexp
134 slug: cudzyslow-niemiecki
135 tooltip: "zamienia \" na ,, oraz \xBBa\xAB na ,,a\""
136 model: toolbar.button
141 label: "cz\u0119\u015B\u0107/ksi\u0119ga"
143 params: '{"tag": "naglowek_czesc"}'
144 scriptlet: insert_tag
147 model: toolbar.button
154 params: '{"tag": "dedykacja"}'
155 scriptlet: insert_tag
158 model: toolbar.button
165 params: '{"tag": "didaskalia"}'
166 scriptlet: insert_tag
169 model: toolbar.button
174 label: "didaskalia pocz\u0105tkowe"
176 params: '{"tag": "miejsce_czas"}'
177 scriptlet: insert_tag
178 slug: didaskalia-poczatkowe
179 tooltip: "komentarze wprowadzaj\u0105ce przed tekstem dramatu"
180 model: toolbar.button
185 label: didaskalia tekstowe
187 params: '{"tag": "didask_tekst"}'
188 scriptlet: insert_tag
189 slug: didaskalia-tekstowe
190 tooltip: "didaskalia umieszczone w obr\u0119bie innego tekstu"
191 model: toolbar.button
196 label: "d\u0142ugi cyt. poet."
198 params: '{"tag": "poezja_cyt"}'
199 scriptlet: insert_tag
201 tooltip: "d\u0142ugi cytat wierszowany wyr\xF3\u017Cniony sk\u0142adem"
202 model: toolbar.button
207 label: "d\u0142ugi cytat"
209 params: '{"tag": "dlugi_cyt"}'
210 scriptlet: insert_tag
212 tooltip: "d\u0142ugi cytat wyr\xF3\u017Cniony sk\u0142adem"
213 model: toolbar.button
218 label: dramat wiersz.
220 params: '{"tag": "dramat_wierszowany_l"}'
221 scriptlet: insert_tag
224 model: toolbar.button
229 label: "dramat wiersz./w. \u0142am"
231 params: '{"tag": "dramat_wierszowany_lp"}'
232 scriptlet: insert_tag
233 slug: dramat-wiersz-w-lam
234 tooltip: "dramat wierszowany o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
235 model: toolbar.button
240 label: "dramat wsp\xF3\u0142czesny"
242 params: '{"tag": "dramat_wspolczesny"}'
243 scriptlet: insert_tag
244 slug: dramat-wspolczesny
245 tooltip: "dramat wsp\xF3\u0142czesny (proz\u0105)"
246 model: toolbar.button
251 label: "dzie\u0142o nadrz\u0119dne"
253 params: '{"tag": "dzielo_nadrzedne"}'
254 scriptlet: insert_tag
255 slug: dzielo-nadrzedne
257 model: toolbar.button
264 params: '{"tag": "extra"}'
265 scriptlet: insert_tag
267 tooltip: "uwagi dotycz\u0105ce sk\u0142adu"
268 model: toolbar.button
276 scriptlet: insert_tag
277 slug: htmleditor-print
279 model: toolbar.button
286 params: '{"tag": "kwestia"}'
287 scriptlet: insert_tag
289 tooltip: "wstawia kwesti\u0119"
290 model: toolbar.button
297 params: '{"tag": "liryka_l"}'
298 scriptlet: insert_tag
301 model: toolbar.button
306 label: "liryka/w. \u0142am"
308 params: '{"tag": "liryka_lp"}'
309 scriptlet: insert_tag
311 tooltip: "utw\xF3r liryczny o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
312 model: toolbar.button
317 label: "lista os\xF3b"
319 params: '{"tag": "lista_osob"}'
320 scriptlet: insert_tag
322 tooltip: "lista os\xF3b poprzedzaj\u0105ca tekst dramatu"
323 model: toolbar.button
330 params: '{"tag": "lista_osoba", "attrs": {"typ": ""}}'
331 scriptlet: insert_tag
332 slug: lista-osob-pole
333 tooltip: osoby z takim samym opisem
334 model: toolbar.button
341 params: '{"tag": "mat"}'
342 scriptlet: insert_tag
344 tooltip: "wyra\u017Cenia matematyczne lub zmienne symboliczne"
345 model: toolbar.button
352 params: '{"tag": "motto"}'
353 scriptlet: insert_tag
356 model: toolbar.button
363 params: '{"tag": "motto_podpis"}'
364 scriptlet: insert_tag
367 model: toolbar.button
372 label: ",,\u2026\" na \xAB\u2026\xBB"
374 params: '{"exprs": [[",,", "\u00ab"], ["\"", "\u00bb"]]}'
375 scriptlet: fulltextregexp
377 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na francuskie"
378 model: toolbar.button
383 label: ",,\u2026\" na \xBB\u2026\xAB"
385 params: '{"exprs": [[",,", "\u00bb"], ["\"", "\u00ab"]]}'
386 scriptlet: fulltextregexp
388 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na niemieckie"
389 model: toolbar.button
394 label: "nag\u0142\xF3wek kwestii"
396 params: '{"tag": "naglowek_osoba"}'
397 scriptlet: insert_tag
398 slug: naglowek-kwestii
399 tooltip: "nag\u0142\xF3wek kwestii - nazwa osoby"
400 model: toolbar.button
405 label: "nag\u0142\xF3wek listy"
407 params: '{"tag": "naglowek_listy"}'
408 scriptlet: insert_tag
410 tooltip: "nag\u0142\xF3wek listy os\xF3b"
411 model: toolbar.button
418 params: '{"tag": "nazwa_utworu"}'
419 scriptlet: insert_tag
422 model: toolbar.button
429 params: '{"tag": "nota"}'
430 scriptlet: insert_tag
433 model: toolbar.button
440 params: '{"tag": "opowiadanie"}'
441 scriptlet: insert_tag
444 model: toolbar.button
451 params: '{"tag": "osoba"}'
452 scriptlet: insert_tag
454 tooltip: "wstawia nazw\u0119 osoby w didaskaliach"
455 model: toolbar.button
460 label: osoba na liscie
462 params: '{"tag": "lista_osoba"}'
463 scriptlet: insert_tag
464 slug: osoba-na-liscie
465 tooltip: "nazwa osoby na liscie os\xF3b"
466 model: toolbar.button
471 label: "podrozdzia\u0142"
473 params: '{"tag": "naglowek_podrozdzial"}'
474 scriptlet: insert_tag
477 model: toolbar.button
482 label: "podtytu\u0142"
484 params: '{"tag": "podtytul"}'
485 scriptlet: insert_tag
488 model: toolbar.button
493 label: "powie\u015B\u0107"
495 params: '{"tag": "powiesc"}'
496 scriptlet: insert_tag
499 model: toolbar.button
507 scriptlet: insert_tag
510 model: toolbar.button
515 label: przypis autorski
517 params: '{"tag": "pa"}'
518 scriptlet: insert_tag
519 slug: przypis-autorski
521 model: toolbar.button
526 label: przypis edytorski
528 params: '{"tag": "pe"}'
529 scriptlet: insert_tag
530 slug: przypis-edytorski
532 model: toolbar.button
537 label: przypis redaktorski
539 params: '{"tag": "pr"}'
540 scriptlet: insert_tag
541 slug: przypis-redaktorski
543 model: toolbar.button
548 label: "przypis t\u0142umacza"
550 params: '{"tag": "pt"}'
551 scriptlet: insert_tag
552 slug: przypis-tlumacza
554 model: toolbar.button
559 label: "rozdzia\u0142"
561 params: '{"tag": "naglowek_rozdzial"}'
562 scriptlet: insert_tag
565 model: toolbar.button
572 params: '{"tag": "naglowek_scena"}'
573 scriptlet: insert_tag
576 model: toolbar.button
583 params: '{"nocontent": "true", "tag": "sekcja_asterysk"}'
584 scriptlet: insert_tag
586 tooltip: rozdzielenie partii tekstu asteryskiem
587 model: toolbar.button
594 params: '{"nocontent": "true", "tag": "separator_linia"}'
595 scriptlet: insert_tag
597 tooltip: "rozdzielenie partii tekstu pozioma lini\u0105"
598 model: toolbar.button
603 label: "\u015Bwiat\u0142o"
605 params: '{"nocontent": "true", "tag": "sekcja_swiatlo"}'
606 scriptlet: insert_tag
608 tooltip: "\u015Bwiat\u0142o rozdzielaj\u0105ce sekcje tekstu"
609 model: toolbar.button
614 label: "s\u0142owo obce"
616 params: '{"tag": "slowo_obce"}'
617 scriptlet: insert_tag
619 tooltip: "frazy w j\u0119zykach innych ni\u017C polski/definiendum w przypisie"
620 model: toolbar.button
625 label: "\u015Br\xF3dtytu\u0142"
627 params: '{"tag": "srodtytul"}'
628 scriptlet: insert_tag
631 model: toolbar.button
638 params: '{"tag": "strofa"}'
639 scriptlet: insert_stanza
641 tooltip: "wstawia strof\u0119"
642 model: toolbar.button
647 label: "tag g\u0142\xF3wny"
649 params: '{"tag": "utwor"}'
650 scriptlet: insert_tag
653 model: toolbar.button
658 label: "A<sup>\u2193</sup>"
663 tooltip: "Zamie\u0144 wielkie litery na ma\u0142e"
664 model: toolbar.button
669 label: "tytu\u0142 dzie\u0142a"
671 params: '{"tag": "tytul_dziela"}'
672 scriptlet: insert_tag
675 model: toolbar.button
680 label: "tytu\u0142 dzie\u0142a typ 1"
682 params: '{"tag": "tytul_dziela", "attrs": {"typ": "1"}}'
683 scriptlet: insert_tag
684 slug: tytul-dziela-typ
685 tooltip: "tytu\u0142 dzie\u0142a w cytowanym tytule dzie\u0142a"
686 model: toolbar.button
693 params: '{"tag": "uwaga"}'
694 scriptlet: insert_tag
696 tooltip: 'uwagi redaktorsko-korektorskie '
697 model: toolbar.button
704 params: '{"tag": "wers_akap"}'
705 scriptlet: insert_tag
707 tooltip: "wers rozpoczynaj\u0105cy si\u0119 wci\u0119ciem akapitowym"
708 model: toolbar.button
715 params: '{"tag": "wers_cd"}'
716 scriptlet: insert_tag
718 tooltip: "cz\u0119\u015B\u0107 wersu przeniesiona do innego wiersza"
719 model: toolbar.button
724 label: "wers mocno wci\u0119ty"
726 params: '{"tag": "wers_wciety", "attrs": {"typ": ""}}'
727 scriptlet: insert_tag
728 slug: wers-mocno-wciety
729 tooltip: "argumenty wersu wci\u0119tego: od 2 do 6"
730 model: toolbar.button
735 label: "wers wci\u0119ty"
737 params: '{"tag": "wers_wciety", "attrs": {"typ": "1"}}'
738 scriptlet: insert_tag
740 tooltip: "wstawia wers wci\u0119ty"
741 model: toolbar.button
748 params: '{"tag": "www"}'
749 scriptlet: insert_tag
752 model: toolbar.button
757 label: "wyr\xF3\u017Cnienie"
759 params: '{"tag": "wyroznienie"}'
760 scriptlet: insert_tag
762 tooltip: "wyr\xF3\u017Cnienie autorskie"
763 model: toolbar.button
770 params: '{"tag": "wywiad"}'
771 scriptlet: insert_tag
774 model: toolbar.button
779 label: "wywiad odpowied\u017A"
781 params: '{"tag": "wywiad_odp"}'
782 scriptlet: insert_tag
783 slug: wywiad-odpowiedz
785 model: toolbar.button
790 label: wywiad pytanie
792 params: '{"tag": "wywiad_pyt"}'
793 scriptlet: insert_tag
796 model: toolbar.button
801 label: "zast\u0119pnik wersu"
803 params: '{"tag": "zastepnik_wersu"}'
804 scriptlet: insert_tag
805 slug: zastepnik-wersu
806 tooltip: wykropkowanie wersu
807 model: toolbar.button
809 - fields: {code: "var texteditor = panel.texteditor;\nvar text = texteditor.selection();\n\
810 var start_tag = '<'+params.tag;\nfor (var attr in params.attrs) {\n \
811 \ start_tag += ' '+attr+'=\"' + params.attrs[attr] + '\"';\n};\nstart_tag\
812 \ += '>';\nvar end_tag = '</'+params.tag+'>';\n\nif(text.length > 0) {\n\
813 // tokenize\nvar output = ''\nvar token = ''\nfor(var index=0; index <\
814 \ text.length; index++)\n{\n if (text[index].match(/\\s/)) { // whitespace\n\
815 \ token += text[index];\n }\n else { // character\n \
816 \ output += token;\n if(output == token) output += start_tag;\n\
817 \ token = ''\n output += text[index];\n }\n}\n\nif( output[output.length-1]\
818 \ == '\\\\' ) {\n output = output.substr(0, output.length-1) + end_tag\
819 \ + '\\\\';\n} else {\n output += end_tag;\n}\noutput += token;\n}\n\
820 else {\n output = start_tag + end_tag;\n}\n\ntexteditor.replaceSelection(output);\n\
821 \nif (text.length == 0) {\n var pos = texteditor.cursorPosition();\n\
822 \ texteditor.selectLines(pos.line, pos.character + params.tag.length\
823 \ + 2);\n}\n\npanel.fireEvent('contentChanged');"}
824 model: toolbar.scriptlet
826 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
827 \ '', -1);\n\nvar cm = panel.texteditor;\nvar exprs = $.map(params.exprs,\
828 \ function(expr) {\n\n var opts = \"g\";\n\n if(expr.length > 2)\n\
829 \n opts = expr[2];\n\n return {rx: new RegExp(expr[0], opts),\
830 \ repl: expr[1]};\n\n});\n\n\n\nvar partial = true;\n\nvar text = cm.selection();\n\
831 \n\n\nif(!text) {\n\n var cpos = cm.cursorPosition();\n\n cpos.line\
832 \ = cm.lineNumber(cpos.line)\n\n cm.selectLines(cm.firstLine(), 0,\
833 \ cm.lastLine(), 0);\n\n text = cm.selection();\n\n partial = false;\n\
834 \n}\n\n\n\nvar changed = 0;\nvar lines = text.split('\\n');\nvar lines\
835 \ = $.map(lines, function(line) { \n var old_line = line;\n $(exprs).each(function()\
836 \ { \n var expr = this;\n line = line.replace(expr.rx, expr.repl);\n\
837 \ });\n\n if(old_line != line) changed += 1;\n return line;\n\
838 });\n\nif(changed > 0) \n{\n cm.replaceSelection( lines.join('\\n')\
839 \ );\n panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
840 \ 'Zmieniono ' + changed + ' linii.', 1500);\n editor.advancePopupQueue();\n\
841 }\nelse {\n editor.showPopup('generic-info', 'Brak zmian w tek\u015B\
842 cie', 1500);\n editor.advancePopupQueue();\n}\n\nif(!partial)\n \
843 \ cm.selectLines( cm.nthLine(cpos.line), cpos.character )"}
844 model: toolbar.scriptlet
846 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
847 \ '', -1);\n$.log(editor, panel, params);\nvar cm = panel.texteditor;\n\
848 var exprs = $.map(params.exprs, function(expr) {\n var opts = \"mg\"\
849 ;\n if(expr.length > 2)\n opts = expr[2];\n\n return {rx:\
850 \ new RegExp(expr[0], opts), repl: expr[1]};\n});\n\nvar partial = true;\n\
851 var text = cm.selection();\n\nif(!text) {\n var cpos = cm.cursorPosition();\n\
852 \ cpos.line = cm.lineNumber(cpos.line)\n cm.selectLines(cm.firstLine(),\
853 \ 0, cm.lastLine(), 0);\n\n text = cm.selection();\n partial = false;\n\
854 }\n\nvar original = text;\n$(exprs).each(function() { \n text = text.replace(this.rx,\
855 \ this.repl);\n});\n\nif( original != text) \n{ \n cm.replaceSelection(text);\n\
856 \ panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
857 \ 'Zmieniono tekst' );\n editor.advancePopupQueue();\n}\nelse {\n \
858 \ editor.showPopup('generic-info', 'Brak zmian w tek\u015Bcie.');\n\
859 \ editor.advancePopupQueue();\n}\n\nif(!partial) {\n cm.selectLines(\
860 \ cm.nthLine(cpos.line), cpos.character );\n}"}
861 model: toolbar.scriptlet
863 - fields: {code: "$(params).each(function() {\n $.log(this[0], this[1]);\n \
864 \ editor.callScriptlet(this[0], panel, this[1]);\n\n});"}
865 model: toolbar.scriptlet
867 - fields: {code: "var cm = panel.texteditor;\r\nvar text = cm.selection();\r\n\r\
868 \nif(!text) return;\r\nvar repl = '';\r\nvar lcase = text.toLowerCase();\r\
869 \nvar ucase = text.toUpperCase();\r\n\r\nif(lcase == text) repl = ucase;\
870 \ /* was lowercase */\r\nelse if(ucase != text) repl = lcase; /* neither\
871 \ lower- or upper-case */\r\nelse { /* upper case -> title-case */\r\n\
872 \ var words = $(lcase.split(/\\s/)).map(function() { \r\n if(this.length\
873 \ > 0) { return this[0].toUpperCase() + this.slice(1); } else { return\
874 \ ''}\r\n }); \r\n repl = words.join(' ');\r\n} \r\n\r\nif(repl !=\
875 \ text) {\r\n cm.replaceSelection(repl);\r\n panel.fireEvent('contentChanged');\r\
877 model: toolbar.scriptlet
879 - fields: {code: "var texteditor = panel.texteditor;\r\nvar text = texteditor.selection();\r\
880 \n\r\nif(text) {\r\n var verses = text.split('\\n');\r\n var text =\
881 \ ''; var buf = ''; var ebuf = '';\r\n var first = true;\r\n\r\n for(var\
882 \ i=0; i < verses.length; i++) {\r\n verse = verses[i].replace(/^\\\
883 s+/, \"\").replace(/\\s+$/, \"\"); \r\n if(verse) {\r\n text\
884 \ += (buf ? buf + '/\\n' : '') + ebuf;\r\n buf = (first ? '<strofa>\\\
885 n' : '') + verses[i];\r\n ebuf = '';\r\n first = false;\r\n\
886 \ } else { \r\n ebuf += '\\n' + verses[i];\r\n }\r\n };\r\
887 \n text = text + buf + '\\n</strofa>' + ebuf; \r\n texteditor.replaceSelection(text);\r\
888 \n}\r\n\r\nif (!text) {\r\n var pos = texteditor.cursorPosition();\r\
889 \n texteditor.selectLines(pos.line, pos.character + 6 + 2);\r\n}\r\n\
890 \r\n\r\n\r\n\r\n\r\n\r\n\r\npanel.fireEvent('contentChanged');"}
891 model: toolbar.scriptlet