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-]{2,}|[\u2014\u2013\u2010]+", "---"],
103 ["(\\s)-([^-])", "$1---$2"], ["([^-])-(\\s)", "$1---$2"], ["(\\d)-+(\\d)",
104 "$1--$2"], ["---(\\S)", "--- $1"], ["(\\S)---", "$1 ---"], ["<akap_dialog>\\s*-+\\s*",
105 "<akap_dialog>--- "]]}], ["lineregexp", {"exprs": [["^\\s+|\\s+$", ""],
106 ["\\s+", " "], ["(,,)\\s+", "$1"], ["\\s+(\")", "$1"], ["([^\\.])(\\s*)</p",
107 "$1.$2</p"], ["([\\.:;!\\?])([^\\s\\\\])", "$1 $2"], ["([^\\s])\\s+([\\.:;!\\?])",
108 "$1$2"], ["\\s+,([^,])", ",$1"], ["([^,]),([^\\s\\\\,])", "$1, $2"]]}]]'
110 slug: basic_correction
111 tooltip: "Wykonuj\u0119 podstawow\u0105 korekt\u0119 tekstu."
112 model: toolbar.button
117 label: "zamiana cudzys\u0142ow\xF3w 1"
119 params: '{"exprs": [["\u00ab|\u201e", ",,"], ["\u00bb", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
120 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
121 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
122 scriptlet: lineregexp
123 slug: cudzyslow-francuski
124 tooltip: "zamiana \" na ,, oraz \xABa\xBB na ,,a\""
125 model: toolbar.button
130 label: "zamiana cudzys\u0142ow\xF3w 2"
132 params: '{"exprs": [["\u00bb|\u201e", ",,"], ["\u00ab", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
133 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
134 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
135 scriptlet: lineregexp
136 slug: cudzyslow-niemiecki
137 tooltip: "zamienia \" na ,, oraz \xBBa\xAB na ,,a\""
138 model: toolbar.button
143 label: "cz\u0119\u015B\u0107/ksi\u0119ga"
145 params: '{"tag": "naglowek_czesc"}'
146 scriptlet: insert_tag
149 model: toolbar.button
156 params: '{"tag": "dedykacja"}'
157 scriptlet: insert_tag
160 model: toolbar.button
167 params: '{"tag": "didaskalia"}'
168 scriptlet: insert_tag
171 model: toolbar.button
176 label: "didaskalia pocz\u0105tkowe"
178 params: '{"tag": "miejsce_czas"}'
179 scriptlet: insert_tag
180 slug: didaskalia-poczatkowe
181 tooltip: "komentarze wprowadzaj\u0105ce przed tekstem dramatu"
182 model: toolbar.button
187 label: didaskalia tekstowe
189 params: '{"tag": "didask_tekst"}'
190 scriptlet: insert_tag
191 slug: didaskalia-tekstowe
192 tooltip: "didaskalia umieszczone w obr\u0119bie innego tekstu"
193 model: toolbar.button
198 label: "d\u0142ugi cyt. poet."
200 params: '{"tag": "poezja_cyt"}'
201 scriptlet: insert_tag
203 tooltip: "d\u0142ugi cytat wierszowany wyr\xF3\u017Cniony sk\u0142adem"
204 model: toolbar.button
209 label: "d\u0142ugi cytat"
211 params: '{"tag": "dlugi_cyt"}'
212 scriptlet: insert_tag
214 tooltip: "d\u0142ugi cytat wyr\xF3\u017Cniony sk\u0142adem"
215 model: toolbar.button
220 label: dramat wiersz.
222 params: '{"tag": "dramat_wierszowany_l"}'
223 scriptlet: insert_tag
226 model: toolbar.button
231 label: "dramat wiersz./w. \u0142am"
233 params: '{"tag": "dramat_wierszowany_lp"}'
234 scriptlet: insert_tag
235 slug: dramat-wiersz-w-lam
236 tooltip: "dramat wierszowany o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
237 model: toolbar.button
242 label: "dramat wsp\xF3\u0142czesny"
244 params: '{"tag": "dramat_wspolczesny"}'
245 scriptlet: insert_tag
246 slug: dramat-wspolczesny
247 tooltip: "dramat wsp\xF3\u0142czesny (proz\u0105)"
248 model: toolbar.button
253 label: "dzie\u0142o nadrz\u0119dne"
255 params: '{"tag": "dzielo_nadrzedne"}'
256 scriptlet: insert_tag
257 slug: dzielo-nadrzedne
259 model: toolbar.button
266 params: '{"tag": "extra"}'
267 scriptlet: insert_tag
269 tooltip: "uwagi dotycz\u0105ce sk\u0142adu"
270 model: toolbar.button
278 scriptlet: insert_tag
279 slug: htmleditor-print
281 model: toolbar.button
288 params: '{"tag": "kwestia"}'
289 scriptlet: insert_tag
291 tooltip: "wstawia kwesti\u0119"
292 model: toolbar.button
299 params: '{"tag": "liryka_l"}'
300 scriptlet: insert_tag
303 model: toolbar.button
308 label: "liryka/w. \u0142am"
310 params: '{"tag": "liryka_lp"}'
311 scriptlet: insert_tag
313 tooltip: "utw\xF3r liryczny o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
314 model: toolbar.button
319 label: "lista os\xF3b"
321 params: '{"tag": "lista_osob"}'
322 scriptlet: insert_tag
324 tooltip: "lista os\xF3b poprzedzaj\u0105ca tekst dramatu"
325 model: toolbar.button
332 params: '{"tag": "lista_osoba", "attrs": {"typ": ""}}'
333 scriptlet: insert_tag
334 slug: lista-osob-pole
335 tooltip: osoby z takim samym opisem
336 model: toolbar.button
343 params: '{"tag": "mat"}'
344 scriptlet: insert_tag
346 tooltip: "wyra\u017Cenia matematyczne lub zmienne symboliczne"
347 model: toolbar.button
354 params: '{"tag": "motto"}'
355 scriptlet: insert_tag
358 model: toolbar.button
365 params: '{"tag": "motto_podpis"}'
366 scriptlet: insert_tag
369 model: toolbar.button
374 label: ",,\u2026\" na \xAB\u2026\xBB"
376 params: '{"exprs": [[",,", "\u00ab"], ["\"", "\u00bb"]]}'
377 scriptlet: fulltextregexp
379 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na francuskie"
380 model: toolbar.button
385 label: ",,\u2026\" na \xBB\u2026\xAB"
387 params: '{"exprs": [[",,", "\u00bb"], ["\"", "\u00ab"]]}'
388 scriptlet: fulltextregexp
390 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na niemieckie"
391 model: toolbar.button
396 label: "nag\u0142\xF3wek kwestii"
398 params: '{"tag": "naglowek_osoba"}'
399 scriptlet: insert_tag
400 slug: naglowek-kwestii
401 tooltip: "nag\u0142\xF3wek kwestii - nazwa osoby"
402 model: toolbar.button
407 label: "nag\u0142\xF3wek listy"
409 params: '{"tag": "naglowek_listy"}'
410 scriptlet: insert_tag
412 tooltip: "nag\u0142\xF3wek listy os\xF3b"
413 model: toolbar.button
420 params: '{"tag": "nazwa_utworu"}'
421 scriptlet: insert_tag
424 model: toolbar.button
431 params: '{"tag": "nota"}'
432 scriptlet: insert_tag
435 model: toolbar.button
442 params: '{"tag": "opowiadanie"}'
443 scriptlet: insert_tag
446 model: toolbar.button
453 params: '{"tag": "osoba"}'
454 scriptlet: insert_tag
456 tooltip: "wstawia nazw\u0119 osoby w didaskaliach"
457 model: toolbar.button
462 label: osoba na liscie
464 params: '{"tag": "lista_osoba"}'
465 scriptlet: insert_tag
466 slug: osoba-na-liscie
467 tooltip: "nazwa osoby na liscie os\xF3b"
468 model: toolbar.button
473 label: "podrozdzia\u0142"
475 params: '{"tag": "naglowek_podrozdzial"}'
476 scriptlet: insert_tag
479 model: toolbar.button
484 label: "podtytu\u0142"
486 params: '{"tag": "podtytul"}'
487 scriptlet: insert_tag
490 model: toolbar.button
495 label: "powie\u015B\u0107"
497 params: '{"tag": "powiesc"}'
498 scriptlet: insert_tag
501 model: toolbar.button
509 scriptlet: insert_tag
512 model: toolbar.button
517 label: przypis autorski
519 params: '{"tag": "pa"}'
520 scriptlet: insert_tag
521 slug: przypis-autorski
523 model: toolbar.button
528 label: przypis edytorski
530 params: '{"tag": "pe"}'
531 scriptlet: insert_tag
532 slug: przypis-edytorski
534 model: toolbar.button
539 label: przypis redaktorski
541 params: '{"tag": "pr"}'
542 scriptlet: insert_tag
543 slug: przypis-redaktorski
545 model: toolbar.button
550 label: "przypis t\u0142umacza"
552 params: '{"tag": "pt"}'
553 scriptlet: insert_tag
554 slug: przypis-tlumacza
556 model: toolbar.button
561 label: "rozdzia\u0142"
563 params: '{"tag": "naglowek_rozdzial"}'
564 scriptlet: insert_tag
567 model: toolbar.button
574 params: '{"tag": "naglowek_scena"}'
575 scriptlet: insert_tag
578 model: toolbar.button
585 params: '{"nocontent": "true", "tag": "sekcja_asterysk"}'
586 scriptlet: insert_tag
588 tooltip: rozdzielenie partii tekstu asteryskiem
589 model: toolbar.button
596 params: '{"nocontent": "true", "tag": "separator_linia"}'
597 scriptlet: insert_tag
599 tooltip: "rozdzielenie partii tekstu pozioma lini\u0105"
600 model: toolbar.button
605 label: "\u015Bwiat\u0142o"
607 params: '{"nocontent": "true", "tag": "sekcja_swiatlo"}'
608 scriptlet: insert_tag
610 tooltip: "\u015Bwiat\u0142o rozdzielaj\u0105ce sekcje tekstu"
611 model: toolbar.button
616 label: "s\u0142owo obce"
618 params: '{"tag": "slowo_obce"}'
619 scriptlet: insert_tag
621 tooltip: "frazy w j\u0119zykach innych ni\u017C polski/definiendum w przypisie"
622 model: toolbar.button
627 label: "\u015Br\xF3dtytu\u0142"
629 params: '{"tag": "srodtytul"}'
630 scriptlet: insert_tag
633 model: toolbar.button
640 params: '{"tag": "strofa"}'
641 scriptlet: insert_stanza
643 tooltip: "wstawia strof\u0119"
644 model: toolbar.button
649 label: "tag g\u0142\xF3wny"
651 params: '{"tag": "utwor"}'
652 scriptlet: insert_tag
655 model: toolbar.button
660 label: "A<sup>\u2193</sup>"
665 tooltip: "Zamie\u0144 wielkie litery na ma\u0142e"
666 model: toolbar.button
671 label: "tytu\u0142 dzie\u0142a"
673 params: '{"tag": "tytul_dziela"}'
674 scriptlet: insert_tag
677 model: toolbar.button
682 label: "tytu\u0142 dzie\u0142a typ 1"
684 params: '{"tag": "tytul_dziela", "attrs": {"typ": "1"}}'
685 scriptlet: insert_tag
686 slug: tytul-dziela-typ
687 tooltip: "tytu\u0142 dzie\u0142a w cytowanym tytule dzie\u0142a"
688 model: toolbar.button
695 params: '{"tag": "uwaga"}'
696 scriptlet: insert_tag
698 tooltip: 'uwagi redaktorsko-korektorskie '
699 model: toolbar.button
706 params: '{"tag": "wers_akap"}'
707 scriptlet: insert_tag
709 tooltip: "wers rozpoczynaj\u0105cy si\u0119 wci\u0119ciem akapitowym"
710 model: toolbar.button
717 params: '{"tag": "wers_cd"}'
718 scriptlet: insert_tag
720 tooltip: "cz\u0119\u015B\u0107 wersu przeniesiona do innego wiersza"
721 model: toolbar.button
726 label: "wers mocno wci\u0119ty"
728 params: '{"tag": "wers_wciety", "attrs": {"typ": ""}}'
729 scriptlet: insert_tag
730 slug: wers-mocno-wciety
731 tooltip: "argumenty wersu wci\u0119tego: od 2 do 6"
732 model: toolbar.button
737 label: "wers wci\u0119ty"
739 params: '{"tag": "wers_wciety", "attrs": {"typ": "1"}}'
740 scriptlet: insert_tag
742 tooltip: "wstawia wers wci\u0119ty"
743 model: toolbar.button
750 params: '{"tag": "www"}'
751 scriptlet: insert_tag
754 model: toolbar.button
759 label: "wyr\xF3\u017Cnienie"
761 params: '{"tag": "wyroznienie"}'
762 scriptlet: insert_tag
764 tooltip: "wyr\xF3\u017Cnienie autorskie"
765 model: toolbar.button
772 params: '{"tag": "wywiad"}'
773 scriptlet: insert_tag
776 model: toolbar.button
781 label: "wywiad odpowied\u017A"
783 params: '{"tag": "wywiad_odp"}'
784 scriptlet: insert_tag
785 slug: wywiad-odpowiedz
787 model: toolbar.button
792 label: wywiad pytanie
794 params: '{"tag": "wywiad_pyt"}'
795 scriptlet: insert_tag
798 model: toolbar.button
803 label: "zast\u0119pnik wersu"
805 params: '{"tag": "zastepnik_wersu"}'
806 scriptlet: insert_tag
807 slug: zastepnik-wersu
808 tooltip: wykropkowanie wersu
809 model: toolbar.button
811 - fields: {code: "var texteditor = panel.texteditor;\nvar text = texteditor.selection();\n\
812 var start_tag = '<'+params.tag;\nfor (var attr in params.attrs) {\n \
813 \ start_tag += ' '+attr+'=\"' + params.attrs[attr] + '\"';\n};\nstart_tag\
814 \ += '>';\nvar end_tag = '</'+params.tag+'>';\n\nif(text.length > 0) {\n\
815 // tokenize\nvar output = ''\nvar token = ''\nfor(var index=0; index <\
816 \ text.length; index++)\n{\n if (text[index].match(/\\s/)) { // whitespace\n\
817 \ token += text[index];\n }\n else { // character\n \
818 \ output += token;\n if(output == token) output += start_tag;\n\
819 \ token = ''\n output += text[index];\n }\n}\n\nif( output[output.length-1]\
820 \ == '\\\\' ) {\n output = output.substr(0, output.length-1) + end_tag\
821 \ + '\\\\';\n} else {\n output += end_tag;\n}\noutput += token;\n}\n\
822 else {\n output = start_tag + end_tag;\n}\n\ntexteditor.replaceSelection(output);\n\
823 \nif (text.length == 0) {\n var pos = texteditor.cursorPosition();\n\
824 \ texteditor.selectLines(pos.line, pos.character + params.tag.length\
825 \ + 2);\n}\n\npanel.fireEvent('contentChanged');"}
826 model: toolbar.scriptlet
828 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
829 \ '', -1);\n\nvar cm = panel.texteditor;\nvar exprs = $.map(params.exprs,\
830 \ function(expr) {\n\n var opts = \"g\";\n\n if(expr.length > 2)\n\
831 \n opts = expr[2];\n\n return {rx: new RegExp(expr[0], opts),\
832 \ repl: expr[1]};\n\n});\n\n\n\nvar partial = true;\n\nvar text = cm.selection();\n\
833 \n\n\nif(!text) {\n\n var cpos = cm.cursorPosition();\n\n cpos.line\
834 \ = cm.lineNumber(cpos.line)\n\n cm.selectLines(cm.firstLine(), 0,\
835 \ cm.lastLine(), 0);\n\n text = cm.selection();\n\n partial = false;\n\
836 \n}\n\n\n\nvar changed = 0;\nvar lines = text.split('\\n');\nvar lines\
837 \ = $.map(lines, function(line) { \n var old_line = line;\n $(exprs).each(function()\
838 \ { \n var expr = this;\n line = line.replace(expr.rx, expr.repl);\n\
839 \ });\n\n if(old_line != line) changed += 1;\n return line;\n\
840 });\n\nif(changed > 0) \n{\n cm.replaceSelection( lines.join('\\n')\
841 \ );\n panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
842 \ 'Zmieniono ' + changed + ' linii.', 1500);\n editor.advancePopupQueue();\n\
843 }\nelse {\n editor.showPopup('generic-info', 'Brak zmian w tek\u015B\
844 cie', 1500);\n editor.advancePopupQueue();\n}\n\nif(!partial)\n \
845 \ cm.selectLines( cm.nthLine(cpos.line), cpos.character )"}
846 model: toolbar.scriptlet
848 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
849 \ '', -1);\n$.log(editor, panel, params);\nvar cm = panel.texteditor;\n\
850 var exprs = $.map(params.exprs, function(expr) {\n var opts = \"mg\"\
851 ;\n if(expr.length > 2)\n opts = expr[2];\n\n return {rx:\
852 \ new RegExp(expr[0], opts), repl: expr[1]};\n});\n\nvar partial = true;\n\
853 var text = cm.selection();\n\nif(!text) {\n var cpos = cm.cursorPosition();\n\
854 \ cpos.line = cm.lineNumber(cpos.line)\n cm.selectLines(cm.firstLine(),\
855 \ 0, cm.lastLine(), 0);\n\n text = cm.selection();\n partial = false;\n\
856 }\n\nvar original = text;\n$(exprs).each(function() { \n text = text.replace(this.rx,\
857 \ this.repl);\n});\n\nif( original != text) \n{ \n cm.replaceSelection(text);\n\
858 \ panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
859 \ 'Zmieniono tekst' );\n editor.advancePopupQueue();\n}\nelse {\n \
860 \ editor.showPopup('generic-info', 'Brak zmian w tek\u015Bcie.');\n\
861 \ editor.advancePopupQueue();\n}\n\nif(!partial) {\n cm.selectLines(\
862 \ cm.nthLine(cpos.line), cpos.character );\n}"}
863 model: toolbar.scriptlet
865 - fields: {code: "$(params).each(function() {\n $.log(this[0], this[1]);\n \
866 \ editor.callScriptlet(this[0], panel, this[1]);\n\n});"}
867 model: toolbar.scriptlet
869 - fields: {code: "var cm = panel.texteditor;\r\nvar text = cm.selection();\r\n\r\
870 \nif(!text) return;\r\nvar repl = '';\r\nvar lcase = text.toLowerCase();\r\
871 \nvar ucase = text.toUpperCase();\r\n\r\nif(lcase == text) repl = ucase;\
872 \ /* was lowercase */\r\nelse if(ucase != text) repl = lcase; /* neither\
873 \ lower- or upper-case */\r\nelse { /* upper case -> title-case */\r\n\
874 \ var words = $(lcase.split(/\\s/)).map(function() { \r\n if(this.length\
875 \ > 0) { return this[0].toUpperCase() + this.slice(1); } else { return\
876 \ ''}\r\n }); \r\n repl = words.join(' ');\r\n} \r\n\r\nif(repl !=\
877 \ text) {\r\n cm.replaceSelection(repl);\r\n panel.fireEvent('contentChanged');\r\
879 model: toolbar.scriptlet
881 - fields: {code: "var texteditor = panel.texteditor;\r\nvar text = texteditor.selection();\r\
882 \n\r\nif(text) {\r\n var verses = text.split('\\n');\r\n var text =\
883 \ ''; var buf = ''; var ebuf = '';\r\n var first = true;\r\n\r\n for(var\
884 \ i=0; i < verses.length; i++) {\r\n verse = verses[i].replace(/^\\\
885 s+/, \"\").replace(/\\s+$/, \"\"); \r\n if(verse) {\r\n text\
886 \ += (buf ? buf + '/\\n' : '') + ebuf;\r\n buf = (first ? '<strofa>\\\
887 n' : '') + verses[i];\r\n ebuf = '';\r\n first = false;\r\n\
888 \ } else { \r\n ebuf += '\\n' + verses[i];\r\n }\r\n };\r\
889 \n text = text + buf + '\\n</strofa>' + ebuf; \r\n texteditor.replaceSelection(text);\r\
890 \n}\r\n\r\nif (!text) {\r\n var pos = texteditor.cursorPosition();\r\
891 \n texteditor.selectLines(pos.line, pos.character + 6 + 2);\r\n}\r\n\
892 \r\n\r\n\r\n\r\n\r\n\r\n\r\npanel.fireEvent('contentChanged');"}
893 model: toolbar.scriptlet