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"],
123 ["([A-Za-z])0", "$1o"], ["(\\. )0([A-Za-z])", "$1O$2"], [" 0([A-Za-z])", " o$1"],
124 ["([A-Za-z])1", "$1l"], ["(\\. )1([A-Za-z])", "$1L$2"], [" 1([A-Za-z])", " l$1"]]}]]'
126 slug: basic_correction
127 tooltip: "Wykonuj\u0119 podstawow\u0105 korekt\u0119 tekstu."
128 model: toolbar.button
133 label: "zamiana cudzys\u0142ow\xF3w 1"
135 params: '{"exprs": [["\u00ab|\u201e", ",,"], ["\u00bb", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
136 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
137 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
138 scriptlet: lineregexp
139 slug: cudzyslow-francuski
140 tooltip: "zamiana \" na ,, oraz \xABa\xBB na ,,a\""
141 model: toolbar.button
146 label: "zamiana cudzys\u0142ow\xF3w 2"
148 params: '{"exprs": [["\u00bb|\u201e", ",,"], ["\u00ab", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
149 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
150 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
151 scriptlet: lineregexp
152 slug: cudzyslow-niemiecki
153 tooltip: "zamienia \" na ,, oraz \xBBa\xAB na ,,a\""
154 model: toolbar.button
159 label: "cz\u0119\u015B\u0107/ksi\u0119ga"
161 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_czesc"}'
162 scriptlet: insert_tag
165 model: toolbar.button
172 params: '{"tag": "dedykacja"}'
173 scriptlet: insert_tag
176 model: toolbar.button
183 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "didaskalia"}'
184 scriptlet: insert_tag
187 model: toolbar.button
192 label: "didaskalia pocz\u0105tkowe"
194 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "miejsce_czas"}'
195 scriptlet: insert_tag
196 slug: didaskalia-poczatkowe
197 tooltip: "komentarze wprowadzaj\u0105ce przed tekstem dramatu"
198 model: toolbar.button
203 label: didaskalia tekstowe
205 params: '{"tag": "didask_tekst"}'
206 scriptlet: insert_tag
207 slug: didaskalia-tekstowe
208 tooltip: "didaskalia umieszczone w obr\u0119bie innego tekstu"
209 model: toolbar.button
214 label: "d\u0142ugi cytat"
216 params: '{"tag": "dlugi_cytat"}'
217 scriptlet: insert_tag
219 tooltip: "d\u0142ugi cytat wyr\xF3\u017Cniony sk\u0142adem"
220 model: toolbar.button
225 label: "d\u0142ugi cyt. poet."
227 params: '{"tag": "poezja_cyt"}'
228 scriptlet: insert_tag
230 tooltip: "d\u0142ugi cytat wierszowany wyr\xF3\u017Cniony sk\u0142adem"
231 model: toolbar.button
236 label: dramat wiersz.
238 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "dramat_wierszowany_l"}'
239 scriptlet: insert_tag
242 model: toolbar.button
247 label: "dramat wiersz./w. \u0142am"
249 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "dramat_wierszowany_lp"}'
250 scriptlet: insert_tag
251 slug: dramat-wiersz-w-lam
252 tooltip: "dramat wierszowany o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
253 model: toolbar.button
258 label: "dramat wsp\xF3\u0142czesny"
260 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "dramat_wspolczesny"}'
261 scriptlet: insert_tag
262 slug: dramat-wspolczesny
263 tooltip: "dramat wsp\xF3\u0142czesny (proz\u0105)"
264 model: toolbar.button
269 label: "dzie\u0142o nadrz\u0119dne"
271 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "dzielo_nadrzedne"}'
272 scriptlet: insert_tag
273 slug: dzielo-nadrzedne
275 model: toolbar.button
282 params: '{"tag": "extra"}'
283 scriptlet: insert_tag
285 tooltip: "uwagi dotycz\u0105ce sk\u0142adu"
286 model: toolbar.button
294 scriptlet: insert_tag
295 slug: htmleditor-print
297 model: toolbar.button
304 params: '{"padding_top": 1, "padding_bottom": 1, "tag": "kwestia"}'
305 scriptlet: insert_tag
307 tooltip: "wstawia kwesti\u0119"
308 model: toolbar.button
315 params: '[["insert_tag", {"tag": "akap"}], ["insert_tag", {"padding_top":
316 1, "padding_bottom": 1, "tag": "kwestia"}]]'
320 model: toolbar.button
327 params: '[["insert_stanza", {"tag": "strofa"}], ["insert_tag", {"padding_top":
328 1, "padding_bottom": 1, "tag": "kwestia"}]]'
332 model: toolbar.button
339 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "liryka_l"}'
340 scriptlet: insert_tag
343 model: toolbar.button
348 label: "liryka/w. \u0142am"
350 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "liryka_lp"}'
351 scriptlet: insert_tag
353 tooltip: "utw\xF3r liryczny o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
354 model: toolbar.button
359 label: "lista os\xF3b"
361 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "lista_osob"}'
362 scriptlet: insert_tag
364 tooltip: "lista os\xF3b poprzedzaj\u0105ca tekst dramatu"
365 model: toolbar.button
372 params: '{"padding_top": 1, "padding_bottom": 1, "tag": "lista_osoba", "attrs":
374 scriptlet: insert_tag
375 slug: lista-osob-pole
376 tooltip: osoby z takim samym opisem
377 model: toolbar.button
384 params: '{"tag": "mat"}'
385 scriptlet: insert_tag
387 tooltip: "wyra\u017Cenia matematyczne lub zmienne symboliczne"
388 model: toolbar.button
395 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "motto"}'
396 scriptlet: insert_tag
399 model: toolbar.button
406 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "motto_podpis"}'
407 scriptlet: insert_tag
410 model: toolbar.button
415 label: ",,\u2026\" na \xAB\u2026\xBB"
417 params: '{"exprs": [[",,", "\u00ab"], ["\"", "\u00bb"]]}'
418 scriptlet: fulltextregexp
420 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na francuskie"
421 model: toolbar.button
426 label: "nag\u0142. dramatu"
428 params: '{"exprs": [["^AKT(\\s\\w*)$", "<naglowek_akt>AKT$1</naglowek_akt>"],
429 ["^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]+)$",
430 "<naglowek_osoba>$1</naglowek_osoba>"]]}'
431 scriptlet: lineregexp
433 tooltip: "autotagowanie akt\xF3w, scen, nag\u0142\xF3wk\xF3w os\xF3b"
434 model: toolbar.button
439 label: "nag\u0142\xF3wek kwestii"
441 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_osoba"}'
442 scriptlet: insert_tag
443 slug: naglowek-kwestii
444 tooltip: "nag\u0142\xF3wek kwestii - nazwa osoby"
445 model: toolbar.button
450 label: "nag\u0142\xF3wek listy"
452 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "naglowek_listy"}'
453 scriptlet: insert_tag
455 tooltip: "nag\u0142\xF3wek listy os\xF3b"
456 model: toolbar.button
461 label: ",,\u2026\" na \xBB\u2026\xAB"
463 params: '{"exprs": [[",,", "\u00bb"], ["\"", "\u00ab"]]}'
464 scriptlet: fulltextregexp
466 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na niemieckie"
467 model: toolbar.button
474 params: '{"padding_top": 1, "padding_bottom": 2, "tag": "nazwa_utworu"}'
475 scriptlet: insert_tag
478 model: toolbar.button
485 params: '{"tag": "nota"}'
486 scriptlet: insert_tag
489 model: toolbar.button
496 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "nota_red"}'
497 scriptlet: insert_tag
499 tooltip: nota redakcyjna
500 model: toolbar.button
507 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "opowiadanie"}'
508 scriptlet: insert_tag
511 model: toolbar.button
518 params: '{"tag": "osoba"}'
519 scriptlet: insert_tag
521 tooltip: "wstawia nazw\u0119 osoby w didaskaliach"
522 model: toolbar.button
527 label: osoba na liscie
529 params: '{"padding_top": 1, "padding_bottom": 1, "tag": "lista_osoba"}'
530 scriptlet: insert_tag
531 slug: osoba-na-liscie
532 tooltip: "nazwa osoby na liscie os\xF3b"
533 model: toolbar.button
538 label: "podrozdzia\u0142"
540 params: '{"tag": "naglowek_podrozdzial"}'
541 scriptlet: insert_tag
544 model: toolbar.button
549 label: "podtytu\u0142"
551 params: '{"tag": "podtytul"}'
552 scriptlet: insert_tag
555 model: toolbar.button
560 label: "powie\u015B\u0107"
562 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "powiesc"}'
563 scriptlet: insert_tag
566 model: toolbar.button
574 scriptlet: insert_tag
577 model: toolbar.button
582 label: przypis autorski
584 params: '{"tag": "pa"}'
585 scriptlet: insert_tag
586 slug: przypis-autorski
588 model: toolbar.button
593 label: przypis edytorski
595 params: '{"tag": "pe"}'
596 scriptlet: insert_tag
597 slug: przypis-edytorski
599 model: toolbar.button
604 label: przypis redaktorski
606 params: '{"tag": "pr"}'
607 scriptlet: insert_tag
608 slug: przypis-redaktorski
610 model: toolbar.button
615 label: "przypis t\u0142umacza"
617 params: '{"tag": "pt"}'
618 scriptlet: insert_tag
619 slug: przypis-tlumacza
621 model: toolbar.button
626 label: "rozdzia\u0142"
628 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_rozdzial"}'
629 scriptlet: insert_tag
632 model: toolbar.button
639 params: '{"tag": "naglowek_scena"}'
640 scriptlet: insert_tag
643 model: toolbar.button
650 params: '{"nocontent": "true", "tag": "sekcja_asterysk"}'
651 scriptlet: insert_tag
653 tooltip: rozdzielenie partii tekstu asteryskiem
654 model: toolbar.button
661 params: '{"nocontent": "true", "tag": "separator_linia"}'
662 scriptlet: insert_tag
664 tooltip: "rozdzielenie partii tekstu pozioma lini\u0105"
665 model: toolbar.button
670 label: "\u015Bwiat\u0142o"
672 params: '{"nocontent": "true", "tag": "sekcja_swiatlo"}'
673 scriptlet: insert_tag
675 tooltip: "\u015Bwiat\u0142o rozdzielaj\u0105ce sekcje tekstu"
676 model: toolbar.button
681 label: "s\u0142owo obce"
683 params: '{"tag": "slowo_obce"}'
684 scriptlet: insert_tag
686 tooltip: "frazy w j\u0119zykach innych ni\u017C polski/definiendum w przypisie"
687 model: toolbar.button
697 tooltip: slugifikacja
698 model: toolbar.button
703 label: "\u015Br\xF3dtytu\u0142"
705 params: '{"tag": "srodtytul"}'
706 scriptlet: insert_tag
709 model: toolbar.button
716 params: '{"padding_top": 1, "padding_bottom": 3, "tag": "strofa"}'
717 scriptlet: insert_stanza
719 tooltip: "wstawia strof\u0119"
720 model: toolbar.button
727 params: '{"tag": "strofa"}'
730 tooltip: autotagowanie strof
731 model: toolbar.button
736 label: "tag g\u0142\xF3wny"
738 params: '{"tag": "utwor"}'
739 scriptlet: insert_tag
742 model: toolbar.button
747 label: "A<sup>\u2193</sup>"
752 tooltip: "Zamie\u0144 wielkie litery na ma\u0142e"
753 model: toolbar.button
760 params: '{"text": "\n<!-- TRIM_BEGIN -->\n"}'
761 scriptlet: insert_text
763 tooltip: "Wstawia pocz\u0105tkowy znacznik ci\u0119cia cz\u0119\u015Bci"
764 model: toolbar.button
771 params: '{"text": "\n<!-- TRIM_END -->\n"}'
772 scriptlet: insert_text
774 tooltip: "Wstawia ko\u0144cowy znacznik ci\u0119cia cz\u0119\u015Bci"
775 model: toolbar.button
780 label: "tytu\u0142 dzie\u0142a"
782 params: '{"tag": "tytul_dziela"}'
783 scriptlet: insert_tag
786 model: toolbar.button
791 label: "tytu\u0142 dzie\u0142a typ 1"
793 params: '{"tag": "tytul_dziela", "attrs": {"typ": "1"}}'
794 scriptlet: insert_tag
795 slug: tytul-dziela-typ
796 tooltip: "tytu\u0142 dzie\u0142a w cytowanym tytule dzie\u0142a"
797 model: toolbar.button
804 params: '{"tag": "uwaga"}'
805 scriptlet: insert_tag
807 tooltip: 'uwagi redaktorsko-korektorskie '
808 model: toolbar.button
815 params: '{"tag": "wers_akap"}'
816 scriptlet: insert_tag
818 tooltip: "wers rozpoczynaj\u0105cy si\u0119 wci\u0119ciem akapitowym"
819 model: toolbar.button
826 params: '{"tag": "wers_cd"}'
827 scriptlet: insert_tag
829 tooltip: "cz\u0119\u015B\u0107 wersu przeniesiona do innego wiersza"
830 model: toolbar.button
835 label: "wers mocno wci\u0119ty"
837 params: '{"tag": "wers_wciety", "attrs": {"typ": ""}}'
838 scriptlet: insert_tag
839 slug: wers-mocno-wciety
840 tooltip: "argumenty wersu wci\u0119tego: od 2 do 6"
841 model: toolbar.button
846 label: "wers wci\u0119ty"
848 params: '{"tag": "wers_wciety", "attrs": {"typ": "1"}}'
849 scriptlet: insert_tag
851 tooltip: "wstawia wers wci\u0119ty"
852 model: toolbar.button
857 label: "wersy wci\u0119te"
859 params: '{"padding": 1, "tag": "wers_wciety", "split": 1}'
862 tooltip: "autotagowanie wers\xF3w wci\u0119tych"
863 model: toolbar.button
870 params: '{"tag": "www"}'
871 scriptlet: insert_tag
874 model: toolbar.button
879 label: "wyr\xF3\u017Cnienie"
881 params: '{"tag": "wyroznienie"}'
882 scriptlet: insert_tag
884 tooltip: "wyr\xF3\u017Cnienie autorskie"
885 model: toolbar.button
892 params: '{"padding_top": 1, "padding_bottom": 4, "tag": "wywiad"}'
893 scriptlet: insert_tag
896 model: toolbar.button
901 label: "wywiad odpowied\u017A"
903 params: '{"tag": "wywiad_odp"}'
904 scriptlet: insert_tag
905 slug: wywiad-odpowiedz
907 model: toolbar.button
912 label: wywiad pytanie
914 params: '{"tag": "wywiad_pyt"}'
915 scriptlet: insert_tag
918 model: toolbar.button
923 label: "zast\u0119pnik wersu"
925 params: '{"tag": "zastepnik_wersu"}'
926 scriptlet: insert_tag
927 slug: zastepnik-wersu
928 tooltip: wykropkowanie wersu
929 model: toolbar.button
931 - fields: {code: "$(params).each(function() {\n $.log(this[0], this[1]);\n \
932 \ editor.callScriptlet(this[0], panel, this[1]);\n\n});"}
933 model: toolbar.scriptlet
935 - fields: {code: "var texteditor = panel.texteditor;\nvar text = texteditor.selection();\n\
936 var start_tag = '<'+params.tag;\nfor (var attr in params.attrs) {\n \
937 \ start_tag += ' '+attr+'=\"' + params.attrs[attr] + '\"';\n};\nstart_tag\
938 \ += '>';\nvar end_tag = '</'+params.tag+'>';\n\nif(text.length > 0) {\n\
939 // tokenize\nvar output = ''\nvar token = ''\nfor(var index=0; index <\
940 \ text.length; index++)\n{\n if (text[index].match(/\\s/)) { // whitespace\n\
941 \ token += text[index];\n }\n else { // character\n \
942 \ output += token;\n if(output == token) output += start_tag;\n\
943 \ token = ''\n output += text[index];\n }\n}\n\nif( output[output.length-1]\
944 \ == '\\\\' ) {\n output = output.substr(0, output.length-1) + end_tag\
945 \ + '\\\\';\n} else {\n output += end_tag;\n}\noutput += token;\n}\n\
946 else {\n output = start_tag + end_tag;\n}\n\ntexteditor.replaceSelection(output);\n\
947 \nif (text.length == 0) {\n var pos = texteditor.cursorPosition();\n\
948 \ texteditor.selectLines(pos.line, pos.character + params.tag.length\
949 \ + 2);\n}\n\npanel.fireEvent('contentChanged');"}
950 model: toolbar.scriptlet
952 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
953 \ '', -1);\n\nvar cm = panel.texteditor;\nvar exprs = $.map(params.exprs,\
954 \ function(expr) {\n\n var opts = \"g\";\n\n if(expr.length > 2)\n\
955 \n opts = expr[2];\n\n return {rx: new RegExp(expr[0], opts),\
956 \ repl: expr[1]};\n\n});\n\n\n\nvar partial = true;\n\nvar text = cm.selection();\n\
957 \n\n\nif(!text) {\n\n var cpos = cm.cursorPosition();\n\n cpos.line\
958 \ = cm.lineNumber(cpos.line)\n\n cm.selectLines(cm.firstLine(), 0,\
959 \ cm.lastLine(), 0);\n\n text = cm.selection();\n\n partial = false;\n\
960 \n}\n\n\n\nvar changed = 0;\nvar lines = text.split('\\n');\nvar lines\
961 \ = $.map(lines, function(line) { \n var old_line = line;\n $(exprs).each(function()\
962 \ { \n var expr = this;\n line = line.replace(expr.rx, expr.repl);\n\
963 \ });\n\n if(old_line != line) changed += 1;\n return line;\n\
964 });\n\nif(changed > 0) \n{\n cm.replaceSelection( lines.join('\\n')\
965 \ );\n panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
966 \ 'Zmieniono ' + changed + ' linii.', 1500);\n editor.advancePopupQueue();\n\
967 }\nelse {\n editor.showPopup('generic-info', 'Brak zmian w tek\u015B\
968 cie', 1500);\n editor.advancePopupQueue();\n}\n\nif(!partial)\n \
969 \ cm.selectLines( cm.nthLine(cpos.line), cpos.character )"}
970 model: toolbar.scriptlet
972 - fields: {code: '-'}
973 model: toolbar.scriptlet
975 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
976 \ '', -1);\n$.log(editor, panel, params);\nvar cm = panel.texteditor;\n\
977 var exprs = $.map(params.exprs, function(expr) {\n var opts = \"mg\"\
978 ;\n if(expr.length > 2)\n opts = expr[2];\n\n return {rx:\
979 \ new RegExp(expr[0], opts), repl: expr[1]};\n});\n\nvar partial = true;\n\
980 var text = cm.selection();\n\nif(!text) {\n var cpos = cm.cursorPosition();\n\
981 \ cpos.line = cm.lineNumber(cpos.line)\n cm.selectLines(cm.firstLine(),\
982 \ 0, cm.lastLine(), 0);\n\n text = cm.selection();\n partial = false;\n\
983 }\n\nvar original = text;\n$(exprs).each(function() { \n text = text.replace(this.rx,\
984 \ this.repl);\n});\n\nif( original != text) \n{ \n cm.replaceSelection(text);\n\
985 \ panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
986 \ 'Zmieniono tekst' );\n editor.advancePopupQueue();\n}\nelse {\n \
987 \ editor.showPopup('generic-info', 'Brak zmian w tek\u015Bcie.');\n\
988 \ editor.advancePopupQueue();\n}\n\nif(!partial) {\n cm.selectLines(\
989 \ cm.nthLine(cpos.line), cpos.character );\n}"}
990 model: toolbar.scriptlet
992 - fields: {code: '-'}
993 model: toolbar.scriptlet
995 - fields: {code: "var cm = panel.texteditor;\r\nvar text = cm.selection();\r\n\r\
996 \nif(!text) return;\r\nvar repl = '';\r\nvar lcase = text.toLowerCase();\r\
997 \nvar ucase = text.toUpperCase();\r\n\r\nif(lcase == text) repl = ucase;\
998 \ /* was lowercase */\r\nelse if(ucase != text) repl = lcase; /* neither\
999 \ lower- or upper-case */\r\nelse { /* upper case -> title-case */\r\n\
1000 \ var words = $(lcase.split(/\\s/)).map(function() { \r\n if(this.length\
1001 \ > 0) { return this[0].toUpperCase() + this.slice(1); } else { return\
1002 \ ''}\r\n }); \r\n repl = words.join(' ');\r\n} \r\n\r\nif(repl !=\
1003 \ text) {\r\n cm.replaceSelection(repl);\r\n panel.fireEvent('contentChanged');\r\
1005 model: toolbar.scriptlet
1007 - fields: {code: "var texteditor = panel.texteditor;\r\nvar text = texteditor.selection();\r\
1008 \n\r\nif(text) {\r\n var verses = text.split('\\n');\r\n var text =\
1009 \ ''; var buf = ''; var ebuf = '';\r\n var first = true;\r\n\r\n for(var\
1010 \ i=0; i < verses.length; i++) {\r\n verse = verses[i].replace(/^\\\
1011 s+/, \"\").replace(/\\s+$/, \"\"); \r\n if(verse) {\r\n text\
1012 \ += (buf ? buf + '/\\n' : '') + ebuf;\r\n buf = (first ? '<strofa>\\\
1013 n' : '') + verses[i];\r\n ebuf = '';\r\n first = false;\r\n\
1014 \ } else { \r\n ebuf += '\\n' + verses[i];\r\n }\r\n };\r\
1015 \n text = text + buf + '\\n</strofa>' + ebuf; \r\n texteditor.replaceSelection(text);\r\
1016 \n}\r\n\r\nif (!text) {\r\n var pos = texteditor.cursorPosition();\r\
1017 \n texteditor.selectLines(pos.line, pos.character + 6 + 2);\r\n}\r\n\
1018 \r\n\r\n\r\n\r\n\r\n\r\n\r\npanel.fireEvent('contentChanged');"}
1019 model: toolbar.scriptlet
1021 - fields: {code: '-'}
1022 model: toolbar.scriptlet