ckeditor5 1.15.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -17
- data/lib/ckeditor5/rails/plugins/simple_upload_adapter.rb +7 -0
- data/lib/ckeditor5/rails/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: a7d0dce96ea4b299699c42c1567c3f101a257c465a0e93b8856847fff94c6062
         | 
| 4 | 
            +
              data.tar.gz: 9ca6f4faa82bc9f62efa91b65634b8b9a037ce7fda0bf99507cefc87fca8348b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: c484342136c54b500b98e3615647f8c9c92c403d4af5569cadc910a520250f7767ccf020f9d697853fce9a9ae67a4bfa7dedb883b0691a6008f65b3b04c93190
         | 
| 7 | 
            +
              data.tar.gz: f98cb8faacebed0f36ffda4a8523443f4307b138b20136e670ee9dc7894bd91d9889c9acc14f0abe736c34c7339d1ff664b9332f8cf22555348c8094cfa7b592
         | 
    
        data/README.md
    CHANGED
    
    | @@ -91,6 +91,7 @@ Want to extend CKEditor's functionality? Check out our [plugins directory](https | |
| 91 91 | 
             
              - [Try Our Demos! 🎮 ✨](#try-our-demos--)
         | 
| 92 92 | 
             
              - [Table of Contents 📚](#table-of-contents-)
         | 
| 93 93 | 
             
              - [Presets 🎨](#presets-)
         | 
| 94 | 
            +
                - [Automatic upgrades 🔄](#automatic-upgrades-)
         | 
| 94 95 | 
             
                - [Available Configuration Methods ⚙️](#available-configuration-methods-️)
         | 
| 95 96 | 
             
                  - [`cdn(cdn = nil, &block)` method](#cdncdn--nil-block-method)
         | 
| 96 97 | 
             
                  - [`version(version)` method](#versionversion-method)
         | 
| @@ -110,7 +111,6 @@ Want to extend CKEditor's functionality? Check out our [plugins directory](https | |
| 110 111 | 
             
                  - [`plugins(*names, **kwargs)` method](#pluginsnames-kwargs-method)
         | 
| 111 112 | 
             
                  - [`inline_plugin(name, code)` method](#inline_pluginname-code-method)
         | 
| 112 113 | 
             
                  - [`simple_upload_adapter(url)` method](#simple_upload_adapterurl-method)
         | 
| 113 | 
            -
                - [Automatic upgrades 🔄](#automatic-upgrades-)
         | 
| 114 114 | 
             
                - [Controller / View helpers 📦](#controller--view-helpers-)
         | 
| 115 115 | 
             
                  - [`ckeditor5_element_ref(selector)` method](#ckeditor5_element_refselector-method)
         | 
| 116 116 | 
             
                  - [`ckeditor5_preset(&block)` method](#ckeditor5_presetblock-method)
         | 
| @@ -223,6 +223,22 @@ end | |
| 223 223 |  | 
| 224 224 | 
             
            Configuration of the editor can be complex, and it's recommended to use the [CKEditor 5 online builder](https://ckeditor.com/ckeditor-5/online-builder/) to generate the configuration. It allows you to select the features you want to include and generate the configuration code in JavaScript format. Keep in mind that you need to convert the JavaScript configuration to Ruby format before using it in this gem.
         | 
| 225 225 |  | 
| 226 | 
            +
            ### Automatic upgrades 🔄
         | 
| 227 | 
            +
             | 
| 228 | 
            +
            The gem includes a feature that automatically upgrades the CKEditor 5 version when it's released. It's enabled by default for the `:default` preset. It means that the editor will automatically check the version of the editor during the initialization and upgrade it to the latest version if the new patch or minor version is released.
         | 
| 229 | 
            +
             | 
| 230 | 
            +
            If you want to disable automatic upgrades, you can pass the `enabled: false` keyword argument to the `automatic_upgrades` method.
         | 
| 231 | 
            +
             | 
| 232 | 
            +
            ```rb
         | 
| 233 | 
            +
            # config/initializers/ckeditor5.rb
         | 
| 234 | 
            +
             | 
| 235 | 
            +
            CKEditor5::Rails.configure do
         | 
| 236 | 
            +
              # ... other configuration
         | 
| 237 | 
            +
             | 
| 238 | 
            +
              automatic_upgrades enabled: false
         | 
| 239 | 
            +
            end
         | 
| 240 | 
            +
            ```
         | 
| 241 | 
            +
             | 
| 226 242 | 
             
            ### Available Configuration Methods ⚙️
         | 
| 227 243 |  | 
| 228 244 | 
             
            #### `cdn(cdn = nil, &block)` method
         | 
| @@ -638,22 +654,6 @@ CKEditor5::Rails.configure do | |
| 638 654 | 
             
            end
         | 
| 639 655 | 
             
            ```
         | 
| 640 656 |  | 
| 641 | 
            -
            ### Automatic upgrades 🔄
         | 
| 642 | 
            -
             | 
| 643 | 
            -
            The gem includes a feature that automatically upgrades the CKEditor 5 version when it's released. It's enabled by default for the `:default` preset. It means that the editor will automatically check the version of the editor during the initialization and upgrade it to the latest version if the new patch or minor version is released.
         | 
| 644 | 
            -
             | 
| 645 | 
            -
            If you want to disable automatic upgrades, you can pass the `enabled: false` keyword argument to the `automatic_upgrades` method.
         | 
| 646 | 
            -
             | 
| 647 | 
            -
            ```rb
         | 
| 648 | 
            -
            # config/initializers/ckeditor5.rb
         | 
| 649 | 
            -
             | 
| 650 | 
            -
            CKEditor5::Rails.configure do
         | 
| 651 | 
            -
              # ... other configuration
         | 
| 652 | 
            -
             | 
| 653 | 
            -
              automatic_upgrades enabled: false
         | 
| 654 | 
            -
            end
         | 
| 655 | 
            -
            ```
         | 
| 656 | 
            -
             | 
| 657 657 | 
             
            ### Controller / View helpers 📦
         | 
| 658 658 |  | 
| 659 659 | 
             
            #### `ckeditor5_element_ref(selector)` method
         | 
| @@ -36,6 +36,13 @@ module CKEditor5::Rails::Plugins | |
| 36 36 | 
             
                              xhr.open('POST', config.uploadUrl, true);
         | 
| 37 37 | 
             
                              xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
         | 
| 38 38 |  | 
| 39 | 
            +
                              // Add CSRF token from meta tag
         | 
| 40 | 
            +
                              const csrfToken = document.querySelector('meta[name="csrf-token"]')?.content;
         | 
| 41 | 
            +
             | 
| 42 | 
            +
                              if (csrfToken) {
         | 
| 43 | 
            +
                                xhr.setRequestHeader('X-CSRF-Token', csrfToken);
         | 
| 44 | 
            +
                              }
         | 
| 45 | 
            +
             | 
| 39 46 | 
             
                              xhr.upload.onprogress = (evt) => {
         | 
| 40 47 | 
             
                                if (evt.lengthComputable) {
         | 
| 41 48 | 
             
                                  loader.uploadTotal = evt.total;
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: ckeditor5
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.15. | 
| 4 | 
            +
              version: 1.15.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Mateusz Bagiński
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire:
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2024-11- | 
| 12 | 
            +
            date: 2024-11-21 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: rails
         |