medium-editor-rails 1.1.0 → 1.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
  SHA1:
3
- metadata.gz: 86d22c2442a80cae4e0997c6a788c195496b2836
4
- data.tar.gz: f4f81a42f77f9b2c3c7ace98cd4269ac413ac328
3
+ metadata.gz: fa0ba14c770973e7f22bda092453aaca2b2b5782
4
+ data.tar.gz: a453844a62d84214e01f281307ead464074984f3
5
5
  SHA512:
6
- metadata.gz: 525972afada765ebaf19a3f578f91dee550ba2265156cd90cd593d9cec71b30be68ae12b373c50b2e178a1e8da7274a2cab78cfa751cfc675912736d2a0174fc
7
- data.tar.gz: 3d55b39f3304655c211e16be61c5d0ba6199055d0ea0950443b5a08ee73e58d560e400a8ae9b8353844331dcbe9c6c8deff369cf54baf806bf1262c5e899cd22
6
+ metadata.gz: 48eed5d492ac8bfee58818fea34ba15e3cf64ee3ae3aa789880a249e375add2006f80d56829a42d41a4273e8e28e25365b8bbfc52c853ed6a7b3eb0b1285f887
7
+ data.tar.gz: fc05433556125ed58868debbe20c93b1e36bdd52a92096b61537df23f130382a074ee2fb4a52360710b1b7940a7bb3cf7fa5a3f87efe11b60a939a635479bc8a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
 
2
2
  #### [Current]
3
+ * [4f4d13a](../../commit/4f4d13a) - __(Ahmet Sezgin Duran)__ Update Medium Editor files
4
+ * [78ae621](../../commit/78ae621) - __(Ahmet Sezgin Duran)__ Merge tag '1.1.0' into develop
5
+
6
+ 1.1.0
7
+
8
+ #### 1.1.0
9
+ * [4caf800](../../commit/4caf800) - __(Ahmet Sezgin Duran)__ Dump changelog
3
10
  * [6e3450b](../../commit/6e3450b) - __(Ahmet Sezgin Duran)__ Bump versions 1.1.0 and 2.1.0
4
11
  * [c3d9387](../../commit/c3d9387) - __(Ahmet Sezgin Duran)__ Update Medium Editor files
5
12
  * [ecf87f3](../../commit/ecf87f3) - __(Ahmet Sezgin Duran)__ Merge tag '1.0.0' into develop
