Skip to content

Commit

Permalink
fix(tansa): Fix the spellchecking of body image caption(Description)
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanpocol committed Apr 20, 2017
1 parent ccb3f6f commit 54e335b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ export function TansaScopeSyncDirective($rootScope) {
}

var txt = $(node).find('.text-editor');
var tag = _.find(txt, (elem) => $(elem).is(':visible'));

return _.find(txt, (elem) => $(elem).is(':visible')).innerHTML;
if (tag) {
return tag.innerHTML;
}
return node.innerHTML;
}

scope.$on('$destroy', deregisterTansa);
Expand Down
1 change: 1 addition & 0 deletions scripts/core/editor2/views/block-embed.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</div>
<div class="editor--caption">
<div sd-remove-tags
tansa-scope-sync
placeholder="{{::'Description'|translate}}"
type="text"
ng-model="vm.caption"
Expand Down

0 comments on commit 54e335b

Please sign in to comment.