Update js/rus/rus.js
Browse files- js/rus/rus.js +42 -56
js/rus/rus.js
CHANGED
|
@@ -9,6 +9,7 @@ editor.I18n.addMessages({
|
|
| 9 |
'decorations': 'Оформление',
|
| 10 |
'extra': 'Ещё больше',
|
| 11 |
'flex': 'Flex',
|
|
|
|
| 12 |
},
|
| 13 |
properties: {
|
| 14 |
'background-repeat': 'Повторение',
|
|
@@ -50,65 +51,50 @@ editor.I18n.addMessages({
|
|
| 50 |
title: 'Импортировать шаблон',
|
| 51 |
label: '<div style="margin-bottom: 10px; font-size: 13px;">Вставьте здесь ваш HTML/CSS и нажмите Импортировать</div>',
|
| 52 |
}
|
| 53 |
-
},
|
| 54 |
-
commands: {
|
| 55 |
-
'grapesjs-tui-image-editor': {
|
| 56 |
-
labelImageEditor: 'Редактор изображений'
|
| 57 |
-
}
|
| 58 |
}
|
| 59 |
}
|
| 60 |
});
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
attributes: {
|
| 103 |
-
class: 'fa fa-align-center'
|
| 104 |
-
}
|
| 105 |
-
});
|
| 106 |
-
|
| 107 |
-
// Добавление плагина редактора изображений
|
| 108 |
-
editor.plugins.add('grapesjs-tui-image-editor', {
|
| 109 |
-
label: editor.I18n.t('plugins.grapesjs-tui-image-editor.labelImageEditor'),
|
| 110 |
-
// Другие настройки плагина
|
| 111 |
-
});
|
| 112 |
|
| 113 |
|
| 114 |
|
|
|
|
| 9 |
'decorations': 'Оформление',
|
| 10 |
'extra': 'Ещё больше',
|
| 11 |
'flex': 'Flex',
|
| 12 |
+
|
| 13 |
},
|
| 14 |
properties: {
|
| 15 |
'background-repeat': 'Повторение',
|
|
|
|
| 51 |
title: 'Импортировать шаблон',
|
| 52 |
label: '<div style="margin-bottom: 10px; font-size: 13px;">Вставьте здесь ваш HTML/CSS и нажмите Импортировать</div>',
|
| 53 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
}
|
| 55 |
}
|
| 56 |
});
|
| 57 |
+
// Установка русского языка по умолчанию
|
| 58 |
+
editor.I18n.setLocale('ru');
|
| 59 |
+
// Удаление ненужных блоков
|
| 60 |
+
const unwantedBlocks = ['video', 'link', 'image'];
|
| 61 |
+
unwantedBlocks.forEach(blockId => {
|
| 62 |
+
editor.BlockManager.remove(blockId);
|
| 63 |
+
});
|
| 64 |
+
// Добавление блока адаптивной картинки
|
| 65 |
+
editor.BlockManager.add('responsive-image', {
|
| 66 |
+
label: editor.I18n.t('blockManager.labels.responsive-image'),
|
| 67 |
+
content: {
|
| 68 |
+
type: 'image',
|
| 69 |
+
style: {
|
| 70 |
+
display: 'block',
|
| 71 |
+
margin: 'auto',
|
| 72 |
+
maxWidth: '100%',
|
| 73 |
+
height: 'auto',
|
| 74 |
+
objectFit: 'cover'
|
| 75 |
+
},
|
| 76 |
+
attributes: {
|
| 77 |
+
alt: 'Responsive Image'
|
| 78 |
+
}
|
| 79 |
+
},
|
| 80 |
+
attributes: {
|
| 81 |
+
class: 'fa fa-image'
|
| 82 |
+
}
|
| 83 |
+
});
|
| 84 |
+
// Добавление блока центрированного текста
|
| 85 |
+
editor.BlockManager.add('centered-text', {
|
| 86 |
+
label: editor.I18n.t('blockManager.labels.centered-text'),
|
| 87 |
+
content: {
|
| 88 |
+
type: 'text',
|
| 89 |
+
style: {
|
| 90 |
+
textAlign: 'center'
|
| 91 |
+
},
|
| 92 |
+
content: 'Centered Text'
|
| 93 |
+
},
|
| 94 |
+
attributes: {
|
| 95 |
+
class: 'fa fa-align-center'
|
| 96 |
+
}
|
| 97 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
|
| 100 |
|