Show the image button only if editing admin pages

That's the only place where we need to attach images so far.
This commit is contained in:
Javi Martín
2018-09-07 14:11:29 +02:00
parent 43e83889ff
commit 5faeefab2c
2 changed files with 7 additions and 2 deletions

View File

@@ -94,8 +94,12 @@ CKEDITOR.editorConfig = function( config )
{ name: 'paragraph', groups: [ 'list' ], items: [ 'NumberedList', 'BulletedList' ] },
{ name: 'links', items: [ 'Link', 'Unlink' ] },
{ name: 'styles', items: [ 'Format' ] },
{ name: 'insert', items: [ 'Image' ] },
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike' ] }
];
config.toolbar_admin = config.toolbar_mini.concat([
{ name: 'insert', items: [ 'Image' ] }
]);
config.toolbar = "mini";
};

View File

@@ -50,7 +50,8 @@
<div class="ckeditor margin-top">
<%= f.label :content %>
<%= f.cktext_area :content, label: false, cols: 80, rows: 10, ckeditor: { language: I18n.locale } %>
<%= f.cktext_area :content, label: false, cols: 80, rows: 10,
ckeditor: { language: I18n.locale, toolbar: "admin" } %>
</div>
<div class="small-12 medium-6 large-3">