added copy-to-clipboard directive that does not require Flash

This commit is contained in:
alecmerdler 2017-05-24 21:42:06 -07:00
parent 6ed5235dfd
commit 062c1a1626
13 changed files with 186 additions and 74 deletions

View file

@ -36,7 +36,9 @@ import { MarkdownToolbarComponent } from './directives/ui/markdown/markdown-tool
import { MarkdownEditorComponent } from './directives/ui/markdown/markdown-editor.component';
import { BrowserPlatform, browserPlatform } from './constants/platform.constant';
import { ManageTriggerComponent } from './directives/ui/manage-trigger/manage-trigger.component';
import { ClipboardCopyDirective } from './directives/ui/clipboard-copy/clipboard-copy.directive';
import { Converter, ConverterOptions } from 'showdown';
import * as Clipboard from 'clipboard';
/**
@ -75,6 +77,7 @@ import { Converter, ConverterOptions } from 'showdown';
CorTabComponent,
CorTabPaneComponent,
ManageTriggerComponent,
ClipboardCopyDirective,
],
providers: [
ViewArrayImpl,
@ -86,6 +89,7 @@ import { Converter, ConverterOptions } from 'showdown';
{provide: 'markdownConverterFactory', useValue: (options?: ConverterOptions) => new Converter(options)},
{provide: 'BrowserPlatform', useValue: browserPlatform},
{provide: 'CorTabCurrentHandlerFactory', useValue: CorTabCurrentHandlerFactory},
{provide: 'clipboardFactory', useValue: (trigger, options) => new Clipboard(trigger, options)},
],
})
export class QuayModule {