scrivito_highlightjs_widget 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cf60984e7e3f4d98707be7d955d8a6bea8534b0
4
- data.tar.gz: e33b4d67952fc632e50c291f7c49da6a769cecc9
3
+ metadata.gz: 064dde8c44ce29668b081d63eaf719ef934e669e
4
+ data.tar.gz: 010a8611ce5ed5c03dc86770ad56fd4ec2dc61dc
5
5
  SHA512:
6
- metadata.gz: 27ea46cb553a981439286aa4d9df0998f82621a1adee3d3cd9c0ae1b8c441322466be49e956d590405e36d94c23b4532e92450507472d3e205964eff4451634b
7
- data.tar.gz: be67621288d2525c35ab3fd564f16d657ae5fb5e19927f5ebd90d386f6b5fbf6c7ddcbb1442a0cf77b7e252eb63e5300984bc347ab50b6d3da9cb7b46b2d9c50
6
+ metadata.gz: 02eab0ada37798ccac5ec8d38cdf587cbd314ef8311d3de4ba5a88e33ed6459ccb8ced08da1c2edde03d44e8d6cc42f102c9b7de053a0031388d3bf94ed98a14
7
+ data.tar.gz: fda3c31163d513d26f811db3a5b08a8653fc07709786d6d098bb732f897421f708a2b06e9efd2d56c21389d06dd3f35ef721fe5cf29c7da2ddab5c3c21318ee7
@@ -1,5 +1,6 @@
1
- $(document).ready(function() {
2
- $('.highlightjs code').each(function(i, block) {
3
- hljs.highlightBlock(block);
4
- });
5
- });
1
+ scrivito.on('content', function(widget) {
2
+ $(widget).find('.highlightjs code').each(function(i, block) {
3
+ hljs.highlightBlock(block);
4
+ });
5
+ }
6
+ );
@@ -1,11 +1,9 @@
1
1
  <div class="editing highlightjs_widget">
2
2
  <h4>Code</h4>
3
3
  <pre class="highlightjs">
4
- <code class="nohighlight">
5
- <%= scrivito_tag(:textarea, widget, :code, data: {editor: "textfield-editor"}, style: "width:100%;height:150px;") %>
6
- </code>
4
+ <%= scrivito_tag(:textarea, widget, :code, data: {editor: "textfield-editor"}, style: "width:100%;height:168px;") %>
7
5
  </pre>
8
-
6
+
9
7
  <h4>Language</h4>
10
8
  <div class="alert alert-info">
11
9
  If automatic language detection does not work for you.
@@ -1,3 +1,3 @@
1
1
  module ScrivitoHighlightjsWidget
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_highlightjs_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito