Browse Source
Merge pull request #496 from ryandeba/dev
Add `editable` attribute to the image Component
pull/506/head
Artur Arseniev
9 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
1 deletions
-
src/dom_components/model/ComponentImage.js
-
src/dom_components/view/ComponentImageView.js
|
|
|
@ -8,6 +8,7 @@ module.exports = Component.extend({ |
|
|
|
src: '', |
|
|
|
void: 1, |
|
|
|
droppable: 0, |
|
|
|
editable: 1, |
|
|
|
highlightable: 0, |
|
|
|
resizable: 1, |
|
|
|
traits: ['alt'] |
|
|
|
|
|
|
|
@ -45,7 +45,7 @@ module.exports = ComponentView.extend({ |
|
|
|
var em = this.opts.config.em; |
|
|
|
var editor = em ? em.get('Editor') : ''; |
|
|
|
|
|
|
|
if(editor) { |
|
|
|
if(editor && this.model.get('editable')) { |
|
|
|
editor.runCommand('open-assets', { |
|
|
|
target: this.model, |
|
|
|
onSelect() { |
|
|
|
|