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: Autotagowanie, position: 0, slug: autotagowanie}
8 model: toolbar.buttongroup
10 - fields: {name: Bloki, position: 0, slug: bloki}
11 model: toolbar.buttongroup
13 - fields: {name: 'Dramat ', position: 0, slug: dramat}
14 model: toolbar.buttongroup
16 - fields: {name: "Elementy pocz\u0105tkowe", position: 0, slug: elementy-poczatkowe}
17 model: toolbar.buttongroup
19 - fields: {name: Mastery, position: 0, slug: mastery}
20 model: toolbar.buttongroup
22 - fields: {name: "Nag\u0142\xF3wki", position: 0, slug: naglowki}
23 model: toolbar.buttongroup
25 - fields: {name: "Pocz\u0105tek dramatu", position: 0, slug: poczatek-dramatu}
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: Uwaga, position: 0, slug: uwaga}
38 model: toolbar.buttongroup
40 - fields: {name: Wersy, position: 0, slug: wersy}
41 model: toolbar.buttongroup
48 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "akap"}'
51 tooltip: wstawia akapit
59 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "akap_cd"}'
62 tooltip: "ci\u0105g dalszy akapitu po wewn\u0105trzakapitowym wtr\u0105ceniu"
68 label: akapit dialogowy
70 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "akap_dialog"}'
72 slug: akapit-dialogowy
73 tooltip: wstawia akapit dialogowy
81 params: '{"tag": "akap"}'
84 tooltip: "autotagowanie akapit\xF3w"
92 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_akt"}'
103 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "autor_utworu"}'
104 scriptlet: insert_tag
107 model: toolbar.button
114 params: '[["fulltextregexp", {"exprs": [["\ufeff", ""], ["$[\\s]*\\d+[\\s]*^",
115 ""], ["-\\s*^", ""], ["\\,\\.\\.|\\.\\,\\.|\\.\\.\\,", "..."], ["<(/?)P([aert])",
116 "<$1p$2"], ["[\u2014\u2013\u2010-]{2,}|[\u2014\u2013\u2010]+", "---"],
117 ["(\\s)-([^-])", "$1---$2"], ["([^-])-(\\s)", "$1---$2"], ["(\\d)-+(\\d)",
118 "$1--$2"], ["---(\\S)", "--- $1"], ["(\\S)---", "$1 ---"], ["<akap_dialog>\\s*-+\\s*",
119 "<akap_dialog>--- "]]}], ["lineregexp", {"exprs": [["^\\s+|\\s+$", ""],
120 ["\\s+", " "], ["(,,)\\s+", "$1"], ["\\s+(\")", "$1"], ["([^\\.])(\\s*)</p",
121 "$1.$2</p"], ["([\\.:;!\\?])([^\\s\\\\])", "$1 $2"], ["([^\\s])\\s+([\\.:;!\\?])",
122 "$1$2"], ["\\s+,([^,])", ",$1"], ["([^,]),([^\\s\\\\,])", "$1, $2"]]}]]'
124 slug: basic_correction
125 tooltip: "Wykonuj\u0119 podstawow\u0105 korekt\u0119 tekstu."
126 model: toolbar.button
131 label: "zamiana cudzys\u0142ow\xF3w 1"
133 params: '{"exprs": [["\u00ab|\u201e", ",,"], ["\u00bb", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
134 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
135 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
136 scriptlet: lineregexp
137 slug: cudzyslow-francuski
138 tooltip: "zamiana \" na ,, oraz \xABa\xBB na ,,a\""
139 model: toolbar.button
144 label: "zamiana cudzys\u0142ow\xF3w 2"
146 params: '{"exprs": [["\u00bb|\u201e", ",,"], ["\u00ab", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
147 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
148 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
149 scriptlet: lineregexp
150 slug: cudzyslow-niemiecki
151 tooltip: "zamienia \" na ,, oraz \xBBa\xAB na ,,a\""
152 model: toolbar.button
157 label: "cz\u0119\u015B\u0107/ksi\u0119ga"
159 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_czesc"}'
160 scriptlet: insert_tag
163 model: toolbar.button
170 params: '{"tag": "dedykacja"}'
171 scriptlet: insert_tag
174 model: toolbar.button
181 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "didaskalia"}'
182 scriptlet: insert_tag
185 model: toolbar.button
190 label: "didaskalia pocz\u0105tkowe"
192 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "miejsce_czas"}'
193 scriptlet: insert_tag
194 slug: didaskalia-poczatkowe
195 tooltip: "komentarze wprowadzaj\u0105ce przed tekstem dramatu"
196 model: toolbar.button
201 label: didaskalia tekstowe
203 params: '{"tag": "didask_tekst"}'
204 scriptlet: insert_tag
205 slug: didaskalia-tekstowe
206 tooltip: "didaskalia umieszczone w obr\u0119bie innego tekstu"
207 model: toolbar.button
212 label: "d\u0142ugi cyt. poet."
214 params: '{"tag": "poezja_cyt"}'
215 scriptlet: insert_tag
217 tooltip: "d\u0142ugi cytat wierszowany wyr\xF3\u017Cniony sk\u0142adem"
218 model: toolbar.button
223 label: "d\u0142ugi cytat"
225 params: '{"tag": "dlugi_cyt"}'
226 scriptlet: insert_tag
228 tooltip: "d\u0142ugi cytat wyr\xF3\u017Cniony sk\u0142adem"
229 model: toolbar.button
234 label: dramat wiersz.
236 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "dramat_wierszowany_l"}'
237 scriptlet: insert_tag
240 model: toolbar.button
245 label: "dramat wiersz./w. \u0142am"
247 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "dramat_wierszowany_lp"}'
248 scriptlet: insert_tag
249 slug: dramat-wiersz-w-lam
250 tooltip: "dramat wierszowany o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
251 model: toolbar.button
256 label: "dramat wsp\xF3\u0142czesny"
258 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "dramat_wspolczesny"}'
259 scriptlet: insert_tag
260 slug: dramat-wspolczesny
261 tooltip: "dramat wsp\xF3\u0142czesny (proz\u0105)"
262 model: toolbar.button
267 label: "dzie\u0142o nadrz\u0119dne"
269 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "dzielo_nadrzedne"}'
270 scriptlet: insert_tag
271 slug: dzielo-nadrzedne
273 model: toolbar.button
280 params: '{"tag": "extra"}'
281 scriptlet: insert_tag
283 tooltip: "uwagi dotycz\u0105ce sk\u0142adu"
284 model: toolbar.button
292 scriptlet: insert_tag
293 slug: htmleditor-print
295 model: toolbar.button
302 params: '{"padding_top": 1, "padding_bottom": 1, "tag": "kwestia"}'
303 scriptlet: insert_tag
305 tooltip: "wstawia kwesti\u0119"
306 model: toolbar.button
313 params: '[["insert_tag", {"tag": "akap"}], ["insert_tag", {"padding_top":
314 1, "padding_bottom": 1, "tag": "kwestia"}]]'
318 model: toolbar.button
325 params: '[["insert_stanza", {"tag": "strofa"}], ["insert_tag", {"padding_top":
326 1, "padding_bottom": 1, "tag": "kwestia"}]]'
330 model: toolbar.button
337 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "liryka_l"}'
338 scriptlet: insert_tag
341 model: toolbar.button
346 label: "liryka/w. \u0142am"
348 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "liryka_lp"}'
349 scriptlet: insert_tag
351 tooltip: "utw\xF3r liryczny o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
352 model: toolbar.button
357 label: "lista os\xF3b"
359 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "lista_osob"}'
360 scriptlet: insert_tag
362 tooltip: "lista os\xF3b poprzedzaj\u0105ca tekst dramatu"
363 model: toolbar.button
370 params: '{"padding_top": 1, "padding_bottom": 1, "tag": "lista_osoba", "attrs":
372 scriptlet: insert_tag
373 slug: lista-osob-pole
374 tooltip: osoby z takim samym opisem
375 model: toolbar.button
382 params: '{"tag": "mat"}'
383 scriptlet: insert_tag
385 tooltip: "wyra\u017Cenia matematyczne lub zmienne symboliczne"
386 model: toolbar.button
393 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "motto"}'
394 scriptlet: insert_tag
397 model: toolbar.button
404 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "motto_podpis"}'
405 scriptlet: insert_tag
408 model: toolbar.button
413 label: ",,\u2026\" na \xAB\u2026\xBB"
415 params: '{"exprs": [[",,", "\u00ab"], ["\"", "\u00bb"]]}'
416 scriptlet: fulltextregexp
418 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na francuskie"
419 model: toolbar.button
424 label: ",,\u2026\" na \xBB\u2026\xAB"
426 params: '{"exprs": [[",,", "\u00bb"], ["\"", "\u00ab"]]}'
427 scriptlet: fulltextregexp
429 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na niemieckie"
430 model: toolbar.button
435 label: "nag\u0142. dramatu"
437 params: '{"exprs": [["^AKT(\\s\\w*)$", "<naglowek_akt>AKT$1</naglowek_akt>"],
438 ["^SCENA(\\s\\w*)$", "<naglowek_scena>SCENA$1</naglowek_scena>"], ["([A-Z\u0104\u0106\u0118\u0141\u0143\u00d3\u015a\u017b\u0179]{2}[A-Z\u0104\u0106\u0118\u0141\u0143\u00d3\u015a\u017b\u0179\\s]+)$",
439 "<naglowek_osoba>$1</naglowek_osoba>"]]}'
440 scriptlet: lineregexp
442 tooltip: "autotagowanie akt\xF3w, scen, nag\u0142\xF3wk\xF3w os\xF3b"
443 model: toolbar.button
448 label: "nag\u0142\xF3wek kwestii"
450 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_osoba"}'
451 scriptlet: insert_tag
452 slug: naglowek-kwestii
453 tooltip: "nag\u0142\xF3wek kwestii - nazwa osoby"
454 model: toolbar.button
459 label: "nag\u0142\xF3wek listy"
461 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "naglowek_listy"}'
462 scriptlet: insert_tag
464 tooltip: "nag\u0142\xF3wek listy os\xF3b"
465 model: toolbar.button
472 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "nazwa_utworu"}'
473 scriptlet: insert_tag
476 model: toolbar.button
483 params: '{"tag": "nota"}'
484 scriptlet: insert_tag
487 model: toolbar.button
494 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "nota_red"}'
495 scriptlet: insert_tag
497 tooltip: nota redakcyjna
498 model: toolbar.button
505 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "opowiadanie"}'
506 scriptlet: insert_tag
509 model: toolbar.button
516 params: '{"tag": "osoba"}'
517 scriptlet: insert_tag
519 tooltip: "wstawia nazw\u0119 osoby w didaskaliach"
520 model: toolbar.button
525 label: osoba na liscie
527 params: '{"padding_top": 1, "padding_bottom": 1, "tag": "lista_osoba"}'
528 scriptlet: insert_tag
529 slug: osoba-na-liscie
530 tooltip: "nazwa osoby na liscie os\xF3b"
531 model: toolbar.button
536 label: "podrozdzia\u0142"
538 params: '{"tag": "naglowek_podrozdzial"}'
539 scriptlet: insert_tag
542 model: toolbar.button
547 label: "podtytu\u0142"
549 params: '{"tag": "podtytul"}'
550 scriptlet: insert_tag
553 model: toolbar.button
558 label: "powie\u015B\u0107"
560 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "powiesc"}'
561 scriptlet: insert_tag
564 model: toolbar.button
572 scriptlet: insert_tag
575 model: toolbar.button
580 label: przypis autorski
582 params: '{"tag": "pa"}'
583 scriptlet: insert_tag
584 slug: przypis-autorski
586 model: toolbar.button
591 label: przypis edytorski
593 params: '{"tag": "pe"}'
594 scriptlet: insert_tag
595 slug: przypis-edytorski
597 model: toolbar.button
602 label: przypis redaktorski
604 params: '{"tag": "pr"}'
605 scriptlet: insert_tag
606 slug: przypis-redaktorski
608 model: toolbar.button
613 label: "przypis t\u0142umacza"
615 params: '{"tag": "pt"}'
616 scriptlet: insert_tag
617 slug: przypis-tlumacza
619 model: toolbar.button
624 label: "rozdzia\u0142"
626 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_rozdzial"}'
627 scriptlet: insert_tag
630 model: toolbar.button
637 params: '{"tag": "naglowek_scena"}'
638 scriptlet: insert_tag
641 model: toolbar.button
648 params: '{"nocontent": "true", "tag": "sekcja_asterysk"}'
649 scriptlet: insert_tag
651 tooltip: rozdzielenie partii tekstu asteryskiem
652 model: toolbar.button
659 params: '{"nocontent": "true", "tag": "separator_linia"}'
660 scriptlet: insert_tag
662 tooltip: "rozdzielenie partii tekstu pozioma lini\u0105"
663 model: toolbar.button
668 label: "\u015Bwiat\u0142o"
670 params: '{"nocontent": "true", "tag": "sekcja_swiatlo"}'
671 scriptlet: insert_tag
673 tooltip: "\u015Bwiat\u0142o rozdzielaj\u0105ce sekcje tekstu"
674 model: toolbar.button
679 label: "s\u0142owo obce"
681 params: '{"tag": "slowo_obce"}'
682 scriptlet: insert_tag
684 tooltip: "frazy w j\u0119zykach innych ni\u017C polski/definiendum w przypisie"
685 model: toolbar.button
695 tooltip: slugifikacja
696 model: toolbar.button
701 label: "\u015Br\xF3dtytu\u0142"
703 params: '{"tag": "srodtytul"}'
704 scriptlet: insert_tag
707 model: toolbar.button
714 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "strofa"}'
715 scriptlet: insert_stanza
717 tooltip: "wstawia strof\u0119"
718 model: toolbar.button
725 params: '{"tag": "strofa"}'
728 tooltip: autotagowanie strof
729 model: toolbar.button
734 label: "tag g\u0142\xF3wny"
736 params: '{"tag": "utwor"}'
737 scriptlet: insert_tag
740 model: toolbar.button
745 label: "A<sup>\u2193</sup>"
750 tooltip: "Zamie\u0144 wielkie litery na ma\u0142e"
751 model: toolbar.button
756 label: "tytu\u0142 dzie\u0142a"
758 params: '{"tag": "tytul_dziela"}'
759 scriptlet: insert_tag
762 model: toolbar.button
767 label: "tytu\u0142 dzie\u0142a typ 1"
769 params: '{"tag": "tytul_dziela", "attrs": {"typ": "1"}}'
770 scriptlet: insert_tag
771 slug: tytul-dziela-typ
772 tooltip: "tytu\u0142 dzie\u0142a w cytowanym tytule dzie\u0142a"
773 model: toolbar.button
780 params: '{"tag": "uwaga"}'
781 scriptlet: insert_tag
783 tooltip: 'uwagi redaktorsko-korektorskie '
784 model: toolbar.button
791 params: '{"tag": "wers_akap"}'
792 scriptlet: insert_tag
794 tooltip: "wers rozpoczynaj\u0105cy si\u0119 wci\u0119ciem akapitowym"
795 model: toolbar.button
802 params: '{"tag": "wers_cd"}'
803 scriptlet: insert_tag
805 tooltip: "cz\u0119\u015B\u0107 wersu przeniesiona do innego wiersza"
806 model: toolbar.button
811 label: "wers mocno wci\u0119ty"
813 params: '{"tag": "wers_wciety", "attrs": {"typ": ""}}'
814 scriptlet: insert_tag
815 slug: wers-mocno-wciety
816 tooltip: "argumenty wersu wci\u0119tego: od 2 do 6"
817 model: toolbar.button
822 label: "wers wci\u0119ty"
824 params: '{"tag": "wers_wciety", "attrs": {"typ": "1"}}'
825 scriptlet: insert_tag
827 tooltip: "wstawia wers wci\u0119ty"
828 model: toolbar.button
833 label: "wersy wci\u0119te"
835 params: '{"padding": 1, "tag": "wers_wciety", "split": 1}'
838 tooltip: "autotagowanie wers\xF3w wci\u0119tych"
839 model: toolbar.button
846 params: '{"tag": "www"}'
847 scriptlet: insert_tag
850 model: toolbar.button
855 label: "wyr\xF3\u017Cnienie"
857 params: '{"tag": "wyroznienie"}'
858 scriptlet: insert_tag
860 tooltip: "wyr\xF3\u017Cnienie autorskie"
861 model: toolbar.button
868 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "wywiad"}'
869 scriptlet: insert_tag
872 model: toolbar.button
877 label: "wywiad odpowied\u017A"
879 params: '{"tag": "wywiad_odp"}'
880 scriptlet: insert_tag
881 slug: wywiad-odpowiedz
883 model: toolbar.button
888 label: wywiad pytanie
890 params: '{"tag": "wywiad_pyt"}'
891 scriptlet: insert_tag
894 model: toolbar.button
899 label: "zast\u0119pnik wersu"
901 params: '{"tag": "zastepnik_wersu"}'
902 scriptlet: insert_tag
903 slug: zastepnik-wersu
904 tooltip: wykropkowanie wersu
905 model: toolbar.button
907 - fields: {code: "$(params).each(function() {\n $.log(this[0], this[1]);\n \
908 \ editor.callScriptlet(this[0], panel, this[1]);\n\n});"}
909 model: toolbar.scriptlet
911 - fields: {code: "var texteditor = panel.texteditor;\nvar text = texteditor.selection();\n\
912 var start_tag = '<'+params.tag;\nfor (var attr in params.attrs) {\n \
913 \ start_tag += ' '+attr+'=\"' + params.attrs[attr] + '\"';\n};\nstart_tag\
914 \ += '>';\nvar end_tag = '</'+params.tag+'>';\n\nif(text.length > 0) {\n\
915 // tokenize\nvar output = ''\nvar token = ''\nfor(var index=0; index <\
916 \ text.length; index++)\n{\n if (text[index].match(/\\s/)) { // whitespace\n\
917 \ token += text[index];\n }\n else { // character\n \
918 \ output += token;\n if(output == token) output += start_tag;\n\
919 \ token = ''\n output += text[index];\n }\n}\n\nif( output[output.length-1]\
920 \ == '\\\\' ) {\n output = output.substr(0, output.length-1) + end_tag\
921 \ + '\\\\';\n} else {\n output += end_tag;\n}\noutput += token;\n}\n\
922 else {\n output = start_tag + end_tag;\n}\n\ntexteditor.replaceSelection(output);\n\
923 \nif (text.length == 0) {\n var pos = texteditor.cursorPosition();\n\
924 \ texteditor.selectLines(pos.line, pos.character + params.tag.length\
925 \ + 2);\n}\n\npanel.fireEvent('contentChanged');"}
926 model: toolbar.scriptlet
928 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
929 \ '', -1);\n\nvar cm = panel.texteditor;\nvar exprs = $.map(params.exprs,\
930 \ function(expr) {\n\n var opts = \"g\";\n\n if(expr.length > 2)\n\
931 \n opts = expr[2];\n\n return {rx: new RegExp(expr[0], opts),\
932 \ repl: expr[1]};\n\n});\n\n\n\nvar partial = true;\n\nvar text = cm.selection();\n\
933 \n\n\nif(!text) {\n\n var cpos = cm.cursorPosition();\n\n cpos.line\
934 \ = cm.lineNumber(cpos.line)\n\n cm.selectLines(cm.firstLine(), 0,\
935 \ cm.lastLine(), 0);\n\n text = cm.selection();\n\n partial = false;\n\
936 \n}\n\n\n\nvar changed = 0;\nvar lines = text.split('\\n');\nvar lines\
937 \ = $.map(lines, function(line) { \n var old_line = line;\n $(exprs).each(function()\
938 \ { \n var expr = this;\n line = line.replace(expr.rx, expr.repl);\n\
939 \ });\n\n if(old_line != line) changed += 1;\n return line;\n\
940 });\n\nif(changed > 0) \n{\n cm.replaceSelection( lines.join('\\n')\
941 \ );\n panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
942 \ 'Zmieniono ' + changed + ' linii.', 1500);\n editor.advancePopupQueue();\n\
943 }\nelse {\n editor.showPopup('generic-info', 'Brak zmian w tek\u015B\
944 cie', 1500);\n editor.advancePopupQueue();\n}\n\nif(!partial)\n \
945 \ cm.selectLines( cm.nthLine(cpos.line), cpos.character )"}
946 model: toolbar.scriptlet
948 - fields: {code: '-'}
949 model: toolbar.scriptlet
951 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
952 \ '', -1);\n$.log(editor, panel, params);\nvar cm = panel.texteditor;\n\
953 var exprs = $.map(params.exprs, function(expr) {\n var opts = \"mg\"\
954 ;\n if(expr.length > 2)\n opts = expr[2];\n\n return {rx:\
955 \ new RegExp(expr[0], opts), repl: expr[1]};\n});\n\nvar partial = true;\n\
956 var text = cm.selection();\n\nif(!text) {\n var cpos = cm.cursorPosition();\n\
957 \ cpos.line = cm.lineNumber(cpos.line)\n cm.selectLines(cm.firstLine(),\
958 \ 0, cm.lastLine(), 0);\n\n text = cm.selection();\n partial = false;\n\
959 }\n\nvar original = text;\n$(exprs).each(function() { \n text = text.replace(this.rx,\
960 \ this.repl);\n});\n\nif( original != text) \n{ \n cm.replaceSelection(text);\n\
961 \ panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
962 \ 'Zmieniono tekst' );\n editor.advancePopupQueue();\n}\nelse {\n \
963 \ editor.showPopup('generic-info', 'Brak zmian w tek\u015Bcie.');\n\
964 \ editor.advancePopupQueue();\n}\n\nif(!partial) {\n cm.selectLines(\
965 \ cm.nthLine(cpos.line), cpos.character );\n}"}
966 model: toolbar.scriptlet
968 - fields: {code: "var cm = panel.texteditor;\r\nvar text = cm.selection();\r\n\r\
969 \nif(!text) return;\r\nvar repl = '';\r\nvar lcase = text.toLowerCase();\r\
970 \nvar ucase = text.toUpperCase();\r\n\r\nif(lcase == text) repl = ucase;\
971 \ /* was lowercase */\r\nelse if(ucase != text) repl = lcase; /* neither\
972 \ lower- or upper-case */\r\nelse { /* upper case -> title-case */\r\n\
973 \ var words = $(lcase.split(/\\s/)).map(function() { \r\n if(this.length\
974 \ > 0) { return this[0].toUpperCase() + this.slice(1); } else { return\
975 \ ''}\r\n }); \r\n repl = words.join(' ');\r\n} \r\n\r\nif(repl !=\
976 \ text) {\r\n cm.replaceSelection(repl);\r\n panel.fireEvent('contentChanged');\r\
978 model: toolbar.scriptlet
980 - fields: {code: "var texteditor = panel.texteditor;\r\nvar text = texteditor.selection();\r\
981 \n\r\nif(text) {\r\n var verses = text.split('\\n');\r\n var text =\
982 \ ''; var buf = ''; var ebuf = '';\r\n var first = true;\r\n\r\n for(var\
983 \ i=0; i < verses.length; i++) {\r\n verse = verses[i].replace(/^\\\
984 s+/, \"\").replace(/\\s+$/, \"\"); \r\n if(verse) {\r\n text\
985 \ += (buf ? buf + '/\\n' : '') + ebuf;\r\n buf = (first ? '<strofa>\\\
986 n' : '') + verses[i];\r\n ebuf = '';\r\n first = false;\r\n\
987 \ } else { \r\n ebuf += '\\n' + verses[i];\r\n }\r\n };\r\
988 \n text = text + buf + '\\n</strofa>' + ebuf; \r\n texteditor.replaceSelection(text);\r\
989 \n}\r\n\r\nif (!text) {\r\n var pos = texteditor.cursorPosition();\r\
990 \n texteditor.selectLines(pos.line, pos.character + 6 + 2);\r\n}\r\n\
991 \r\n\r\n\r\n\r\n\r\n\r\n\r\npanel.fireEvent('contentChanged');"}
992 model: toolbar.scriptlet
994 - fields: {code: '-'}
995 model: toolbar.scriptlet