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
46 params: '{"tag": "akap"}'
49 tooltip: wstawia akapit
58 params: '{"tag": "akap_cd"}'
61 tooltip: "ci\u0105g dalszy akapitu po wewn\u0105trzakapitowym wtr\u0105ceniu"
68 label: akapit dialogowy
70 params: '{"tag": "akap_dialog"}'
72 slug: akapit-dialogowy
73 tooltip: wstawia akapit dialogowy
82 params: '{"tag": "akt"}'
94 params: '{"tag": "autor_utworu"}'
106 params: '[["fulltextregexp", {"exprs": [["\ufeff", ""], ["$[\\s]*\\d+[\\s]*^",
107 ""], ["-\\s*^", ""], ["\\,\\.\\.|\\.\\,\\.|\\.\\.\\,", "..."]]}], ["lineregexp",
108 {"exprs": [["^\\s+|\\s+$", ""], ["\\s+", " "], ["(,,)\\s+|\\s+(\")", "$1"],
109 ["(\\d)[\u2014-](\\d)", "$1--$2"], ["[\u2014]", "---"], ["<(/?)P([aert])",
110 "<$1p$2"], ["([^\\.])(\\s*)</p", "$1.$2</p"], ["([,\\.:;!\\?])([^\\s\\\\])",
111 "$1 $2"], ["([^\\s])\\s+([,\\.:;!\\?])", "$1$2"]]}]]'
113 slug: basic_correction
114 tooltip: "Wykonuj\u0119 operacj\u0119 z novel-pages i poem-pages."
115 model: toolbar.button
121 label: "zamiana cudzys\u0142ow\xF3w 1"
123 params: '{"exprs": [["\u00ab|\u201e", ",,"], ["\u00bb", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
124 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
125 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
126 scriptlet: lineregexp
127 slug: cudzyslow-francuski
128 tooltip: "zamiana \" na ,, oraz \xABa\xBB na ,,a\""
129 model: toolbar.button
135 label: "zamiana cudzys\u0142ow\xF3w 2"
137 params: '{"exprs": [["\u00bb|\u201e", ",,"], ["\u00ab", "\""], ["([^=])\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
138 "$1,,$2"], ["^\"([\u0104\u0118\u00d3\u0141\u017b\u0179\u0106\u0143\u0105\u017c\u017a\u015b\u0144\u00f3\u0142\u0107\\w])",
139 ",,$1"], ["(,,)\\s+|\\s+(\")", "$1"]]}'
140 scriptlet: lineregexp
141 slug: cudzyslow-niemiecki
142 tooltip: "zamienia \" na ,, oraz \xBBa\xAB na ,,a\""
143 model: toolbar.button
149 label: "cz\u0119\u015B\u0107/ksi\u0119ga"
151 params: '{"tag": "naglowek_czesc"}'
152 scriptlet: insert_tag
155 model: toolbar.button
163 params: '{"tag": "dedykacja"}'
164 scriptlet: insert_tag
167 model: toolbar.button
175 params: '{"tag": "didaskalia"}'
176 scriptlet: insert_tag
179 model: toolbar.button
185 label: "didaskalia pocz\u0105tkowe"
187 params: '{"tag": "miejsce_czas"}'
188 scriptlet: insert_tag
189 slug: didaskalia-poczatkowe
190 tooltip: "komentarze wprowadzaj\u0105ce przed tekstem dramatu"
191 model: toolbar.button
197 label: didaskalia tekstowe
199 params: '{"tag": "didask_tekst"}'
200 scriptlet: insert_tag
201 slug: didaskalia-tekstowe
202 tooltip: "didaskalia umieszczone w obr\u0119bie innego tekstu"
203 model: toolbar.button
209 label: "d\u0142ugi cyt. poet."
211 params: '{"tag": "poezja_cyt"}'
212 scriptlet: insert_tag
214 tooltip: "d\u0142ugi cytat wierszowany wyr\xF3\u017Cniony sk\u0142adem"
215 model: toolbar.button
221 label: "d\u0142ugi cytat"
223 params: '{"tag": "dlugi_cyt"}'
224 scriptlet: insert_tag
226 tooltip: "d\u0142ugi cytat wyr\xF3\u017Cniony sk\u0142adem"
227 model: toolbar.button
233 label: dramat wiersz.
235 params: '{"tag": "dramat_wierszowany_l"}'
236 scriptlet: insert_tag
239 model: toolbar.button
245 label: "dramat wiersz./w. \u0142am"
247 params: '{"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
257 label: "dramat wsp\xF3\u0142czesny"
259 params: '{"tag": "dramat_wspolczesny"}'
260 scriptlet: insert_tag
261 slug: dramat-wspolczesny
262 tooltip: "dramat wsp\xF3\u0142czesny (proz\u0105)"
263 model: toolbar.button
269 label: "dzie\u0142o nadrz\u0119dne"
271 params: '{"tag": "dzielo_nadrzedne"}'
272 scriptlet: insert_tag
273 slug: dzielo-nadrzedne
275 model: toolbar.button
283 params: '{"tag": "extra"}'
284 scriptlet: insert_tag
286 tooltip: "uwagi dotycz\u0105ce sk\u0142adu"
287 model: toolbar.button
296 scriptlet: insert_tag
297 slug: htmleditor-print
299 model: toolbar.button
307 params: '{"tag": "kwestia"}'
308 scriptlet: insert_tag
310 tooltip: "wstawia kwesti\u0119"
311 model: toolbar.button
319 params: '{"tag": "liryka_l"}'
320 scriptlet: insert_tag
323 model: toolbar.button
329 label: "liryka/w. \u0142am"
331 params: '{"tag": "liryka_lp"}'
332 scriptlet: insert_tag
334 tooltip: "utw\xF3r liryczny o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
335 model: toolbar.button
341 label: "lista os\xF3b"
343 params: '{"tag": "lista_osob"}'
344 scriptlet: insert_tag
346 tooltip: "lista os\xF3b poprzedzaj\u0105ca tekst dramatu"
347 model: toolbar.button
355 params: '{"tag": "lista_osoba", "attrs": {"typ": ""}}'
356 scriptlet: insert_tag
357 slug: lista-osob-pole
358 tooltip: osoby z takim samym opisem
359 model: toolbar.button
367 params: '{"tag": "mat"}'
368 scriptlet: insert_tag
370 tooltip: "wyra\u017Cenia matematyczne lub zmienne symboliczne"
371 model: toolbar.button
379 params: '{"tag": "motto"}'
380 scriptlet: insert_tag
383 model: toolbar.button
391 params: '{"tag": "motto_podpis"}'
392 scriptlet: insert_tag
395 model: toolbar.button
401 label: "nag\u0142\xF3wek kwestii"
403 params: '{"tag": "naglowek_osoba"}'
404 scriptlet: insert_tag
405 slug: naglowek-kwestii
406 tooltip: "nag\u0142\xF3wek kwestii - nazwa osoby"
407 model: toolbar.button
413 label: "nag\u0142\xF3wek listy"
415 params: '{"tag": "naglowek_listy"}'
416 scriptlet: insert_tag
418 tooltip: "nag\u0142\xF3wek listy os\xF3b"
419 model: toolbar.button
427 params: '{"tag": "nazwa_utworu"}'
428 scriptlet: insert_tag
431 model: toolbar.button
439 params: '{"tag": "nota"}'
440 scriptlet: insert_tag
443 model: toolbar.button
451 params: '{"tag": "opowiadanie"}'
452 scriptlet: insert_tag
455 model: toolbar.button
463 params: '{"tag": "osoba"}'
464 scriptlet: insert_tag
466 tooltip: "wstawia nazw\u0119 osoby w didaskaliach"
467 model: toolbar.button
473 label: osoba na liscie
475 params: '{"tag": "lista_osoba"}'
476 scriptlet: insert_tag
477 slug: osoba-na-liscie
478 tooltip: "nazwa osoby na liscie os\xF3b"
479 model: toolbar.button
485 label: "podrozdzia\u0142"
487 params: '{"tag": "naglowek_podrozdzial"}'
488 scriptlet: insert_tag
491 model: toolbar.button
497 label: "podtytu\u0142"
499 params: '{"tag": "podtytul"}'
500 scriptlet: insert_tag
503 model: toolbar.button
509 label: "powie\u015B\u0107"
511 params: '{"tag": "powiesc"}'
512 scriptlet: insert_tag
515 model: toolbar.button
524 scriptlet: insert_tag
527 model: toolbar.button
533 label: przypis autorski
535 params: '{"tag": "pa"}'
536 scriptlet: insert_tag
537 slug: przypis-autorski
539 model: toolbar.button
545 label: przypis edytorski
547 params: '{"tag": "pe"}'
548 scriptlet: insert_tag
549 slug: przypis-edytorski
551 model: toolbar.button
557 label: przypis redaktorski
559 params: '{"tag": "pr"}'
560 scriptlet: insert_tag
561 slug: przypis-redaktorski
563 model: toolbar.button
569 label: "przypis t\u0142umacza"
571 params: '{"tag": "pt"}'
572 scriptlet: insert_tag
573 slug: przypis-tlumacza
575 model: toolbar.button
581 label: "rozdzia\u0142"
583 params: '{"tag": "naglowek_rozdzial"}'
584 scriptlet: insert_tag
587 model: toolbar.button
595 params: '{"tag": "naglowek_scena"}'
596 scriptlet: insert_tag
599 model: toolbar.button
607 params: '{"nocontent": "true", "tag": "sekcja_asterysk"}'
608 scriptlet: insert_tag
610 tooltip: rozdzielenie partii tekstu asteryskiem
611 model: toolbar.button
619 params: '{"nocontent": "true", "tag": "separator_linia"}'
620 scriptlet: insert_tag
622 tooltip: "rozdzielenie partii tekstu pozioma lini\u0105"
623 model: toolbar.button
629 label: "\u015Bwiat\u0142o"
631 params: '{"nocontent": "true", "tag": "sekcja_swiatlo"}'
632 scriptlet: insert_tag
634 tooltip: "\u015Bwiat\u0142o rozdzielaj\u0105ce sekcje tekstu"
635 model: toolbar.button
641 label: "s\u0142owo obce"
643 params: '{"tag": "slowo_obce"}'
644 scriptlet: insert_tag
646 tooltip: "frazy w j\u0119zykach innych ni\u017C polski/definiendum w przypisie"
647 model: toolbar.button
653 label: "\u015Br\xF3dtytu\u0142"
655 params: '{"tag": "srodtytul"}'
656 scriptlet: insert_tag
659 model: toolbar.button
665 label: "Usu\u0144 spacj\u0119"
667 params: '{"exprs": [["^\\s+|\\s+$", ""], ["\\s+", " "], ["(,,)\\s+", "$1"],
668 ["\\s+(\")", "$1"]]}'
669 scriptlet: lineregexp
670 slug: strip_whitespace
671 tooltip: "Usuwa zb\u0119dne spacj\u0119 z dokumentu."
672 model: toolbar.button
680 params: '{"tag": "strofa"}'
681 scriptlet: insert_stanza
683 tooltip: "wstawia strof\u0119"
684 model: toolbar.button
690 label: "tag g\u0142\xF3wny"
692 params: '{"tag": "utwor"}'
693 scriptlet: insert_tag
696 model: toolbar.button
702 label: "A<sup>\u2193</sup>"
707 tooltip: "Zamie\u0144 wielkie litery na ma\u0142e"
708 model: toolbar.button
714 label: "tytu\u0142 dzie\u0142a"
716 params: '{"tag": "tytul_dziela"}'
717 scriptlet: insert_tag
720 model: toolbar.button
726 label: "tytu\u0142 dzie\u0142a typ 1"
728 params: '{"tag": "tytul_dziela", "attrs": {"typ": "1"}}'
729 scriptlet: insert_tag
730 slug: tytul-dziela-typ
731 tooltip: "tytu\u0142 dzie\u0142a w cytowanym tytule dzie\u0142a"
732 model: toolbar.button
740 params: '{"tag": "uwaga"}'
741 scriptlet: insert_tag
743 tooltip: 'uwagi redaktorsko-korektorskie '
744 model: toolbar.button
752 params: '{"tag": "wers_akap"}'
753 scriptlet: insert_tag
755 tooltip: "wers rozpoczynaj\u0105cy si\u0119 wci\u0119ciem akapitowym"
756 model: toolbar.button
764 params: '{"tag": "wers_cd"}'
765 scriptlet: insert_tag
767 tooltip: "cz\u0119\u015B\u0107 wersu przeniesiona do innego wiersza"
768 model: toolbar.button
774 label: "wers mocno wci\u0119ty"
776 params: '{"tag": "wers_wciety", "attrs": {"typ": ""}}'
777 scriptlet: insert_tag
778 slug: wers-mocno-wciety
779 tooltip: "argumenty wersu wci\u0119tego: od 2 do 6"
780 model: toolbar.button
786 label: "wers wci\u0119ty"
788 params: '{"tag": "wers_wciety", "attrs": {"typ": "1"}}'
789 scriptlet: insert_tag
791 tooltip: "wstawia wers wci\u0119ty"
792 model: toolbar.button
800 params: '{"tag": "www"}'
801 scriptlet: insert_tag
804 model: toolbar.button
810 label: "wyr\xF3\u017Cnienie"
812 params: '{"tag": "wyroznienie"}'
813 scriptlet: insert_tag
815 tooltip: "wyr\xF3\u017Cnienie autorskie"
816 model: toolbar.button
824 params: '{"tag": "wywiad"}'
825 scriptlet: insert_tag
828 model: toolbar.button
834 label: "wywiad odpowied\u017A"
836 params: '{"tag": "wywiad_odp"}'
837 scriptlet: insert_tag
838 slug: wywiad-odpowiedz
840 model: toolbar.button
846 label: wywiad pytanie
848 params: '{"tag": "wywiad_pyt"}'
849 scriptlet: insert_tag
852 model: toolbar.button
858 label: "Zamie\u0144 dywiz"
860 params: '{"exprs": [["(\\s)-(\\s)", "$1---$2"], ["^(\\s*)-(\\s)", "$1---$2"],
861 ["(\\s)-(\\s*)$", "$1---$2"], ["(\\d)[\u2014\u2013\u2010-](\\d)", "$1--$2"],
862 ["\u2014\u2013\u2010", "---"]]}'
863 scriptlet: lineregexp
865 tooltip: "Zamienia '\u2014' na '---', oraz '1\u20142' na '1--2'."
866 model: toolbar.button
872 label: "zast\u0119pnik wersu"
874 params: '{"tag": "zastepnik_wersu"}'
875 scriptlet: insert_tag
876 slug: zastepnik-wersu
877 tooltip: wykropkowanie wersu
878 model: toolbar.button
880 - fields: {code: "var texteditor = panel.texteditor;\nvar text = texteditor.selection();\n\
881 var start_tag = '<'+params.tag;\nfor (var attr in params.attrs) {\n \
882 \ start_tag += ' '+attr+'=\"' + params.attrs[attr] + '\"';\n};\nstart_tag\
883 \ += '>';\nvar end_tag = '</'+params.tag+'>';\n\nif(text.length > 0) {\n\
884 // tokenize\nvar output = ''\nvar token = ''\nfor(var index=0; index <\
885 \ text.length; index++)\n{\n if (text[index].match(/\\s/)) { // whitespace\n\
886 \ token += text[index];\n }\n else { // character\n \
887 \ output += token;\n if(output == token) output += start_tag;\n\
888 \ token = ''\n output += text[index];\n }\n}\n\nif( output[output.length-1]\
889 \ == '\\\\' ) {\n output = output.substr(0, output.length-1) + end_tag\
890 \ + '\\\\';\n} else {\n output += end_tag;\n}\noutput += token;\n}\n\
891 else {\n output = start_tag + end_tag;\n}\n\ntexteditor.replaceSelection(output);\n\
892 \nif (text.length == 0) {\n var pos = texteditor.cursorPosition();\n\
893 \ texteditor.selectLines(pos.line, pos.character + params.tag.length\
894 \ + 2);\n}\n\npanel.fireEvent('contentChanged');"}
895 model: toolbar.scriptlet
897 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
898 \ '', -1);\n\nvar cm = panel.texteditor;\nvar exprs = $.map(params.exprs,\
899 \ function(expr) {\n\n var opts = \"g\";\n\n if(expr.length > 2)\n\
900 \n opts = expr[2];\n\n return {rx: new RegExp(expr[0], opts),\
901 \ repl: expr[1]};\n\n});\n\n\n\nvar partial = true;\n\nvar text = cm.selection();\n\
902 \n\n\nif(!text) {\n\n var cpos = cm.cursorPosition();\n\n cpos.line\
903 \ = cm.lineNumber(cpos.line)\n\n cm.selectLines(cm.firstLine(), 0,\
904 \ cm.lastLine(), 0);\n\n text = cm.selection();\n\n partial = false;\n\
905 \n}\n\n\n\nvar changed = 0;\nvar lines = text.split('\\n');\nvar lines\
906 \ = $.map(lines, function(line) { \n var old_line = line;\n $(exprs).each(function()\
907 \ { \n var expr = this;\n line = line.replace(expr.rx, expr.repl);\n\
908 \ });\n\n if(old_line != line) changed += 1;\n return line;\n\
909 });\n\nif(changed > 0) \n{\n cm.replaceSelection( lines.join('\\n')\
910 \ );\n panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
911 \ 'Zmieniono ' + changed + ' linii.', 1500);\n editor.advancePopupQueue();\n\
912 }\nelse {\n editor.showPopup('generic-info', 'Brak zmian w tek\u015B\
913 cie', 1500);\n editor.advancePopupQueue();\n}\n\nif(!partial)\n \
914 \ cm.selectLines( cm.nthLine(cpos.line), cpos.character )"}
915 model: toolbar.scriptlet
917 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
918 \ '', -1);\n$.log(editor, panel, params);\nvar cm = panel.texteditor;\n\
919 var exprs = $.map(params.exprs, function(expr) {\n var opts = \"mg\"\
920 ;\n if(expr.length > 2)\n opts = expr[2];\n\n return {rx:\
921 \ new RegExp(expr[0], opts), repl: expr[1]};\n});\n\nvar partial = true;\n\
922 var text = cm.selection();\n\nif(!text) {\n var cpos = cm.cursorPosition();\n\
923 \ cpos.line = cm.lineNumber(cpos.line)\n cm.selectLines(cm.firstLine(),\
924 \ 0, cm.lastLine(), 0);\n\n text = cm.selection();\n partial = false;\n\
925 }\n\nvar original = text;\n$(exprs).each(function() { \n text = text.replace(this.rx,\
926 \ this.repl);\n});\n\nif( original != text) \n{ \n cm.replaceSelection(text);\n\
927 \ panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
928 \ 'Zmieniono tekst' );\n editor.advancePopupQueue();\n}\nelse {\n \
929 \ editor.showPopup('generic-info', 'Brak zmian w tek\u015Bcie.');\n\
930 \ editor.advancePopupQueue();\n}\n\nif(!partial) {\n cm.selectLines(\
931 \ cm.nthLine(cpos.line), cpos.character );\n}"}
932 model: toolbar.scriptlet
934 - fields: {code: "$(params).each(function() {\n $.log(this[0], this[1]);\n \
935 \ editor.callScriptlet(this[0], panel, this[1]);\n\n});"}
936 model: toolbar.scriptlet
938 - fields: {code: "var cm = panel.texteditor;\r\nvar text = cm.selection();\r\n\r\
939 \nif(!text) return;\r\nvar repl = '';\r\nvar lcase = text.toLowerCase();\r\
940 \nvar ucase = text.toUpperCase();\r\n\r\nif(lcase == text) repl = ucase;\
941 \ /* was lowercase */\r\nelse if(ucase != text) repl = lcase; /* neither\
942 \ lower- or upper-case */\r\nelse { /* upper case -> title-case */\r\n\
943 \ var words = $(lcase.split(/\\s/)).map(function() { \r\n if(this.length\
944 \ > 0) { return this[0].toUpperCase() + this.slice(1); } else { return\
945 \ ''}\r\n }); \r\n repl = words.join(' ');\r\n} \r\n\r\nif(repl !=\
946 \ text) {\r\n cm.replaceSelection(repl);\r\n panel.fireEvent('contentChanged');\r\
948 model: toolbar.scriptlet
950 - fields: {code: "var texteditor = panel.texteditor;\r\nvar text = texteditor.selection();\r\
951 \n\r\nif(text) {\r\n var verses = text.split('\\n');\r\n var text =\
952 \ ''; var buf = ''; var ebuf = '';\r\n var first = true;\r\n\r\n for(var\
953 \ i=0; i < verses.length; i++) {\r\n verse = verses[i].replace(/^\\\
954 s+/, \"\").replace(/\\s+$/, \"\"); \r\n if(verse) {\r\n text\
955 \ += (buf ? buf + '/\\n' : '') + ebuf;\r\n buf = (first ? '<strofa>\\\
956 n' : '') + verses[i];\r\n ebuf = '';\r\n first = false;\r\n\
957 \ } else { \r\n ebuf += '\\n' + verses[i];\r\n }\r\n };\r\
958 \n text = text + buf + '\\n</strofa>' + ebuf; \r\n texteditor.replaceSelection(text);\r\
959 \n}\r\n\r\nif (!text) {\r\n var pos = texteditor.cursorPosition();\r\
960 \n texteditor.selectLines(pos.line, pos.character + 6 + 2);\r\n}\r\n\
961 \r\n\r\n\r\n\r\n\r\n\r\n\r\npanel.fireEvent('contentChanged');"}
962 model: toolbar.scriptlet