mirror of
https://github.com/neocities/neocities.git
synced 2025-07-25 11:58:28 +02:00
updated ace editor with new settings
settings for tab width, font size, keyboard mode, and autocomplete
This commit is contained in:
parent
d11e951fe6
commit
811b956a4b
1998 changed files with 1585 additions and 1527684 deletions
|
@ -307,6 +307,22 @@ post '/settings/change_email_notification' do
|
|||
redirect '/settings#email'
|
||||
end
|
||||
|
||||
post '/settings/change_editor_settings' do
|
||||
require_login
|
||||
|
||||
owner = current_site.owner
|
||||
|
||||
owner.autocomplete_enabled = params[:autocomplete_enabled]
|
||||
owner.editor_font_size = params[:editor_font_size]
|
||||
owner.keyboard_mode = params[:keyboard_mode]
|
||||
owner.tab_width = params[:tab_width]
|
||||
owner.save_changes validate: false
|
||||
flash[:success] = 'Code editor settings have been updated.'
|
||||
|
||||
@filename = params[:path]
|
||||
redirect '/site_files/text_editor?filename=' + Rack::Utils.escape(@filename)
|
||||
end
|
||||
|
||||
post '/settings/create_child' do
|
||||
require_login
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue