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: '{"tag": "akap"}'
51 tooltip: wstawia akapit
59 params: '{"tag": "akap_cd"}'
62 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
81 params: '{"tag": "akap"}'
84 tooltip: "autotagowanie akapit\xF3w"
92 params: '{"tag": "akt"}'
103 params: '{"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: '{"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: '{"tag": "didaskalia"}'
182 scriptlet: insert_tag
185 model: toolbar.button
190 label: "didaskalia pocz\u0105tkowe"
192 params: '{"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: '{"tag": "dramat_wierszowany_l"}'
237 scriptlet: insert_tag
240 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
256 label: "dramat wsp\xF3\u0142czesny"
258 params: '{"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: '{"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: '{"tag": "kwestia"}'
303 scriptlet: insert_tag
305 tooltip: "wstawia kwesti\u0119"
306 model: toolbar.button
313 params: '[["insert_tag", {"tag": "akap"}], ["insert_tag", {"tag": "kwestia"}]]'
317 model: toolbar.button
324 params: '[["insert_stanza", {"tag": "strofa"}], ["insert_tag", {"tag": "kwestia"}]]'
328 model: toolbar.button
335 params: '{"tag": "liryka_l"}'
336 scriptlet: insert_tag
339 model: toolbar.button
344 label: "liryka/w. \u0142am"
346 params: '{"tag": "liryka_lp"}'
347 scriptlet: insert_tag
349 tooltip: "utw\xF3r liryczny o zw\u0119\u017Conej szeroko\u015Bci \u0142amu"
350 model: toolbar.button
355 label: "lista os\xF3b"
357 params: '{"tag": "lista_osob"}'
358 scriptlet: insert_tag
360 tooltip: "lista os\xF3b poprzedzaj\u0105ca tekst dramatu"
361 model: toolbar.button
368 params: '{"tag": "lista_osoba", "attrs": {"typ": ""}}'
369 scriptlet: insert_tag
370 slug: lista-osob-pole
371 tooltip: osoby z takim samym opisem
372 model: toolbar.button
379 params: '{"tag": "mat"}'
380 scriptlet: insert_tag
382 tooltip: "wyra\u017Cenia matematyczne lub zmienne symboliczne"
383 model: toolbar.button
390 params: '{"tag": "motto"}'
391 scriptlet: insert_tag
394 model: toolbar.button
401 params: '{"tag": "motto_podpis"}'
402 scriptlet: insert_tag
405 model: toolbar.button
410 label: ",,\u2026\" na \xAB\u2026\xBB"
412 params: '{"exprs": [[",,", "\u00ab"], ["\"", "\u00bb"]]}'
413 scriptlet: fulltextregexp
415 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na francuskie"
416 model: toolbar.button
421 label: ",,\u2026\" na \xBB\u2026\xAB"
423 params: '{"exprs": [[",,", "\u00bb"], ["\"", "\u00ab"]]}'
424 scriptlet: fulltextregexp
426 tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na niemieckie"
427 model: toolbar.button
432 label: "nag\u0142. dramatu"
434 params: '{"exprs": [["^AKT(\\s\\w*)$", "<naglowek_akt>AKT$1</naglowek_akt>"],
435 ["^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]+)$",
436 "<naglowek_osoba>$1</naglowek_osoba>"]]}'
437 scriptlet: lineregexp
439 tooltip: "autotagowanie akt\xF3w, scen, nag\u0142\xF3wk\xF3w os\xF3b"
440 model: toolbar.button
445 label: "nag\u0142\xF3wek kwestii"
447 params: '{"tag": "naglowek_osoba"}'
448 scriptlet: insert_tag
449 slug: naglowek-kwestii
450 tooltip: "nag\u0142\xF3wek kwestii - nazwa osoby"
451 model: toolbar.button
456 label: "nag\u0142\xF3wek listy"
458 params: '{"tag": "naglowek_listy"}'
459 scriptlet: insert_tag
461 tooltip: "nag\u0142\xF3wek listy os\xF3b"
462 model: toolbar.button
469 params: '{"tag": "nazwa_utworu"}'
470 scriptlet: insert_tag
473 model: toolbar.button
480 params: '{"tag": "nota"}'
481 scriptlet: insert_tag
484 model: toolbar.button
491 params: '{"tag": "opowiadanie"}'
492 scriptlet: insert_tag
495 model: toolbar.button
502 params: '{"tag": "osoba"}'
503 scriptlet: insert_tag
505 tooltip: "wstawia nazw\u0119 osoby w didaskaliach"
506 model: toolbar.button
511 label: osoba na liscie
513 params: '{"tag": "lista_osoba"}'
514 scriptlet: insert_tag
515 slug: osoba-na-liscie
516 tooltip: "nazwa osoby na liscie os\xF3b"
517 model: toolbar.button
522 label: "podrozdzia\u0142"
524 params: '{"tag": "naglowek_podrozdzial"}'
525 scriptlet: insert_tag
528 model: toolbar.button
533 label: "podtytu\u0142"
535 params: '{"tag": "podtytul"}'
536 scriptlet: insert_tag
539 model: toolbar.button
544 label: "powie\u015B\u0107"
546 params: '{"tag": "powiesc"}'
547 scriptlet: insert_tag
550 model: toolbar.button
558 scriptlet: insert_tag
561 model: toolbar.button
566 label: przypis autorski
568 params: '{"tag": "pa"}'
569 scriptlet: insert_tag
570 slug: przypis-autorski
572 model: toolbar.button
577 label: przypis edytorski
579 params: '{"tag": "pe"}'
580 scriptlet: insert_tag
581 slug: przypis-edytorski
583 model: toolbar.button
588 label: przypis redaktorski
590 params: '{"tag": "pr"}'
591 scriptlet: insert_tag
592 slug: przypis-redaktorski
594 model: toolbar.button
599 label: "przypis t\u0142umacza"
601 params: '{"tag": "pt"}'
602 scriptlet: insert_tag
603 slug: przypis-tlumacza
605 model: toolbar.button
610 label: "rozdzia\u0142"
612 params: '{"tag": "naglowek_rozdzial"}'
613 scriptlet: insert_tag
616 model: toolbar.button
623 params: '{"tag": "naglowek_scena"}'
624 scriptlet: insert_tag
627 model: toolbar.button
634 params: '{"nocontent": "true", "tag": "sekcja_asterysk"}'
635 scriptlet: insert_tag
637 tooltip: rozdzielenie partii tekstu asteryskiem
638 model: toolbar.button
645 params: '{"nocontent": "true", "tag": "separator_linia"}'
646 scriptlet: insert_tag
648 tooltip: "rozdzielenie partii tekstu pozioma lini\u0105"
649 model: toolbar.button
654 label: "\u015Bwiat\u0142o"
656 params: '{"nocontent": "true", "tag": "sekcja_swiatlo"}'
657 scriptlet: insert_tag
659 tooltip: "\u015Bwiat\u0142o rozdzielaj\u0105ce sekcje tekstu"
660 model: toolbar.button
665 label: "s\u0142owo obce"
667 params: '{"tag": "slowo_obce"}'
668 scriptlet: insert_tag
670 tooltip: "frazy w j\u0119zykach innych ni\u017C polski/definiendum w przypisie"
671 model: toolbar.button
676 label: "\u015Br\xF3dtytu\u0142"
678 params: '{"tag": "srodtytul"}'
679 scriptlet: insert_tag
682 model: toolbar.button
689 params: '{"tag": "strofa"}'
690 scriptlet: insert_stanza
692 tooltip: "wstawia strof\u0119"
693 model: toolbar.button
700 params: '{"tag": "strofa"}'
703 tooltip: autotagowanie strof
704 model: toolbar.button
709 label: "tag g\u0142\xF3wny"
711 params: '{"tag": "utwor"}'
712 scriptlet: insert_tag
715 model: toolbar.button
720 label: "A<sup>\u2193</sup>"
725 tooltip: "Zamie\u0144 wielkie litery na ma\u0142e"
726 model: toolbar.button
731 label: "tytu\u0142 dzie\u0142a"
733 params: '{"tag": "tytul_dziela"}'
734 scriptlet: insert_tag
737 model: toolbar.button
742 label: "tytu\u0142 dzie\u0142a typ 1"
744 params: '{"tag": "tytul_dziela", "attrs": {"typ": "1"}}'
745 scriptlet: insert_tag
746 slug: tytul-dziela-typ
747 tooltip: "tytu\u0142 dzie\u0142a w cytowanym tytule dzie\u0142a"
748 model: toolbar.button
755 params: '{"tag": "uwaga"}'
756 scriptlet: insert_tag
758 tooltip: 'uwagi redaktorsko-korektorskie '
759 model: toolbar.button
766 params: '{"tag": "wers_akap"}'
767 scriptlet: insert_tag
769 tooltip: "wers rozpoczynaj\u0105cy si\u0119 wci\u0119ciem akapitowym"
770 model: toolbar.button
777 params: '{"tag": "wers_cd"}'
778 scriptlet: insert_tag
780 tooltip: "cz\u0119\u015B\u0107 wersu przeniesiona do innego wiersza"
781 model: toolbar.button
786 label: "wers mocno wci\u0119ty"
788 params: '{"tag": "wers_wciety", "attrs": {"typ": ""}}'
789 scriptlet: insert_tag
790 slug: wers-mocno-wciety
791 tooltip: "argumenty wersu wci\u0119tego: od 2 do 6"
792 model: toolbar.button
797 label: "wers wci\u0119ty"
799 params: '{"tag": "wers_wciety", "attrs": {"typ": "1"}}'
800 scriptlet: insert_tag
802 tooltip: "wstawia wers wci\u0119ty"
803 model: toolbar.button
808 label: "wersy wci\u0119te"
810 params: '{"padding": 1, "tag": "wers_wciety", "split": 1}'
813 tooltip: "autotagowanie wers\xF3w wci\u0119tych"
814 model: toolbar.button
821 params: '{"tag": "www"}'
822 scriptlet: insert_tag
825 model: toolbar.button
830 label: "wyr\xF3\u017Cnienie"
832 params: '{"tag": "wyroznienie"}'
833 scriptlet: insert_tag
835 tooltip: "wyr\xF3\u017Cnienie autorskie"
836 model: toolbar.button
843 params: '{"tag": "wywiad"}'
844 scriptlet: insert_tag
847 model: toolbar.button
852 label: "wywiad odpowied\u017A"
854 params: '{"tag": "wywiad_odp"}'
855 scriptlet: insert_tag
856 slug: wywiad-odpowiedz
858 model: toolbar.button
863 label: wywiad pytanie
865 params: '{"tag": "wywiad_pyt"}'
866 scriptlet: insert_tag
869 model: toolbar.button
874 label: "zast\u0119pnik wersu"
876 params: '{"tag": "zastepnik_wersu"}'
877 scriptlet: insert_tag
878 slug: zastepnik-wersu
879 tooltip: wykropkowanie wersu
880 model: toolbar.button
882 - fields: {code: "$(params).each(function() {\n $.log(this[0], this[1]);\n \
883 \ editor.callScriptlet(this[0], panel, this[1]);\n\n});"}
884 model: toolbar.scriptlet
886 - fields: {code: "var texteditor = panel.texteditor;\nvar text = texteditor.selection();\n\
887 var start_tag = '<'+params.tag;\nfor (var attr in params.attrs) {\n \
888 \ start_tag += ' '+attr+'=\"' + params.attrs[attr] + '\"';\n};\nstart_tag\
889 \ += '>';\nvar end_tag = '</'+params.tag+'>';\n\nif(text.length > 0) {\n\
890 // tokenize\nvar output = ''\nvar token = ''\nfor(var index=0; index <\
891 \ text.length; index++)\n{\n if (text[index].match(/\\s/)) { // whitespace\n\
892 \ token += text[index];\n }\n else { // character\n \
893 \ output += token;\n if(output == token) output += start_tag;\n\
894 \ token = ''\n output += text[index];\n }\n}\n\nif( output[output.length-1]\
895 \ == '\\\\' ) {\n output = output.substr(0, output.length-1) + end_tag\
896 \ + '\\\\';\n} else {\n output += end_tag;\n}\noutput += token;\n}\n\
897 else {\n output = start_tag + end_tag;\n}\n\ntexteditor.replaceSelection(output);\n\
898 \nif (text.length == 0) {\n var pos = texteditor.cursorPosition();\n\
899 \ texteditor.selectLines(pos.line, pos.character + params.tag.length\
900 \ + 2);\n}\n\npanel.fireEvent('contentChanged');"}
901 model: toolbar.scriptlet
903 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
904 \ '', -1);\n\nvar cm = panel.texteditor;\nvar exprs = $.map(params.exprs,\
905 \ function(expr) {\n\n var opts = \"g\";\n\n if(expr.length > 2)\n\
906 \n opts = expr[2];\n\n return {rx: new RegExp(expr[0], opts),\
907 \ repl: expr[1]};\n\n});\n\n\n\nvar partial = true;\n\nvar text = cm.selection();\n\
908 \n\n\nif(!text) {\n\n var cpos = cm.cursorPosition();\n\n cpos.line\
909 \ = cm.lineNumber(cpos.line)\n\n cm.selectLines(cm.firstLine(), 0,\
910 \ cm.lastLine(), 0);\n\n text = cm.selection();\n\n partial = false;\n\
911 \n}\n\n\n\nvar changed = 0;\nvar lines = text.split('\\n');\nvar lines\
912 \ = $.map(lines, function(line) { \n var old_line = line;\n $(exprs).each(function()\
913 \ { \n var expr = this;\n line = line.replace(expr.rx, expr.repl);\n\
914 \ });\n\n if(old_line != line) changed += 1;\n return line;\n\
915 });\n\nif(changed > 0) \n{\n cm.replaceSelection( lines.join('\\n')\
916 \ );\n panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
917 \ 'Zmieniono ' + changed + ' linii.', 1500);\n editor.advancePopupQueue();\n\
918 }\nelse {\n editor.showPopup('generic-info', 'Brak zmian w tek\u015B\
919 cie', 1500);\n editor.advancePopupQueue();\n}\n\nif(!partial)\n \
920 \ cm.selectLines( cm.nthLine(cpos.line), cpos.character )"}
921 model: toolbar.scriptlet
923 - fields: {code: '-'}
924 model: toolbar.scriptlet
926 - fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
927 \ '', -1);\n$.log(editor, panel, params);\nvar cm = panel.texteditor;\n\
928 var exprs = $.map(params.exprs, function(expr) {\n var opts = \"mg\"\
929 ;\n if(expr.length > 2)\n opts = expr[2];\n\n return {rx:\
930 \ new RegExp(expr[0], opts), repl: expr[1]};\n});\n\nvar partial = true;\n\
931 var text = cm.selection();\n\nif(!text) {\n var cpos = cm.cursorPosition();\n\
932 \ cpos.line = cm.lineNumber(cpos.line)\n cm.selectLines(cm.firstLine(),\
933 \ 0, cm.lastLine(), 0);\n\n text = cm.selection();\n partial = false;\n\
934 }\n\nvar original = text;\n$(exprs).each(function() { \n text = text.replace(this.rx,\
935 \ this.repl);\n});\n\nif( original != text) \n{ \n cm.replaceSelection(text);\n\
936 \ panel.fireEvent('contentChanged');\n editor.showPopup('generic-yes',\
937 \ 'Zmieniono tekst' );\n editor.advancePopupQueue();\n}\nelse {\n \
938 \ editor.showPopup('generic-info', 'Brak zmian w tek\u015Bcie.');\n\
939 \ editor.advancePopupQueue();\n}\n\nif(!partial) {\n cm.selectLines(\
940 \ cm.nthLine(cpos.line), cpos.character );\n}"}
941 model: toolbar.scriptlet
943 - fields: {code: "var cm = panel.texteditor;\r\nvar text = cm.selection();\r\n\r\
944 \nif(!text) return;\r\nvar repl = '';\r\nvar lcase = text.toLowerCase();\r\
945 \nvar ucase = text.toUpperCase();\r\n\r\nif(lcase == text) repl = ucase;\
946 \ /* was lowercase */\r\nelse if(ucase != text) repl = lcase; /* neither\
947 \ lower- or upper-case */\r\nelse { /* upper case -> title-case */\r\n\
948 \ var words = $(lcase.split(/\\s/)).map(function() { \r\n if(this.length\
949 \ > 0) { return this[0].toUpperCase() + this.slice(1); } else { return\
950 \ ''}\r\n }); \r\n repl = words.join(' ');\r\n} \r\n\r\nif(repl !=\
951 \ text) {\r\n cm.replaceSelection(repl);\r\n panel.fireEvent('contentChanged');\r\
953 model: toolbar.scriptlet
955 - fields: {code: "var texteditor = panel.texteditor;\r\nvar text = texteditor.selection();\r\
956 \n\r\nif(text) {\r\n var verses = text.split('\\n');\r\n var text =\
957 \ ''; var buf = ''; var ebuf = '';\r\n var first = true;\r\n\r\n for(var\
958 \ i=0; i < verses.length; i++) {\r\n verse = verses[i].replace(/^\\\
959 s+/, \"\").replace(/\\s+$/, \"\"); \r\n if(verse) {\r\n text\
960 \ += (buf ? buf + '/\\n' : '') + ebuf;\r\n buf = (first ? '<strofa>\\\
961 n' : '') + verses[i];\r\n ebuf = '';\r\n first = false;\r\n\
962 \ } else { \r\n ebuf += '\\n' + verses[i];\r\n }\r\n };\r\
963 \n text = text + buf + '\\n</strofa>' + ebuf; \r\n texteditor.replaceSelection(text);\r\
964 \n}\r\n\r\nif (!text) {\r\n var pos = texteditor.cursorPosition();\r\
965 \n texteditor.selectLines(pos.line, pos.character + 6 + 2);\r\n}\r\n\
966 \r\n\r\n\r\n\r\n\r\n\r\n\r\npanel.fireEvent('contentChanged');"}
967 model: toolbar.scriptlet