Search code examples
ruby-on-railsrubyckeditor

Ckeditor not displayed after installation


After install CKedit dont work. I used the guides - https://github.com/galetahub/ckeditor

I've tried everything but it does not work

config/initializers/assets.rb

`Rails.application.config.assets.precompile += %w(ckeditor/config.js)`

config/initializers/assets.rb

//= require ckeditor/init

routes.rb

mount Ckeditor::Engine => '/ckeditor'

ActiveRecord + carrierwave

gem 'carrierwave'
gem 'mini_magick'

rails generate ckeditor:install --orm=active_record --backend=carrierwave

everything tried, but anyway dont work, help


Solution

  • Here is simple code try this .No need any gems

    <head>
      <meta charset="utf-8">
      <meta name="robots" content="noindex, nofollow">
      <title>Full page editing with Document Properties plugin</title>
      <script src="https://cdn.ckeditor.com/4.11.2/standard-all/ckeditor.js"></script>
    </head>
    
    <body>
        <div class="container">
      <textarea cols="80" id="editor1" name="editor1" rows="10">
                </textarea>
      </div>
      <script>
        CKEDITOR.replace('editor1', {
          fullPage: true,
          extraPlugins: 'docprops',
          // Disable content filtering because if you use full page mode, you probably
          // want to  freely enter any HTML content in source mode without any limitations.
          allowedContent: true,
          height: 320
        });
      </script>
    </body>
    </html>