1BX.addCustomEvent('OnEditorInitedBefore', function (editor) { 2 3 // ÐпиÑание кнопки "ТипогÑаÑа", добавлÑемой в визÑалÑнÑй ÑедакÑÐ¾Ñ 4 editor.AddButton({ 5 name: 'ТипогÑаÑ', // Ðазвание кнопки 6 id: 'dalee-typograf-img', 7 src: '/local/modules/dalee.typograf/f/images/typograf_button.png', // ÐÑÑÑ Ð´Ð¾ иконки кнопки 8 iconClassName: 'bxhtmled-button-dalee-typograf-img', 9 toolbarSort: 10, 10 11 // СобÑÑие по нажаÑÐ¸Ñ Ð½Ð° ÐºÐ½Ð¾Ð¿ÐºÑ 12 handler: function () { 13 const tp = new Typograf({locale: ['ru', 'en-US']}); 14 tp.enableRule('common/nbsp/replaceNbsp'); 15 16 const content = editor.GetContent(); 17 const transformed = tp.execute(content); 18 19 editor.SetContent(transformed); 20 editor.ReInitIframe(); 21 $(editor.document).find('head').append($('<style>body { font-size: 18px; }</style>')) 22 } 23 }); 24 25});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.