Update pages.html
Browse files- pages.html +17 -106
pages.html
CHANGED
@@ -767,113 +767,24 @@ z-index: 1000; /* Убедитесь, что кнопка находится п
|
|
767 |
|
768 |
|
769 |
|
770 |
-
<script type="text/javascript">
|
771 |
-
var editor = grapesjs.init({
|
772 |
-
container: '#gjs',
|
773 |
-
fromElement: true,
|
774 |
-
height: "100vh",
|
775 |
-
storageManager: {
|
776 |
-
type: 'local',
|
777 |
-
autosave: true,
|
778 |
-
autoload: true,
|
779 |
-
stepsBeforeSave: 1,
|
780 |
-
},
|
781 |
-
plugins: [
|
782 |
-
"gjs-blocks-basic",
|
783 |
-
"grapesjs-component-countdown",
|
784 |
-
"grapesjs-component-code-editor",
|
785 |
-
"grapesjs-templates",
|
786 |
-
"grapesjs-rte-extensions",
|
787 |
-
"grapesjs-user-blocks",
|
788 |
-
"grapesjs-tabs", // Плагин вкладок
|
789 |
-
"grapesjs-tooltip", // Плагин подсказок
|
790 |
-
"grapesjs-script-editor", // Плагин редактора скриптов
|
791 |
-
"grapesjs-rulers" // Добавляем плагин линеек
|
792 |
-
],
|
793 |
-
pluginsOpts: {
|
794 |
-
"gjs-blocks-basic": {
|
795 |
-
blocks: ['column1', 'column2', 'column3', 'column3-7', 'text', 'quote', 'social'],
|
796 |
-
blocksBasicOpts: {
|
797 |
-
flexGrid: true,
|
798 |
-
stylePrefix: 'gjs-',
|
799 |
-
columns: 12,
|
800 |
-
rowHeight: 75,
|
801 |
-
addBasicStyle: true
|
802 |
-
}
|
803 |
-
},
|
804 |
-
"grapesjs-component-code-editor": {
|
805 |
-
panelId: 'views-container',
|
806 |
-
appendTo: '.gjs-pn-views-container',
|
807 |
-
openState: { pn: '35%', cv: '65%' },
|
808 |
-
closedState: { pn: '15%', cv: '85%' },
|
809 |
-
codeViewOptions: {},
|
810 |
-
preserveWidth: false,
|
811 |
-
clearData: false,
|
812 |
-
editJs: true,
|
813 |
-
cleanCssBtn: true,
|
814 |
-
htmlBtnText: 'Применить',
|
815 |
-
cssBtnText: 'Применить',
|
816 |
-
cleanCssBtnText: 'Удалить'
|
817 |
-
},
|
818 |
-
"grapesjs-templates": {
|
819 |
-
// Настройки для grapesjs-templates
|
820 |
-
},
|
821 |
-
"grapesjs-rte-extensions": {
|
822 |
-
base: {
|
823 |
-
bold: true,
|
824 |
-
italic: true,
|
825 |
-
underline: true,
|
826 |
-
strikethrough: true,
|
827 |
-
link: true,
|
828 |
-
},
|
829 |
-
fonts: {
|
830 |
-
fontColor: true,
|
831 |
-
hilite: true,
|
832 |
-
},
|
833 |
-
format: {
|
834 |
-
heading1: true,
|
835 |
-
heading2: true,
|
836 |
-
heading3: true,
|
837 |
-
paragraph: true,
|
838 |
-
clearFormatting: true,
|
839 |
-
},
|
840 |
-
align: true,
|
841 |
-
darkColorPicker: true,
|
842 |
-
maxWidth: '600px'
|
843 |
-
},
|
844 |
-
"grapesjs-user-blocks": {
|
845 |
-
// Настройки для grapesjs-user-blocks
|
846 |
-
},
|
847 |
-
"grapesjs-tabs": {
|
848 |
-
// Настройки для grapesjs-tabs
|
849 |
-
},
|
850 |
-
"grapesjs-tooltip": {
|
851 |
-
// Настройки для grapesjs-tooltip
|
852 |
-
},
|
853 |
-
"grapesjs-script-editor": {
|
854 |
-
// Настройки для grapesjs-script-editor
|
855 |
-
starter: 'let el = this',
|
856 |
-
toolbarIcon: '<i class="fa fa-puzzle-piece"></i>',
|
857 |
-
scriptTypesSupport: ['default', 'wrapper', 'text', 'textnode', 'image', 'video', 'svg'],
|
858 |
-
toolbarBtnCustomScript: {},
|
859 |
-
onRun: () => console.log('valid syntax'),
|
860 |
-
onError: err => console.log('error:', err),
|
861 |
-
modalTitle: 'Script',
|
862 |
-
codeViewOptions: {},
|
863 |
-
buttonLabel: 'save',
|
864 |
-
commandAttachScript: {}
|
865 |
-
},
|
866 |
-
"grapesjs-rulers": {
|
867 |
-
// Настройки для grapesjs-rulers
|
868 |
-
dragMode: 'translate',
|
869 |
-
rulerHeight: 15,
|
870 |
-
canvasZoom: 94,
|
871 |
-
rulerOpts: {}
|
872 |
-
}
|
873 |
-
}
|
874 |
-
});
|
875 |
-
</script>
|
876 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
877 |
|
878 |
|
879 |
|
|
|
767 |
|
768 |
|
769 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
|
771 |
+
<script type="text/javascript">
|
772 |
+
window.onload = () => {
|
773 |
+
window.editor = grapesjs.init({
|
774 |
+
height: '100%',
|
775 |
+
showOffsets: true,
|
776 |
+
noticeOnUnload: false,
|
777 |
+
storageManager: false,
|
778 |
+
container: '#gjs',
|
779 |
+
fromElement: true,
|
780 |
+
|
781 |
+
plugins: ['grapesjs-preset-webpage'],
|
782 |
+
pluginsOpts: {
|
783 |
+
'grapesjs-preset-webpage': {}
|
784 |
+
}
|
785 |
+
});
|
786 |
+
};
|
787 |
+
</script>
|
788 |
|
789 |
|
790 |
|