import { action, computed, observable } from 'mobx'; import { observer } from 'mobx-react'; import * as React from 'react'; import { MainViewModal } from '../views/MainViewModal'; @observer export class RTFMarkup extends React.Component<{}> { static Instance: RTFMarkup; @observable private isOpen = false; // whether the SharingManager modal is open or not // private get linkVisible() { // return this.targetDoc ? this.targetDoc["acl-" + PublicKey] !== SharingPermissions.None : false; // } @action public open = () => (this.isOpen = true); @action public close = () => (this.isOpen = false); constructor(props: {}) { super(props); RTFMarkup.Instance = this; } @observable _stats: { [key: string]: any } | undefined; /** * @returns the main interface of the SharingManager. */ @computed get cheatSheet() { return (

{`wiki:phrase`} {` display wikipedia page for entered text (terminate with carriage return)`}

{`#tag `} {` add hashtag metadata to document. e.g, #idea`}

{`#, ## ... ###### `} {` set heading style based on number of '#'s between 1 and 6`}

{`#tag `} {` add hashtag metadata to document. e.g, #idea`}

{`>> `} {` add a sidebar text document inline`}

{`\`\` `} {` create a code snippet block`}

{`cmd-f `} {` collapse to an inline footnote)`}

{`cmd-e `} {` collapse to elided text`}

{`cmd-[ `} {` left justify text`}

{`cmd-\\ `} {` center text`}

{`cmd-] `} {` right justify text`}

{`%% `} {` restore default styling`}

{`%color `} {` changes text color styling. e.g., %green.`}

{`%num `} {` set font size. e.g., %10 for 10pt font`}

{`%eq `} {` creates an equation block for typeset math`}

{`%alt `} {` switch between primary and alternate text (see bottom right Button for hover options).`}

{`%> `} {` create a bockquote section. Terminate with 2 carriage returns`}

{`%q `} {` start a quoted block of text that’s indented on the left and right. Terminate with %q`}

{`%d `} {` start a block text where the first line is indented`}

{`%h `} {` start a block of text that begins with a hanging indent`}

{`[:doctitle]] `} {` hyperlink to document specified by it’s title`}

{`[[fieldname]] `} {` display value of fieldname`}

{`[[fieldname=value]] `} {` assign value to fieldname of document and display it`}

{`[[fieldname:doctitle]] `} {` show value of fieldname from doc specified by it’s title`}

); } render() { return ; } }