mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-15 17:56:07 +01:00
Added summary delimiter button for markdown editor (fixes #466)
This commit is contained in:
@@ -214,6 +214,16 @@ export default {
|
||||
replacer({ name: 'strike', replace: '~~$1$cur~~', codemirror, button });
|
||||
}
|
||||
}
|
||||
}, {
|
||||
delimiter: {
|
||||
identifier: 'delimiter',
|
||||
title: 'Summary Delimiter',
|
||||
label: '<i class="fa fa-fw fa-minus"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
action({ codemirror, button, textarea }) {
|
||||
replacer({ name: 'delimiter', replace: `${config.site.delimiter}$1`, codemirror, button, mode: 'replaceLine' });
|
||||
}
|
||||
}
|
||||
}, {
|
||||
link: {
|
||||
identifier: 'link',
|
||||
|
||||
2
themes/grav/js/admin.min.js
vendored
2
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -9,7 +9,10 @@
|
||||
admin_timeout: '{{ config.plugins.admin.session.timeout ?: 1800 }}',
|
||||
admin_nonce: '{{ admin.getNonce }}',
|
||||
language: '{{ grav.user.language|default('en') }}',
|
||||
pro_enabled: '{{ config.plugins["admin-pro"].enabled }}'
|
||||
pro_enabled: '{{ config.plugins["admin-pro"].enabled }}',
|
||||
site: {
|
||||
delimiter: '{{ config.site.summary.delimiter|default('===') }}'
|
||||
}
|
||||
};
|
||||
window.GravAdmin.uri_params = {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user