diff options
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index a02214deb..b35b2d331 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -40,6 +40,8 @@ import { PreviewCursor } from './PreviewCursor'; import { FilterBox } from './search/FilterBox'; import PresModeMenu from './presentationview/PresentationModeMenu'; import { PresBox } from './nodes/PresBox'; +import { GoogleApiClientUtils } from '../apis/google_docs/GoogleApiClientUtils'; +import { docs_v1 } from 'googleapis'; @observer export class MainView extends React.Component { @@ -120,6 +122,32 @@ export class MainView extends React.Component { componentWillMount() { var tag = document.createElement('script'); + let requests: docs_v1.Schema$Request[] = + [{ + updateTextStyle: { + fields: "*", + range: { + startIndex: 1, + endIndex: 15 + }, + textStyle: { + bold: true, + link: { url: window.location.href }, + foregroundColor: { + color: { + rgbColor: { + red: 1.0, + green: 0.0, + blue: 0.0 + } + } + } + } + } + }]; + let documentId = "1xBwN4akVePW_Zp8wbiq0WNjlzGAE2PyNVvwzFbUyv3I"; + GoogleApiClientUtils.Docs.setStyle({ documentId, requests }); + tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode!.insertBefore(tag, firstScriptTag); |