summernote-rails 0.6.1.1 → 0.6.2.0

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: 899e15a900ba139e89d0a8b2d47f2b16557958df
4
- data.tar.gz: 552511375455abf8fe4fde60a68d3f034d6036c0
3
+ metadata.gz: 64099f6b5bd1bf3e7ed7e5ff435f29c1d3f7ffdc
4
+ data.tar.gz: 54b3eac5f749fd3b85506628f78d7c7bc54755cb
5
5
  SHA512:
6
- metadata.gz: cc14fb17ed9bcfe95906a796247a1b3892f6ed90e10aca72c0ea63a7cc35acaf4b54bf5e51b8ff77ec61ae060b508d145c86a2c2e850e7bc5f5b8a0bc38d432c
7
- data.tar.gz: 8477cabfa090d4b50c52e12e062f9aee49f1506309d146769c68d9a362be90f2cfdaff1e104305de7138d2c2f54f1a20f40409358ccb25bc00bdeb7557c35cfe
6
+ metadata.gz: c8a8c07a2da17d9dbf86892155c76dcebe56f5d232526f921911e83cecad9b4f8f99f478d3747c3b9a7f0b351e0c7c3330ed4ec977e58fcb454e5556fe64ccd3
7
+ data.tar.gz: 5de3f7be52653095338e381caf48cdc3eb20325f1ec5caba632bad436d82c9acae86cf1e14522ded908af37d47e48ad3ce96b19abfed15b5709ed26d5183a9c6
@@ -1,5 +1,5 @@
1
1
  module SummernoteRails
2
2
  module Rails
3
- VERSION = "0.6.1.1"
3
+ VERSION = "0.6.2.0"
4
4
  end
5
5
  end
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Super simple wysiwyg editor on Bootstrap v0.6.1
2
+ * Super simple wysiwyg editor on Bootstrap v0.6.2
3
3
  * http://summernote.org/
4
4
  *
5
5
  * summernote.js
6
6
  * Copyright 2013-2015 Alan Hong. and other contributors
7
7
  * summernote may be freely distributed under the MIT license./
8
8
  *
9
- * Date: 2015-02-08T09:50Z
9
+ * Date: 2015-03-14T03:32Z
10
10
  */
11
11
  (function (factory) {
12
12
  /* global define */
@@ -2122,7 +2122,7 @@
2122
2122
  */
2123
2123
  var settings = {
2124
2124
  /** @property */
2125
- version: '0.6.1',
2125
+ version: '0.6.2',
2126
2126
 
2127
2127
  /**
2128
2128
  *
@@ -4664,8 +4664,29 @@
4664
4664
 
4665
4665
  setTimeout(function () {
4666
4666
  var $img = $editable.find('img');
4667
- var datauri = $img[0].src;
4668
4667
 
4668
+ if (!$img.length || $img[0].src.indexOf('data:') === -1) {
4669
+ // pasted content
4670
+ var html = $editable.html();
4671
+
4672
+ editor.restoreNode($editable);
4673
+ editor.restoreRange($editable);
4674
+
4675
+ try {
4676
+ // insert normal dom code
4677
+ $(html).each(function () {
4678
+ $editable.focus();
4679
+ editor.insertNode($editable, this);
4680
+ });
4681
+ } catch (ex) {
4682
+ // insert text
4683
+ $editable.focus();
4684
+ editor.insertText($editable, html);
4685
+ }
4686
+ return;
4687
+ }
4688
+
4689
+ var datauri = $img[0].src;
4669
4690
  var data = atob(datauri.split(',')[1]);
4670
4691
  var array = new Uint8Array(data.length);
4671
4692
  for (var i = 0; i < data.length; i++) {
@@ -5726,7 +5747,7 @@
5726
5747
  '<div class="title">' + lang.shortcut.shortcuts + '</div>' +
5727
5748
  (agent.isMac ? tplShortcutTable(lang, options) : replaceMacKeys(tplShortcutTable(lang, options))) +
5728
5749
  '<p class="text-center">' +
5729
- '<a href="//summernote.org/" target="_blank">Summernote 0.6.1</a> · ' +
5750
+ '<a href="//summernote.org/" target="_blank">Summernote 0.6.2</a> · ' +
5730
5751
  '<a href="//github.com/summernote/summernote" target="_blank">Project</a> · ' +
5731
5752
  '<a href="//github.com/summernote/summernote/issues" target="_blank">Issues</a>' +
5732
5753
  '</p>';
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: summernote-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1.1
4
+ version: 0.6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hyo Seong Choi