Working CopyHTML shortcut

closes #3481
- Pressing Ctrl/CMD+Shift+C in the editor will open up a modal that
contains the generated HTML for either the selected text or the whole
post
Yeah, loosen 'er on up then! =D  Should be able to get all of this down to
three concise lines then eh? :+1:f


On Thu, Aug 14, 2014 at 10:19 PM, Felix Rieseberg <notifications@github.com>
wrote:

> In core/client/utils/codemirror-shortcuts.js:
>
> >              }
> >
> > -            $(".modal-copyToHTML-content").text(md).selectText();
> > +            // Talk to Ember
> > +            container = (container) ? container : this.component.get('container');
> > +            appController = (appController) ? appController : container.lookup('controller:application');
> > +            boundSend = (boundSend) ? boundSend : appController.send.bind(appController);
> > +            boundSend('openModal', 'copy-html');
> > +
> > +            modalController = (modalController) ? modalController : container.lookup('controller:modals/copy-html');
> > +            boundSet = (boundSet) ? boundSet : modalController.set.bind(modalController);
> > +            boundSet('generatedHTML', generatedHTML);
>
> It works without binding it, I just wanted to play it safe. Happy to play
> it loose if a second pair of eyes is convinced that we don't need to bind ;)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/TryGhost/Ghost/pull/3784/files#r16279742>.
>