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 cytat"
214 params: '{"tag": "dlugi_cytat"}'
215 scriptlet: insert_tag
217 tooltip: "d\u0142ugi cytat wyr\xF3\u017Cniony sk\u0142adem"
218 model: toolbar.button
223 label: "d\u0142ugi cyt. poet."
225 params: '{"tag": "poezja_cyt"}'
226 scriptlet: insert_tag
228 tooltip: "d\u0142ugi cytat wierszowany 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: "nag\u0142. dramatu"
426 params: '{"exprs": [["^AKT(\\s\\w*)$", "<naglowek_akt>AKT$1</naglowek_akt>"],
427 ["^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]+)$",
428 "<naglowek_osoba>$1</naglowek_osoba>"]]}'
429 scriptlet: lineregexp
431 tooltip: "autotagowanie akt\xF3w, scen, nag\u0142\xF3wk\xF3w os\xF3b"
432 model: toolbar.button
437 label: "nag\u0142\xF3wek kwestii"
439 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_osoba"}'
440 scriptlet: insert_tag
441 slug: naglowek-kwestii
442 tooltip: "nag\u0142\xF3wek kwestii - nazwa osoby"
443 model: toolbar.button
448 label: "nag\u0142\xF3wek listy"
450 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "naglowek_listy"}'
451 scriptlet: insert_tag
453 tooltip: "nag\u0142\xF3wek listy os\xF3b"
454 model: toolbar.button
459 label: ",,\u2026\" na \xBB\u2026\xAB"
461 params: '{"exprs": [[",,", "\u00bb"], ["\"", "\u00ab"]]}'
462 scriptlet: fulltextregexp
464 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na niemieckie"
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
758 params: '{"text": "\n<!-- TRIM_BEGIN -->\n"}'
759 scriptlet: insert_text
761 tooltip: "Wstawia pocz\u0105tkowy znacznik ci\u0119cia cz\u0119\u015Bci"
762 model: toolbar.button
769 params: '{"text": "\n<!-- TRIM_END -->\n"}'
770 scriptlet: insert_text
772 tooltip: "Wstawia ko\u0144cowy znacznik ci\u0119cia cz\u0119\u015Bci"
773 model: toolbar.button
778 label: "tytu\u0142 dzie\u0142a"
780 params: '{"tag": "tytul_dziela"}'
781 scriptlet: insert_tag
784 model: toolbar.button
789 label: "tytu\u0142 dzie\u0142a typ 1"
791 params: '{"tag": "tytul_dziela", "attrs": {"typ": "1"}}'
792 scriptlet: insert_tag
793 slug: tytul-dziela-typ
794 tooltip: "tytu\u0142 dzie\u0142a w cytowanym tytule dzie\u0142a"
795 model: toolbar.button
802 params: '{"tag": "uwaga"}'
803 scriptlet: insert_tag
805 tooltip: 'uwagi redaktorsko-korektorskie '
806 model: toolbar.button
813 params: '{"tag": "wers_akap"}'
814 scriptlet: insert_tag
816 tooltip: "wers rozpoczynaj\u0105cy si\u0119 wci\u0119ciem akapitowym"
817 model: toolbar.button
824 params: '{"tag": "wers_cd"}'
825 scriptlet: insert_tag
827 tooltip: "cz\u0119\u015B\u0107 wersu przeniesiona do innego wiersza"
828 model: toolbar.button
833 label: "wers mocno wci\u0119ty"
835 params: '{"tag": "wers_wciety", "attrs": {"typ": ""}}'
836 scriptlet: insert_tag
837 slug: wers-mocno-wciety
838 tooltip: "argumenty wersu wci\u0119tego: od 2 do 6"
839 model: toolbar.button
844 label: "wers wci\u0119ty"
846 params: '{"tag": "wers_wciety", "attrs": {"typ": "1"}}'
847 scriptlet: insert_tag
849 tooltip: "wstawia wers wci\u0119ty"
850 model: toolbar.button
855 label: "wersy wci\u0119te"
857 params: '{"padding": 1, "tag": "wers_wciety", "split": 1}'
860 tooltip: "autotagowanie wers\xF3w wci\u0119tych"
861 model: toolbar.button
868 params: '{"tag": "www"}'
869 scriptlet: insert_tag
872 model: toolbar.button
877 label: "wyr\xF3\u017Cnienie"
879 params: '{"tag": "wyroznienie"}'
880 scriptlet: insert_tag
882 tooltip: "wyr\xF3\u017Cnienie autorskie"
883 model: toolbar.button
890 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "wywiad"}'
891 scriptlet: insert_tag
894 model: toolbar.button
899 label: "wywiad odpowied\u017A"
901 params: '{"tag": "wywiad_odp"}'
902 scriptlet: insert_tag
903 slug: wywiad-odpowiedz
905 model: toolbar.button
910 label: wywiad pytanie
912 params: '{"tag": "wywiad_pyt"}'
913 scriptlet: insert_tag
916 model: toolbar.button
921 label: "zast\u0119pnik wersu"
923 params: '{"tag": "zastepnik_wersu"}'
924 scriptlet: insert_tag
925 slug: zastepnik-wersu
926 tooltip: wykropkowanie wersu
927 model: toolbar.button
929 - fields: {code: "$(params).each(function() {\n $.log(this[0], this[1]);\n \
930 \ editor.callScriptlet(this[0], panel, this[1]);\n\n});"}
931 model: toolbar.scriptlet
933 - fields: {code: "var texteditor = panel.texteditor;\nvar text = texteditor.selection();\n\
934 var start_tag = '<'+params.tag;\nfor (var attr in params.attrs) {\n \
935 \ start_tag += ' '+attr+'=\"' + params.attrs[attr] + '\"';\n};\nstart_tag\
936 \ += '>';\nvar end_tag = '</'+params.tag+'>';\n\nif(text.length > 0) {\n\
937 // tokenize\nvar output = ''\nvar token = ''\nfor(var index=0; index <\
938 \ text.length; index++)\n{\n if (text[index].match(/\\s/)) { // whitespace\n\
939 \ token += text[index];\n }\n else { // character\n \
940 \ output += token;\n if(output == token) output += start_tag;\n\
941 \ token = ''\n output += text[index];\n }\n}\n\nif( output[output.length-1]\
942 \ == '\\\\' ) {\n output = output.substr(0, output.length-1) + end_tag\
943 \ + '\\\\';\n} else {\n output += end_tag;\n}\noutput += token;\n}\n\
944 else {\n output = start_tag + end_tag;\n}\n\ntexteditor.replaceSelection(output);\n\
945 \nif (text.length == 0) {\n var pos = texteditor.cursorPosition();\n\
946 \ texteditor.selectLines(pos.line, pos.character + params.tag.length\
947 \ + 2);\n}\n\npanel.fireEvent('contentChanged');"}
948 model: toolbar.scriptlet
950 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
951 \ '', -1);\n\nvar cm = panel.texteditor;\nvar exprs = $.map(params.exprs,\
952 \ function(expr) {\n\n var opts = \"g\";\n\n if(expr.length > 2)\n\
953 \n opts = expr[2];\n\n return {rx: new RegExp(expr[0], opts),\
954 \ repl: expr[1]};\n\n});\n\n\n\nvar partial = true;\n\nvar text = cm.selection();\n\
955 \n\n\nif(!text) {\n\n var cpos = cm.cursorPosition();\n\n cpos.line\
956 \ = cm.lineNumber(cpos.line)\n\n cm.selectLines(cm.firstLine(), 0,\
957 \ cm.lastLine(), 0);\n\n text = cm.selection();\n\n partial = false;\n\
958 \n}\n\n\n\nvar changed = 0;\nvar lines = text.split('\\n');\nvar lines\
959 \ = $.map(lines, function(line) { \n var old_line = line;\n $(exprs).each(function()\
960 \ { \n var expr = this;\n line = line.replace(expr.rx, expr.repl);\n\
961 \ });\n\n if(old_line != line) changed += 1;\n return line;\n\
962 });\n\nif(changed > 0) \n{\n cm.replaceSelection( lines.join('\\n')\
963 \ );\n panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
964 \ 'Zmieniono ' + changed + ' linii.', 1500);\n editor.advancePopupQueue();\n\
965 }\nelse {\n editor.showPopup('generic-info', 'Brak zmian w tek\u015B\
966 cie', 1500);\n editor.advancePopupQueue();\n}\n\nif(!partial)\n \
967 \ cm.selectLines( cm.nthLine(cpos.line), cpos.character )"}
968 model: toolbar.scriptlet
970 - fields: {code: '-'}
971 model: toolbar.scriptlet
973 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
974 \ '', -1);\n$.log(editor, panel, params);\nvar cm = panel.texteditor;\n\
975 var exprs = $.map(params.exprs, function(expr) {\n var opts = \"mg\"\
976 ;\n if(expr.length > 2)\n opts = expr[2];\n\n return {rx:\
977 \ new RegExp(expr[0], opts), repl: expr[1]};\n});\n\nvar partial = true;\n\
978 var text = cm.selection();\n\nif(!text) {\n var cpos = cm.cursorPosition();\n\
979 \ cpos.line = cm.lineNumber(cpos.line)\n cm.selectLines(cm.firstLine(),\
980 \ 0, cm.lastLine(), 0);\n\n text = cm.selection();\n partial = false;\n\
981 }\n\nvar original = text;\n$(exprs).each(function() { \n text = text.replace(this.rx,\
982 \ this.repl);\n});\n\nif( original != text) \n{ \n cm.replaceSelection(text);\n\
983 \ panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
984 \ 'Zmieniono tekst' );\n editor.advancePopupQueue();\n}\nelse {\n \
985 \ editor.showPopup('generic-info', 'Brak zmian w tek\u015Bcie.');\n\
986 \ editor.advancePopupQueue();\n}\n\nif(!partial) {\n cm.selectLines(\
987 \ cm.nthLine(cpos.line), cpos.character );\n}"}
988 model: toolbar.scriptlet
990 - fields: {code: '-'}
991 model: toolbar.scriptlet
993 - fields: {code: "var cm = panel.texteditor;\r\nvar text = cm.selection();\r\n\r\
994 \nif(!text) return;\r\nvar repl = '';\r\nvar lcase = text.toLowerCase();\r\
995 \nvar ucase = text.toUpperCase();\r\n\r\nif(lcase == text) repl = ucase;\
996 \ /* was lowercase */\r\nelse if(ucase != text) repl = lcase; /* neither\
997 \ lower- or upper-case */\r\nelse { /* upper case -> title-case */\r\n\
998 \ var words = $(lcase.split(/\\s/)).map(function() { \r\n if(this.length\
999 \ > 0) { return this[0].toUpperCase() + this.slice(1); } else { return\
1000 \ ''}\r\n }); \r\n repl = words.join(' ');\r\n} \r\n\r\nif(repl !=\
1001 \ text) {\r\n cm.replaceSelection(repl);\r\n panel.fireEvent('contentChanged');\r\
1003 model: toolbar.scriptlet
1005 - fields: {code: "var texteditor = panel.texteditor;\r\nvar text = texteditor.selection();\r\
1006 \n\r\nif(text) {\r\n var verses = text.split('\\n');\r\n var text =\
1007 \ ''; var buf = ''; var ebuf = '';\r\n var first = true;\r\n\r\n for(var\
1008 \ i=0; i < verses.length; i++) {\r\n verse = verses[i].replace(/^\\\
1009 s+/, \"\").replace(/\\s+$/, \"\"); \r\n if(verse) {\r\n text\
1010 \ += (buf ? buf + '/\\n' : '') + ebuf;\r\n buf = (first ? '<strofa>\\\
1011 n' : '') + verses[i];\r\n ebuf = '';\r\n first = false;\r\n\
1012 \ } else { \r\n ebuf += '\\n' + verses[i];\r\n }\r\n };\r\
1013 \n text = text + buf + '\\n</strofa>' + ebuf; \r\n texteditor.replaceSelection(text);\r\
1014 \n}\r\n\r\nif (!text) {\r\n var pos = texteditor.cursorPosition();\r\
1015 \n texteditor.selectLines(pos.line, pos.character + 6 + 2);\r\n}\r\n\
1016 \r\n\r\n\r\n\r\n\r\n\r\n\r\npanel.fireEvent('contentChanged');"}
1017 model: toolbar.scriptlet
1019 - fields: {code: '-'}
1020 model: toolbar.scriptlet