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*^", ""], ["\\,\\.\\.|\\.\\,\\.|\\.\\.\\,", "..."]]}], ["lineregexp",
102 {"exprs": [["^\\s+|\\s+$", ""], ["\\s+", " "], ["(,,)\\s+|\\s+(\")", "$1"],
103 ["(\\d)[\u2014-](\\d)", "$1--$2"], ["[\u2014]", "---"], ["<(/?)P([aert])",
104 "<$1p$2"], ["([^\\.])(\\s*)</p", "$1.$2</p"], ["([,\\.:;!\\?])([^\\s\\\\])",
105 "$1 $2"], ["([^\\s])\\s+([,\\.:;!\\?])", "$1$2"]]}]]'
107 slug: basic_correction
108 tooltip: "Wykonuj\u0119 operacj\u0119 z novel-pages i poem-pages."
109 model: toolbar.button
114 label: "zamiana cudzys\u0142ow\xF3w 1"
116 params: '{"exprs": [["\u00ab|\u201e", ",,"], ["\u00bb", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
117 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
118 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
119 scriptlet: lineregexp
120 slug: cudzyslow-francuski
121 tooltip: "zamiana \" na ,, oraz \xABa\xBB na ,,a\""
122 model: toolbar.button
127 label: "zamiana cudzys\u0142ow\xF3w 2"
129 params: '{"exprs": [["\u00bb|\u201e", ",,"], ["\u00ab", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
130 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
131 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
132 scriptlet: lineregexp
133 slug: cudzyslow-niemiecki
134 tooltip: "zamienia \" na ,, oraz \xBBa\xAB na ,,a\""
135 model: toolbar.button
140 label: "cz\u0119\u015B\u0107/ksi\u0119ga"
142 params: '{"tag": "naglowek_czesc"}'
143 scriptlet: insert_tag
146 model: toolbar.button
153 params: '{"tag": "dedykacja"}'
154 scriptlet: insert_tag
157 model: toolbar.button
164 params: '{"tag": "didaskalia"}'
165 scriptlet: insert_tag
168 model: toolbar.button
173 label: "didaskalia pocz\u0105tkowe"
175 params: '{"tag": "miejsce_czas"}'
176 scriptlet: insert_tag
177 slug: didaskalia-poczatkowe
178 tooltip: "komentarze wprowadzaj\u0105ce przed tekstem dramatu"
179 model: toolbar.button
184 label: didaskalia tekstowe
186 params: '{"tag": "didask_tekst"}'
187 scriptlet: insert_tag
188 slug: didaskalia-tekstowe
189 tooltip: "didaskalia umieszczone w obr\u0119bie innego tekstu"
190 model: toolbar.button
195 label: "d\u0142ugi cyt. poet."
197 params: '{"tag": "poezja_cyt"}'
198 scriptlet: insert_tag
200 tooltip: "d\u0142ugi cytat wierszowany wyr\xF3\u017Cniony sk\u0142adem"
201 model: toolbar.button
206 label: "d\u0142ugi cytat"
208 params: '{"tag": "dlugi_cyt"}'
209 scriptlet: insert_tag
211 tooltip: "d\u0142ugi cytat wyr\xF3\u017Cniony sk\u0142adem"
212 model: toolbar.button
217 label: dramat wiersz.
219 params: '{"tag": "dramat_wierszowany_l"}'
220 scriptlet: insert_tag
223 model: toolbar.button
228 label: "dramat wiersz./w. \u0142am"
230 params: '{"tag": "dramat_wierszowany_lp"}'
231 scriptlet: insert_tag
232 slug: dramat-wiersz-w-lam
233 tooltip: "dramat wierszowany o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
234 model: toolbar.button
239 label: "dramat wsp\xF3\u0142czesny"
241 params: '{"tag": "dramat_wspolczesny"}'
242 scriptlet: insert_tag
243 slug: dramat-wspolczesny
244 tooltip: "dramat wsp\xF3\u0142czesny (proz\u0105)"
245 model: toolbar.button
250 label: "dzie\u0142o nadrz\u0119dne"
252 params: '{"tag": "dzielo_nadrzedne"}'
253 scriptlet: insert_tag
254 slug: dzielo-nadrzedne
256 model: toolbar.button
263 params: '{"tag": "extra"}'
264 scriptlet: insert_tag
266 tooltip: "uwagi dotycz\u0105ce sk\u0142adu"
267 model: toolbar.button
275 scriptlet: insert_tag
276 slug: htmleditor-print
278 model: toolbar.button
285 params: '{"tag": "kwestia"}'
286 scriptlet: insert_tag
288 tooltip: "wstawia kwesti\u0119"
289 model: toolbar.button
296 params: '{"tag": "liryka_l"}'
297 scriptlet: insert_tag
300 model: toolbar.button
305 label: "liryka/w. \u0142am"
307 params: '{"tag": "liryka_lp"}'
308 scriptlet: insert_tag
310 tooltip: "utw\xF3r liryczny o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
311 model: toolbar.button
316 label: "lista os\xF3b"
318 params: '{"tag": "lista_osob"}'
319 scriptlet: insert_tag
321 tooltip: "lista os\xF3b poprzedzaj\u0105ca tekst dramatu"
322 model: toolbar.button
329 params: '{"tag": "lista_osoba", "attrs": {"typ": ""}}'
330 scriptlet: insert_tag
331 slug: lista-osob-pole
332 tooltip: osoby z takim samym opisem
333 model: toolbar.button
340 params: '{"tag": "mat"}'
341 scriptlet: insert_tag
343 tooltip: "wyra\u017Cenia matematyczne lub zmienne symboliczne"
344 model: toolbar.button
351 params: '{"tag": "motto"}'
352 scriptlet: insert_tag
355 model: toolbar.button
362 params: '{"tag": "motto_podpis"}'
363 scriptlet: insert_tag
366 model: toolbar.button
371 label: "nag\u0142\xF3wek kwestii"
373 params: '{"tag": "naglowek_osoba"}'
374 scriptlet: insert_tag
375 slug: naglowek-kwestii
376 tooltip: "nag\u0142\xF3wek kwestii - nazwa osoby"
377 model: toolbar.button
382 label: "nag\u0142\xF3wek listy"
384 params: '{"tag": "naglowek_listy"}'
385 scriptlet: insert_tag
387 tooltip: "nag\u0142\xF3wek listy os\xF3b"
388 model: toolbar.button
395 params: '{"tag": "nazwa_utworu"}'
396 scriptlet: insert_tag
399 model: toolbar.button
406 params: '{"tag": "nota"}'
407 scriptlet: insert_tag
410 model: toolbar.button
417 params: '{"tag": "opowiadanie"}'
418 scriptlet: insert_tag
421 model: toolbar.button
428 params: '{"tag": "osoba"}'
429 scriptlet: insert_tag
431 tooltip: "wstawia nazw\u0119 osoby w didaskaliach"
432 model: toolbar.button
437 label: osoba na liscie
439 params: '{"tag": "lista_osoba"}'
440 scriptlet: insert_tag
441 slug: osoba-na-liscie
442 tooltip: "nazwa osoby na liscie os\xF3b"
443 model: toolbar.button
448 label: "podrozdzia\u0142"
450 params: '{"tag": "naglowek_podrozdzial"}'
451 scriptlet: insert_tag
454 model: toolbar.button
459 label: "podtytu\u0142"
461 params: '{"tag": "podtytul"}'
462 scriptlet: insert_tag
465 model: toolbar.button
470 label: "powie\u015B\u0107"
472 params: '{"tag": "powiesc"}'
473 scriptlet: insert_tag
476 model: toolbar.button
484 scriptlet: insert_tag
487 model: toolbar.button
492 label: przypis autorski
494 params: '{"tag": "pa"}'
495 scriptlet: insert_tag
496 slug: przypis-autorski
498 model: toolbar.button
503 label: przypis edytorski
505 params: '{"tag": "pe"}'
506 scriptlet: insert_tag
507 slug: przypis-edytorski
509 model: toolbar.button
514 label: przypis redaktorski
516 params: '{"tag": "pr"}'
517 scriptlet: insert_tag
518 slug: przypis-redaktorski
520 model: toolbar.button
525 label: "przypis t\u0142umacza"
527 params: '{"tag": "pt"}'
528 scriptlet: insert_tag
529 slug: przypis-tlumacza
531 model: toolbar.button
536 label: "rozdzia\u0142"
538 params: '{"tag": "naglowek_rozdzial"}'
539 scriptlet: insert_tag
542 model: toolbar.button
549 params: '{"tag": "naglowek_scena"}'
550 scriptlet: insert_tag
553 model: toolbar.button
560 params: '{"nocontent": "true", "tag": "sekcja_asterysk"}'
561 scriptlet: insert_tag
563 tooltip: rozdzielenie partii tekstu asteryskiem
564 model: toolbar.button
571 params: '{"nocontent": "true", "tag": "separator_linia"}'
572 scriptlet: insert_tag
574 tooltip: "rozdzielenie partii tekstu pozioma lini\u0105"
575 model: toolbar.button
580 label: "\u015Bwiat\u0142o"
582 params: '{"nocontent": "true", "tag": "sekcja_swiatlo"}'
583 scriptlet: insert_tag
585 tooltip: "\u015Bwiat\u0142o rozdzielaj\u0105ce sekcje tekstu"
586 model: toolbar.button
591 label: "s\u0142owo obce"
593 params: '{"tag": "slowo_obce"}'
594 scriptlet: insert_tag
596 tooltip: "frazy w j\u0119zykach innych ni\u017C polski/definiendum w przypisie"
597 model: toolbar.button
602 label: "\u015Br\xF3dtytu\u0142"
604 params: '{"tag": "srodtytul"}'
605 scriptlet: insert_tag
608 model: toolbar.button
613 label: "Usu\u0144 spacj\u0119"
615 params: '{"exprs": [["^\\s+|\\s+$", ""], ["\\s+", " "], ["(,,)\\s+", "$1"],
616 ["\\s+(\")", "$1"]]}'
617 scriptlet: lineregexp
618 slug: strip_whitespace
619 tooltip: "Usuwa zb\u0119dne spacj\u0119 z dokumentu."
620 model: toolbar.button
627 params: '{"tag": "strofa"}'
628 scriptlet: insert_stanza
630 tooltip: "wstawia strof\u0119"
631 model: toolbar.button
636 label: "tag g\u0142\xF3wny"
638 params: '{"tag": "utwor"}'
639 scriptlet: insert_tag
642 model: toolbar.button
647 label: "A<sup>\u2193</sup>"
652 tooltip: "Zamie\u0144 wielkie litery na ma\u0142e"
653 model: toolbar.button
658 label: "tytu\u0142 dzie\u0142a"
660 params: '{"tag": "tytul_dziela"}'
661 scriptlet: insert_tag
664 model: toolbar.button
669 label: "tytu\u0142 dzie\u0142a typ 1"
671 params: '{"tag": "tytul_dziela", "attrs": {"typ": "1"}}'
672 scriptlet: insert_tag
673 slug: tytul-dziela-typ
674 tooltip: "tytu\u0142 dzie\u0142a w cytowanym tytule dzie\u0142a"
675 model: toolbar.button
682 params: '{"tag": "uwaga"}'
683 scriptlet: insert_tag
685 tooltip: 'uwagi redaktorsko-korektorskie '
686 model: toolbar.button
693 params: '{"tag": "wers_akap"}'
694 scriptlet: insert_tag
696 tooltip: "wers rozpoczynaj\u0105cy si\u0119 wci\u0119ciem akapitowym"
697 model: toolbar.button
704 params: '{"tag": "wers_cd"}'
705 scriptlet: insert_tag
707 tooltip: "cz\u0119\u015B\u0107 wersu przeniesiona do innego wiersza"
708 model: toolbar.button
713 label: "wers mocno wci\u0119ty"
715 params: '{"tag": "wers_wciety", "attrs": {"typ": ""}}'
716 scriptlet: insert_tag
717 slug: wers-mocno-wciety
718 tooltip: "argumenty wersu wci\u0119tego: od 2 do 6"
719 model: toolbar.button
724 label: "wers wci\u0119ty"
726 params: '{"tag": "wers_wciety", "attrs": {"typ": "1"}}'
727 scriptlet: insert_tag
729 tooltip: "wstawia wers wci\u0119ty"
730 model: toolbar.button
737 params: '{"tag": "www"}'
738 scriptlet: insert_tag
741 model: toolbar.button
746 label: "wyr\xF3\u017Cnienie"
748 params: '{"tag": "wyroznienie"}'
749 scriptlet: insert_tag
751 tooltip: "wyr\xF3\u017Cnienie autorskie"
752 model: toolbar.button
759 params: '{"tag": "wywiad"}'
760 scriptlet: insert_tag
763 model: toolbar.button
768 label: "wywiad odpowied\u017A"
770 params: '{"tag": "wywiad_odp"}'
771 scriptlet: insert_tag
772 slug: wywiad-odpowiedz
774 model: toolbar.button
779 label: wywiad pytanie
781 params: '{"tag": "wywiad_pyt"}'
782 scriptlet: insert_tag
785 model: toolbar.button
790 label: "Zamie\u0144 dywiz"
792 params: '{"exprs": [["(\\s)-(\\s)", "$1---$2"], ["^(\\s*)-(\\s)", "$1---$2"],
793 ["(\\s)-(\\s*)$", "$1---$2"], ["(\\d)[\u2014\u2013\u2010-](\\d)", "$1--$2"],
794 ["\u2014\u2013\u2010", "---"]]}'
795 scriptlet: lineregexp
797 tooltip: "Zamienia '\u2014' na '---', oraz '1\u20142' na '1--2'."
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