data/README.md CHANGED
@@ -8,7 +8,7 @@ This gem integrates [Medium Editor](https://github.com/daviferreira/medium-edito
8
8
 
9
9
  ## Version
10
10
 
11
- The latest version of Medium Editor bundled by this gem is [2.1.0](https://github.com/daviferreira/medium-editor/releases)
11
+ The latest version of Medium Editor bundled by this gem is [2.1.2](https://github.com/daviferreira/medium-editor/releases)
12
12
 
13
13
  ## Installation
14
14
 
@@ -1,6 +1,6 @@
1
1
  module MediumEditorRails
2
2
  module Rails
3
- VERSION = '1.1.0'
4
- MEDIUM_EDITOR_VERSION = '2.1.0'
3
+ VERSION = '1.1.2'
4
+ MEDIUM_EDITOR_VERSION = '2.1.2'
5
5
  end
6
6
  end
@@ -180,6 +180,36 @@ else if (typeof define === 'function' && define.amd) {
180
180
  return html;
181
181
  }
182
182
 
183
+ /**
184
+ * Find the caret position within an element irrespective of any inline tags it may contain.
185
+ *
186
+ * @param {DOMElement} An element containing the cursor to find offsets relative to.
187
+ * @param {Range} A Range representing cursor position. Will window.getSelection if none is passed.
188
+ * @return {Object} 'left' and 'right' attributes contain offsets from begining and end of Element
189
+ */
190
+ function getCaretOffsets(element, range) {
191
+ var preCaretRange, postCaretRange;
192
+
193
+ if (!range) {
194
+ range = window.getSelection().getRangeAt(0);
195
+ }
196
+
197
+ preCaretRange = range.cloneRange();
198
+ postCaretRange = range.cloneRange();
199
+
200
+ preCaretRange.selectNodeContents(element);
201
+ preCaretRange.setEnd(range.endContainer, range.endOffset);
202
+
203
+ postCaretRange.selectNodeContents(element);
204
+ postCaretRange.setStart(range.endContainer, range.endOffset);
205
+
206
+ return {
207
+ left: preCaretRange.toString().length,
208
+ right: postCaretRange.toString().length
209
+ };
210
+ }
211
+
212
+
183
213
  // https://github.com/jashkenas/underscore
184
214
  function isElement(obj) {
185
215
  return !!(obj && obj.nodeType === 1);
@@ -222,6 +252,7 @@ else if (typeof define === 'function' && define.amd) {
222
252
  defaults: {
223
253
  allowMultiParagraphSelection: true,
224
254
  anchorInputPlaceholder: 'Paste or type a link',
255
+ anchorInputCheckboxLabel: 'Open in new window',
225
256
  anchorPreviewHideDelay: 500,
226
257
  buttons: ['bold', 'italic', 'underline', 'anchor', 'header1', 'header2', 'quote'],
227
258
  buttonLabels: false,
@@ -289,8 +320,8 @@ else if (typeof define === 'function' && define.amd) {
289
320
  .bindPaste()
290
321
  .setPlaceholders()
291
322
  .bindElementActions()
292
- .bindWindowActions()
293
- .passInstance();
323
+ .bindWindowActions();
324
+ //.passInstance();
294
325
  },
295
326
 
296
327
  on: function(target, event, listener, useCapture) {
@@ -380,7 +411,9 @@ else if (typeof define === 'function' && define.amd) {
380
411
  }
381
412
  // Init toolbar
382
413
  if (addToolbar) {
383
- this.initToolbar()
414
+ this.passInstance()
415
+ .callExtensions('init')
416
+ .initToolbar()
384
417
  .bindButtons()
385
418
  .bindAnchorForm()
386
419
  .bindAnchorPreview();
@@ -464,7 +497,7 @@ else if (typeof define === 'function' && define.amd) {
464
497
 
465
498
  // Bind the return and tab keypress events
466
499
  this.bindReturn(i)
467
- .bindTab(i)
500
+ .bindKeydown(i)
468
501
  .bindBlur(i)
469
502
  .bindClick(i);
470
503
  }
@@ -526,6 +559,7 @@ else if (typeof define === 'function' && define.amd) {
526
559
  }
527
560
  }
528
561
  }
562
+ return this;
529
563
  },
530
564
 
531
565
  /**
@@ -581,7 +615,12 @@ else if (typeof define === 'function' && define.amd) {
581
615
  if (!(self.options.disableReturn || editorElement.getAttribute('data-disable-return')) &&
582
616
  tagName !== 'li' && !self.isListItemChild(node)) {
583
617
  if (!e.shiftKey) {
584
- self.options.ownerDocument.execCommand('formatBlock', false, 'p');
618
+
619
+ // paragraph creation should not be forced within a header tag
620
+ if (!/h\d/.test(tagName))
621
+ {
622
+ self.options.ownerDocument.execCommand('formatBlock', false, 'p');
623
+ }
585
624
  }
586
625
  if (tagName === 'a') {
587
626
  self.options.ownerDocument.execCommand('unlink', false, null);
@@ -626,9 +665,10 @@ else if (typeof define === 'function' && define.amd) {
626
665
  return this;
627
666
  },
628
667
 
629
- bindTab: function (index) {
668
+ bindKeydown: function (index) {
630
669
  var self = this;
631
670
  this.on(this.elements[index], 'keydown', function (e) {
671
+
632
672
  if (e.which === 9) {
633
673
  // Override tab only for pre nodes
634
674
  var tag = getSelectionStart.call(self).tagName.toLowerCase();
@@ -649,10 +689,77 @@ else if (typeof define === 'function' && define.amd) {
649
689
  }
650
690
  }
651
691
  }
692
+ else if ( e.which === 8 || e.which === 46 || e.which === 13 )
693
+ {
694
+
695
+ // Bind keys which can create or destroy a block element: backspace, delete, return
696
+ self.onBlockModifier(e);
697
+
698
+ }
652
699
  });
653
700
  return this;
654
701
  },
655
702
 
703
+ onBlockModifier: function( e ) {
704
+
705
+ var range, sel, p, node = getSelectionStart.call(this),
706
+ tagName = node.tagName.toLowerCase(),
707
+ isEmpty = /^(\s+|<br\/?>)?$/i,
708
+ isHeader = /h\d/i;
709
+
710
+ if ( (e.which === 8 || e.which === 13) // backspace or return
711
+ && node.previousElementSibling
712
+ && isHeader.test(tagName) // in a header
713
+ && getCaretOffsets(node).left === 0 ) // at the very end of the block
714
+ {
715
+ if ( e.which === 8 && isEmpty.test(node.previousElementSibling.innerHTML) )
716
+ {
717
+ // backspacing the begining of a header into an empty previous element will
718
+ // change the tagName of the current node to prevent one
719
+ // instead delete previous node and cancel the event.
720
+ node.previousElementSibling.parentNode.removeChild( node.previousElementSibling );
721
+ e.preventDefault();
722
+ }
723
+ else if ( e.which === 13 )
724
+ {
725
+ // hitting return in the begining of a header will create empty header elements before the current one
726
+ // instead, make "<p><br></p>" element, which are what happens if you hit return in an empty paragraph
727
+ p = this.options.ownerDocument.createElement('p');
728
+ p.innerHTML = '<br>';
729
+ node.previousElementSibling.parentNode.insertBefore( p, node );
730
+ e.preventDefault();
731
+ }
732
+
733
+ }
734
+ else if ( e.which === 46 // delete
735
+ && node.nextElementSibling
736
+ && node.previousElementSibling
737
+ && !isHeader.test(tagName) // not in a header
738
+ && isEmpty.test(node.innerHTML) // in an empty tag
739
+ && isHeader.test(node.nextElementSibling.tagName) ) // when the next tag *is* a header
740
+ {
741
+ // hitting delete in an empty element preceding a header, ex:
742
+ // <p>[CURSOR]</p><h1>Header</h1>
743
+ // Will cause the h1 to become a paragraph.
744
+ // Instead, delete the paragraph node and move the cursor to the begining of the h1
745
+
746
+ // remove node and move cursor to start of header
747
+ range = document.createRange();
748
+ sel = window.getSelection();
749
+
750
+ range.setStart(node.nextElementSibling, 0);
751
+ range.collapse(true);
752
+
753
+ sel.removeAllRanges();
754
+ sel.addRange(range);
755
+
756
+ node.previousElementSibling.parentNode.removeChild(node);
757
+
758
+ e.preventDefault();
759
+ }
760
+
761
+ },
762
+
656
763
  buttonTemplate: function (btnType) {
657
764
  var buttonLabels = this.getButtonLabels(this.options.buttonLabels),
658
765
  buttonTemplates = {
@@ -745,13 +852,14 @@ else if (typeof define === 'function' && define.amd) {
745
852
  return this;
746
853
  }
747
854
  this.toolbar = this.createToolbar();
855
+ this.addExtensionForms();
748
856
  this.keepToolbarAlive = false;
749
857
  this.toolbarActions = this.toolbar.querySelector('.medium-editor-toolbar-actions');
750
858
  this.anchorPreview = this.createAnchorPreview();
751
859
 
752
860
  if (!this.options.disableAnchorForm) {
753
- this.anchorForm = this.toolbar.querySelector('.medium-editor-toolbar-form-anchor');
754
- this.anchorInput = this.anchorForm.querySelector('input.medium-editor-toolbar-anchor-input');
861
+ this.anchorForm = this.toolbar.querySelector('.medium-editor-toolbar-form');
862
+ this.anchorInput = this.anchorForm.querySelector('input.medium-editor-toolbar-input');
755
863
  this.anchorTarget = this.anchorForm.querySelector('input.medium-editor-toolbar-anchor-target');
756
864
  this.anchorButton = this.anchorForm.querySelector('input.medium-editor-toolbar-anchor-button');
757
865
  }
@@ -793,6 +901,9 @@ else if (typeof define === 'function' && define.amd) {
793
901
  if (this.options.extensions.hasOwnProperty(btns[i])) {
794
902
  ext = this.options.extensions[btns[i]];
795
903
  btn = ext.getButton !== undefined ? ext.getButton(this) : null;
904
+ if (ext.hasForm) {
905
+ btn.setAttribute('data-form', 'medium-editor-toolbar-form-' + btns[i] + '-' + this.id);
906
+ }
796
907
  } else {
797
908
  btn = this.buttonTemplate(btns[i]);
798
909
  }
@@ -811,6 +922,30 @@ else if (typeof define === 'function' && define.amd) {
811
922
  return ul;
812
923
  },
813
924
 
925
+ addExtensionForms: function () {
926
+ var extensions = this.options.extensions,
927
+ ext,
928
+ name,
929
+ form,
930
+ id;
931
+
932
+ for (name in extensions) {
933
+ if (extensions.hasOwnProperty(name)) {
934
+ ext = extensions[name];
935
+ if(ext.hasForm){
936
+ form = ext.getForm !== undefined ? ext.getForm() : null;
937
+ }
938
+ if (form) {
939
+ id = 'medium-editor-toolbar-form-'+name+'-'+this.id;
940
+ form.className = 'medium-editor-toolbar-form';
941
+ form.id = id;
942
+ ext.getForm().id = id;
943
+ this.toolbar.appendChild(form);
944
+ }
945
+ }
946
+ }
947
+ },
948
+
814
949
  toolbarFormAnchor: function () {
815
950
  var anchor = this.options.ownerDocument.createElement('div'),
816
951
  input = this.options.ownerDocument.createElement('input'),
@@ -822,21 +957,21 @@ else if (typeof define === 'function' && define.amd) {
822
957
  save = this.options.ownerDocument.createElement('a');
823
958
 
824
959
  close.setAttribute('href', '#');
825
- close.className = 'medium-editor-toobar-anchor-close';
960
+ close.className = 'medium-editor-toobar-close';
826
961
  close.innerHTML = '&times;';
827
962
 
828
963
  save.setAttribute('href', '#');
829
- save.className = 'medium-editor-toobar-anchor-save';
964
+ save.className = 'medium-editor-toobar-save';
830
965
  save.innerHTML = '&#10003;';
831
966
 
832
967
  input.setAttribute('type', 'text');
833
- input.className = 'medium-editor-toolbar-anchor-input';
968
+ input.className = 'medium-editor-toolbar-input';
834
969
  input.setAttribute('placeholder', this.options.anchorInputPlaceholder);
835
970
 
836
971
 
837
972
  target.setAttribute('type', 'checkbox');
838
973
  target.className = 'medium-editor-toolbar-anchor-target';
839
- target_label.innerHTML = "Open in New Window?";
974
+ target_label.innerHTML = this.options.anchorInputCheckboxLabel;
840
975
  target_label.insertBefore(target, target_label.firstChild);
841
976
 
842
977
  button.setAttribute('type', 'checkbox');
@@ -845,7 +980,7 @@ else if (typeof define === 'function' && define.amd) {
845
980
  button_label.insertBefore(button, button_label.firstChild);
846
981
 
847
982
 
848
- anchor.className = 'medium-editor-toolbar-form-anchor';
983
+ anchor.className = 'medium-editor-toolbar-form';
849
984
  anchor.id = 'medium-editor-toolbar-form-anchor-' + this.id;
850
985
  anchor.appendChild(input);
851
986
 
@@ -1054,7 +1189,8 @@ else if (typeof define === 'function' && define.amd) {
1054
1189
  boundary,
1055
1190
  middleBoundary,
1056
1191
  defaultLeft = (this.options.diffLeft) - (this.toolbar.offsetWidth / 2),
1057
- halfOffsetWidth = this.toolbar.offsetWidth / 2;
1192
+ halfOffsetWidth = this.toolbar.offsetWidth / 2,
1193
+ containerCenter = (containerRect.left + (containerRect.width / 2));
1058
1194
 
1059
1195
  if ( selection.focusNode === null ) {
1060
1196
  return this;
@@ -1085,8 +1221,18 @@ else if (typeof define === 'function' && define.amd) {
1085
1221
  this.toolbar.style.top = containerTop - this.toolbar.offsetHeight + "px";
1086
1222
  }
1087
1223
 
1088
- this.toolbar.style.left = containerRect.left + "px";
1089
-
1224
+ if (this.options.toolbarAlign) {
1225
+ if (this.options.toolbarAlign === 'left') {
1226
+ this.toolbar.style.left = containerRect.left + "px";
1227
+ } else if (this.options.toolbarAlign === 'center') {
1228
+ this.toolbar.style.left = (containerCenter - halfOffsetWidth) + "px";
1229
+ } else {
1230
+ this.toolbar.style.left = (containerRect.right - this.toolbar.offsetWidth) + "px";
1231
+ }
1232
+ } else {
1233
+ this.toolbar.style.left = (containerCenter - halfOffsetWidth) + "px";
1234
+ }
1235
+
1090
1236
  } else if (!selection.isCollapsed) {
1091
1237
  range = selection.getRangeAt(0);
1092
1238
  boundary = range.getBoundingClientRect();
@@ -1165,6 +1311,11 @@ else if (typeof define === 'function' && define.amd) {
1165
1311
  if (this.hasAttribute('data-action')) {
1166
1312
  self.execAction(this.getAttribute('data-action'), e);
1167
1313
  }
1314
+ // Allows extension buttons to show a form
1315
+ // TO DO: Improve this
1316
+ if (this.hasAttribute('data-form')) {
1317
+ self.showForm(this.getAttribute('data-form'), e);
1318
+ }
1168
1319
  };
1169
1320
  for (i = 0; i < buttons.length; i += 1) {
1170
1321
  this.on(buttons[i], 'click', triggerAction);
@@ -1198,6 +1349,27 @@ else if (typeof define === 'function' && define.amd) {
1198
1349
  }
1199
1350
  },
1200
1351
 
1352
+ // Method to show an extension's form
1353
+ // TO DO: Improve this
1354
+ showForm: function (formId, e) {
1355
+ this.toolbarActions.style.display = 'none';
1356
+ this.saveSelection();
1357
+ var form = document.getElementById(formId);
1358
+ form.style.display = 'block';
1359
+ this.setToolbarPosition();
1360
+ this.keepToolbarAlive = true;
1361
+ },
1362
+
1363
+ // Method to show an extension's form
1364
+ // TO DO: Improve this
1365
+ hideForm: function (form, e) {
1366
+ var el = document.getElementById(form.id);
1367
+ el.style.display = 'none';
1368
+ this.showToolbarActions();
1369
+ this.setToolbarPosition();
1370
+ restoreSelection.call(this, this.savedSelection);
1371
+ },
1372
+
1201
1373
  // http://stackoverflow.com/questions/15867542/range-object-get-selection-parent-node-chrome-vs-firefox
1202
1374
  rangeSelectsSingleNode: function (range) {
1203
1375
  var startNode = range.startContainer;
@@ -1355,8 +1527,8 @@ else if (typeof define === 'function' && define.amd) {
1355
1527
  return this;
1356
1528
  }
1357
1529
 
1358
- var linkCancel = this.anchorForm.querySelector('a.medium-editor-toobar-anchor-close'),
1359
- linkSave = this.anchorForm.querySelector('a.medium-editor-toobar-anchor-save'),
1530
+ var linkCancel = this.anchorForm.querySelector('a.medium-editor-toobar-close'),
1531
+ linkSave = this.anchorForm.querySelector('a.medium-editor-toobar-save'),
1360
1532
  self = this;
1361
1533
 
1362
1534
  this.on(this.anchorForm, 'click', function (e) {
@@ -1436,7 +1608,6 @@ else if (typeof define === 'function' && define.amd) {
1436
1608
  return this;
1437
1609
  },
1438
1610
 
1439
-
1440
1611
  hideAnchorPreview: function () {
1441
1612
  this.anchorPreview.classList.remove('medium-editor-anchor-preview-active');
1442
1613
  },
@@ -135,26 +135,26 @@
135
135
  .medium-editor-action-italic {
136
136
  font-style: italic; }
137
137
 
138
- .medium-editor-toolbar-form-anchor {
138
+ .medium-editor-toolbar-form {
139
139
  display: none; }
140
- .medium-editor-toolbar-form-anchor input, .medium-editor-toolbar-form-anchor a {
140
+ .medium-editor-toolbar-form input, .medium-editor-toolbar-form a {
141
141
  font-family: HelveticaNeue, Helvetica, Arial, sans-serif; }
142
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input, .medium-editor-toolbar-form-anchor label {
142
+ .medium-editor-toolbar-form .medium-editor-toolbar-input, .medium-editor-toolbar-form label {
143
143
  margin: 0;
144
144
  padding: 6px;
145
145
  width: 316px;
146
146
  border: none;
147
147
  font-size: 14px;
148
148
  box-sizing: border-box; }
149
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input:focus, .medium-editor-toolbar-form-anchor label:focus {
149
+ .medium-editor-toolbar-form .medium-editor-toolbar-input:focus, .medium-editor-toolbar-form label:focus {
150
150
  outline: 0;
151
151
  border: none;
152
152
  box-shadow: none;
153
153
  -webkit-appearance: none;
154
154
  -moz-appearance: none; }
155
- .medium-editor-toolbar-form-anchor label {
155
+ .medium-editor-toolbar-form label {
156
156
  display: block; }
157
- .medium-editor-toolbar-form-anchor a {
157
+ .medium-editor-toolbar-form a {
158
158
  display: inline-block;
159
159
  margin: 0 10px;
160
160
  text-decoration: none;
@@ -35,29 +35,29 @@
35
35
  background-color: #3276b1;
36
36
  color: #fff; }
37
37
 
38
- .medium-editor-toolbar-form-anchor {
38
+ .medium-editor-toolbar-form {
39
39
  background: #428bca;
40
40
  color: #fff;
41
41
  border-radius: 4px; }
42
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input {
42
+ .medium-editor-toolbar-form .medium-editor-toolbar-input {
43
43
  height: 60px;
44
44
  background: #428bca;
45
45
  color: #fff; }
46
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input::-webkit-input-placeholder {
46
+ .medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder {
47
47
  color: #fff;
48
48
  color: rgba(255, 255, 255, 0.8); }
49
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input:-moz-placeholder {
49
+ .medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder {
50
50
  /* Firefox 18- */
51
51
  color: #fff;
52
52
  color: rgba(255, 255, 255, 0.8); }
53
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input::-moz-placeholder {
53
+ .medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder {
54
54
  /* Firefox 19+ */
55
55
  color: #fff;
56
56
  color: rgba(255, 255, 255, 0.8); }
57
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input:-ms-input-placeholder {
57
+ .medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder {
58
58
  color: #fff;
59
59
  color: rgba(255, 255, 255, 0.8); }
60
- .medium-editor-toolbar-form-anchor a {
60
+ .medium-editor-toolbar-form a {
61
61
  color: #fff; }
62
62
 
63
63
  .medium-editor-toolbar-anchor-preview {
@@ -44,16 +44,16 @@
44
44
  background: -webkit-linear-gradient(bottom, #242424, rgba(0, 0, 0, 0.89));
45
45
  background: linear-gradient(bottom, #242424, rgba(0, 0, 0, 0.89)); }
46
46
 
47
- .medium-editor-toolbar-form-anchor {
47
+ .medium-editor-toolbar-form {
48
48
  background: #242424;
49
49
  color: #999;
50
50
  border-radius: 5px; }
51
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input {
51
+ .medium-editor-toolbar-form .medium-editor-toolbar-input {
52
52
  height: 50px;
53
53
  background: #242424;
54
54
  color: #ccc;
55
55
  box-sizing: border-box; }
56
- .medium-editor-toolbar-form-anchor a {
56
+ .medium-editor-toolbar-form a {
57
57
  color: #fff; }
58
58
 
59
59
  .medium-editor-toolbar-anchor-preview {
@@ -28,25 +28,25 @@
28
28
  .medium-editor-toolbar li .medium-editor-button-last {
29
29
  border-right: none; }
30
30
 
31
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input {
31
+ .medium-editor-toolbar-form .medium-editor-toolbar-input {
32
32
  height: 60px;
33
33
  background: #57ad68;
34
34
  color: #fff; }
35
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input::-webkit-input-placeholder {
35
+ .medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder {
36
36
  color: #fff;
37
37
  color: rgba(255, 255, 255, 0.8); }
38
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input:-moz-placeholder {
38
+ .medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder {
39
39
  /* Firefox 18- */
40
40
  color: #fff;
41
41
  color: rgba(255, 255, 255, 0.8); }
42
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input::-moz-placeholder {
42
+ .medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder {
43
43
  /* Firefox 19+ */
44
44
  color: #fff;
45
45
  color: rgba(255, 255, 255, 0.8); }
46
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input:-ms-input-placeholder {
46
+ .medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder {
47
47
  color: #fff;
48
48
  color: rgba(255, 255, 255, 0.8); }
49
- .medium-editor-toolbar-form-anchor a {
49
+ .medium-editor-toolbar-form a {
50
50
  color: #fff; }
51
51
 
52
52
  .medium-editor-toolbar-anchor-preview {
@@ -35,16 +35,16 @@
35
35
  background: -webkit-linear-gradient(bottom, #dee7f0, rgba(0, 0, 0, 0.1));
36
36
  background: linear-gradient(bottom, #dee7f0, rgba(0, 0, 0, 0.1)); }
37
37
 
38
- .medium-editor-toolbar-form-anchor {
38
+ .medium-editor-toolbar-form {
39
39
  background: #dee7f0;
40
40
  color: #999;
41
41
  border-radius: 2px; }
42
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input {
42
+ .medium-editor-toolbar-form .medium-editor-toolbar-input {
43
43
  height: 50px;
44
44
  background: #dee7f0;
45
45
  color: #40648a;
46
46
  box-sizing: border-box; }
47
- .medium-editor-toolbar-form-anchor a {
47
+ .medium-editor-toolbar-form a {
48
48
  color: #40648a; }
49
49
 
50
50
  .medium-editor-toolbar-anchor-preview {
@@ -36,16 +36,16 @@
36
36
  background: -webkit-linear-gradient(bottom, #fff, rgba(0, 0, 0, 0.2));
37
37
  background: linear-gradient(bottom, #fff, rgba(0, 0, 0, 0.2)); }
38
38
 
39
- .medium-editor-toolbar-form-anchor {
39
+ .medium-editor-toolbar-form {
40
40
  background: #fff;
41
41
  color: #999;
42
42
  border-radius: 5px; }
43
- .medium-editor-toolbar-form-anchor .medium-editor-toolbar-anchor-input {
43
+ .medium-editor-toolbar-form .medium-editor-toolbar-input {
44
44
  margin: 0;
45
45
  height: 50px;
46
46
  background: #fff;
47
47
  color: #a8a8a8; }
48
- .medium-editor-toolbar-form-anchor a {
48
+ .medium-editor-toolbar-form a {
49
49
  color: #889aac; }
50
50
 
51
51
  .medium-editor-toolbar-anchor-preview {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: medium-editor-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmet Sezgin Duran
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-27 00:00:00.000000000 Z
11
+ date: 2015-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties