Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Supports a "full" imageCommand in the redactor component #252

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
proper test for size now that we have a 0 size
mshick committed Mar 29, 2016
commit ae1491baac14e15673b01f8a7ddae2a1385757fb
4 changes: 2 additions & 2 deletions app/components/redactor-rte.js
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@ export default Ember.Component.extend({
var self = this;
this.get('whRedactor').$editor.on('imageCommand', 'figure', function (event, command) {

var size;
var size = null;

switch (command) {
case 'small':
@@ -163,7 +163,7 @@ export default Ember.Component.extend({
break;
}

if (size) {
if (size !== null) {
var url = $(this).find('img').attr('data-resize-src'),
resizeUrl = self.resizeImage(url, size);
$(this).find('img').attr('src', resizeUrl);
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.2",
"ember-load-initializers": "stefanpenner/ember-load-initializers#0.0.2",
"webhook-js": "*",
"webhook-redactor": "webhook/webhook-redactor",
"webhook-redactor": "mshick/webhook-redactor",
"firebase": "2.0.x",
"firebase-simple-login": "1.6.x",
"embedly-jquery": "~3.1.1",