quilljs2-rails 2.1.1 → 2.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e70149a7a8197ccf82672ab0d7b9c1b3e3a271d9d66d9599d1b6be53b572defb
4
- data.tar.gz: d272aaf8ed9ba10a16333c759a9a947a5c6883bd6a42acf74beb5167bed98f2c
3
+ metadata.gz: dfa537ee457d8e195b9635befd5c26d5ebfd9e84d664684be6d8d1d45c0a356f
4
+ data.tar.gz: bf381bdff141c2419f90602a4fbfe445bb82a10eaf54f4998f68bee9a1f8042b
5
5
  SHA512:
6
- metadata.gz: dc39aabb0877fc55a5e7f0e186b2b2059ceb43ef5f6dec142b487b17293d0b5723d8d89d16281b22410c9f181750474b65e28fd46bbac688ba285010fa49b8f8
7
- data.tar.gz: 8aa35d367bec11633c33559c19933fbe0949a0f55eaed6d902254dfb1b2fb3fb73f7b36a3a00576f1f46c714a0d1ff74741f53348398611465724720c989b94a
6
+ metadata.gz: 8ab7daf6f52b0161a9e596c2809b3f94b94ed388a8575a36a524ec00706cedbeb5a3921b400c02d029c88bf9e10655b93df11aac74a1409719e4ee70af2ac20f
7
+ data.tar.gz: 31c359ba0fcf25c00e8023b1bedd7895c5ad5ed7ca206898f7f78f5a7704e1498164cadc66a1a58d89d0c6fd3afa41abcbf25816be9abea60f34669623449aed
data/.idea/workspace.xml CHANGED
@@ -4,7 +4,12 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="f9fcd731-5b64-4fed-8dd4-b5dc13a62758" name="Default" comment="Fixed theme related issue." />
7
+ <list default="true" id="f9fcd731-5b64-4fed-8dd4-b5dc13a62758" name="Default" comment="Fixed theme related issue.">
8
+ <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/app/assets/javascripts/quill.global.js" beforeDir="false" afterPath="$PROJECT_DIR$/app/assets/javascripts/quill.global.js" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/lib/quilljs/rails/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/quilljs/rails/version.rb" afterDir="false" />
12
+ </list>
8
13
  <option name="SHOW_DIALOG" value="false" />
9
14
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
15
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -236,7 +241,7 @@
236
241
  "RunOnceActivity.ShowReadmeOnStart": "true",
237
242
  "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
238
243
  "RunOnceActivity.git.unshallow": "true",
239
- "com.intellij.lang.ruby.rbs.tools.collection.workspace.sync.RbsCollectionUpdateProjectActivity#LAST_UPDATE_TIMESTAMP": "1755784176743",
244
+ "com.intellij.lang.ruby.rbs.tools.collection.workspace.sync.RbsCollectionUpdateProjectActivity#LAST_UPDATE_TIMESTAMP": "1755860214653",
240
245
  "git-widget-placeholder": "master",
241
246
  "junie.onboarding.icon.badge.shown": "true",
242
247
  "last_opened_file_path": "/Users/sumar/projects/sumartech/quilljs-rails",
@@ -380,6 +385,8 @@
380
385
  <workItem from="1491105689125" duration="177000" />
381
386
  <workItem from="1755780255521" duration="2641000" />
382
387
  <workItem from="1755784117848" duration="1522000" />
388
+ <workItem from="1755845749795" duration="2166000" />
389
+ <workItem from="1755860155785" duration="509000" />
383
390
  </task>
384
391
  <task id="LOCAL-00001" summary="Updated quilljs to latest version.">
385
392
  <option name="closed" value="true" />
@@ -413,7 +420,15 @@
413
420
  <option name="project" value="LOCAL" />
414
421
  <updated>1755784935703</updated>
415
422
  </task>
416
- <option name="localTasksCounter" value="5" />
423
+ <task id="LOCAL-00005" summary="Fixed theme related issue.">
424
+ <option name="closed" value="true" />
425
+ <created>1755846005073</created>
426
+ <option name="number" value="00005" />
427
+ <option name="presentableId" value="LOCAL-00005" />
428
+ <option name="project" value="LOCAL" />
429
+ <updated>1755846005073</updated>
430
+ </task>
431
+ <option name="localTasksCounter" value="6" />
417
432
  <servers />
418
433
  </component>
419
434
  <component name="TimeTrackingManager">
data/README.md CHANGED
@@ -22,8 +22,8 @@ And then execute:
22
22
  ### From CDN(recommended)
23
23
  Add these lines in the head section of application.html.erb
24
24
 
25
- <script src="https://cdn.quilljs.com/2.0.3/quill.js"></script>
26
- <link href="https://cdn.quilljs.com/2.0.3/quill.snow.css" rel="stylesheet">
25
+ <script src="https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.js"></script>
26
+ <link href="https://cdn.jsdelivr.net/npm/quill@2.0.3/dist/quill.snow.css" rel="stylesheet">
27
27
  Then add this line to your application.js file
28
28
 
29
29
  ```ruby
@@ -99,7 +99,12 @@ remove other quill themes and add
99
99
 
100
100
  Make sure to add `theme: 'bubble'` in the `Quilljs.setDefaults` setting as explained above.
101
101
 
102
- Note: The bundled local assets have been updated to Quill 2.0.3. You can use them directly via Sprockets (see "From the gem"), although using the official CDN is still recommended for most apps. Use the CDN links above to load Quill 2.0.3.
102
+ Note: The bundled local assets have been updated to Quill 2.0.3. You can use them directly via Sprockets (see "From the gem"), although using a CDN is still recommended for most apps. For CDN, use jsDelivr (example above) or unpkg for slab/quill@2.0.3.
103
+
104
+ ### Turbo/Hotwire notes
105
+ - The initializer listens for `ready`, `page:change`, `turbolinks:load`, and `turbo:load` events.
106
+ - Editors are initialized per field using a data attribute, so repeated navigations or partial updates will not double-initialize existing editors.
107
+ - Ensure you are not including any old Quill 1.x assets in your app. Remove old CDN links or packs that could override the 2.0.3 assets.
103
108
 
104
109
  This gem can also be used in conjuction with [bootstrap maxlength](https://mimo84.github.io/bootstrap-maxlength/).
105
110
 
@@ -87,14 +87,17 @@
87
87
  var quill_container = $('.quill_container');
88
88
  if (quill_container.length > 0) {
89
89
  quill_container.each(function (index, object) {
90
- return create_quill_containers(index, object)
90
+ if ($(object).data('quill-initialized')) { return; }
91
+ create_quill_containers(index, object);
92
+ $(object).data('quill-initialized', true);
91
93
  });
92
94
  }
93
95
  }
94
96
  };
95
97
 
96
- $( document ).on('ready page:change turbolinks:load', function() {
97
- if ($('.ql-editor').length <= 0){
98
+ $( document ).on('ready page:change turbolinks:load turbo:load', function() {
99
+ var pending = $('.quill_container').filter(function(){ return !$(this).data('quill-initialized'); });
100
+ if (pending.length > 0){
98
101
  Quilljs.loadDefaults();
99
102
  }
100
103
  });
@@ -1,6 +1,6 @@
1
1
  module Quilljs
2
2
  module Rails
3
3
  # Gem version follows the bundled/editor major version for clarity
4
- VERSION = "2.1.1"
4
+ VERSION = "2.1.2"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quilljs2-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sajjad Umar