Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

163
Visualizações
Custom config.js for ckeditor and displaying inside a fancybox

I am trying to use a custom config toolbar of ckeditor in Rails 5 but getting the following error. Error: ActionController::RoutingError (No route matches [GET] "/ckeditor/config.js"):

my /app/assets/javascripts/ckeditor/config.js

  config.extraPlugins = 'divarea,s3FileUploader';
  config.allowedContent = true;
  config.disallowedContent = 'script';
  config.dragdropConfig = {
    backend: 's3',
    settings: {
      credentialUrl: '/r3_files/presigned_post',
      region: 'us-west-2',
    }
  }
  config.toolbar_mini = [
    ['-', 'Table', 'Link', 'Smiley', 'TextColor', 'BGColor', 'HorizontalRule'],
    ['Undo', 'Redo', '-', 'Cut', 'Copy', 'Paste', 'Find', 'Replace', '-', 'Outdent', 'Indent', 'NumberedList', 'BulletedList', '-'],
    ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'],
    ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'Image']
  ];
  config.toolbar = 'mini';

}```

file where ckeditor instance is called.

                      CKEDITOR.replace('email_body',{
                          customConfig: '/app/assets/javascripts/ckeditor/config.js'
                      });

the following are also included in my code
1. mount Ckeditor::Engine => '/ckeditor' in routes.rb
2. ckeditor/config.js in assets.rb

**Update:**
I changed the path to 'config.js' which used the custom toolbar BUT now the problem I am facing is shift+spacebar gives a space.So now I would like to use spacebar only for spaces. This same thing is also occuring while using backspace. Backspace only closes the editor but shift + backspace, does the actual function of Backspace.

Thank you in advance.
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda