aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RTFMarkup.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/RTFMarkup.tsx')
-rw-r--r--src/client/util/RTFMarkup.tsx34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/client/util/RTFMarkup.tsx b/src/client/util/RTFMarkup.tsx
index f96d8a5df..35b1579df 100644
--- a/src/client/util/RTFMarkup.tsx
+++ b/src/client/util/RTFMarkup.tsx
@@ -3,18 +3,12 @@ import { observer } from 'mobx-react';
import * as React from 'react';
import { MainViewModal } from '../views/MainViewModal';
import { SettingsManager } from './SettingsManager';
-import { Doc } from '../../fields/Doc';
-import { StrCast } from '../../fields/Types';
@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);
@@ -36,10 +30,14 @@ export class RTFMarkup extends React.Component<{}> {
return (
<div style={{ background: SettingsManager.userBackgroundColor, color: SettingsManager.userColor, textAlign: 'initial', height: '100%' }}>
<p>
- <b style={{ fontSize: 'larger' }}>{`wiki:phrase`}</b>
+ <b style={{ fontSize: 'larger' }}>{`(@wiki:phrase)`}</b>
{` display wikipedia page for entered text (terminate with carriage return)`}
</p>
<p>
+ <b style={{ fontSize: 'larger' }}>{`(( any text ))`}</b>
+ {` submit text to Chat GPT to have results appended afterward`}
+ </p>
+ <p>
<b style={{ fontSize: 'larger' }}>{`#tag `}</b>
{` add hashtag metadata to document. e.g, #idea`}
</p>
@@ -48,10 +46,6 @@ export class RTFMarkup extends React.Component<{}> {
{` set heading style based on number of '#'s between 1 and 6`}
</p>
<p>
- <b style={{ fontSize: 'larger' }}>{`#tag `}</b>
- {` add hashtag metadata to document. e.g, #idea`}
- </p>
- <p>
<b style={{ fontSize: 'larger' }}>{`>> `}</b>
{` add a sidebar text document inline`}
</p>
@@ -61,7 +55,7 @@ export class RTFMarkup extends React.Component<{}> {
</p>
<p>
<b style={{ fontSize: 'larger' }}>{`cmd-f `}</b>
- {` collapse to an inline footnote)`}
+ {` collapse to an inline footnote`}
</p>
<p>
<b style={{ fontSize: 'larger' }}>{`cmd-e `}</b>
@@ -116,20 +110,20 @@ export class RTFMarkup extends React.Component<{}> {
{` start a block of text that begins with a hanging indent`}
</p>
<p>
- <b style={{ fontSize: 'larger' }}>{`[:doctitle]] `}</b>
+ <b style={{ fontSize: 'larger' }}>{`@(doctitle) `}</b>
{` hyperlink to document specified by it’s title`}
</p>
<p>
- <b style={{ fontSize: 'larger' }}>{`[[fieldname]] `}</b>
- {` display value of fieldname`}
+ <b style={{ fontSize: 'larger' }}>{`[@(doctitle.)fieldname] `}</b>
+ {` display value of fieldname of text document (unless (doctitle.) is used to indicate another document by it's title)`}
</p>
<p>
- <b style={{ fontSize: 'larger' }}>{`[[fieldname=value]] `}</b>
- {` assign value to fieldname of document and display it`}
+ <b style={{ fontSize: 'larger' }}>{`[@fieldname:value] `}</b>
+ {` assign value to fieldname to data document and display it (if '=' is used instead of ':' the value is set on the layout Doc. if value is wrapped in (()) then it will be sent to ChatGPT and the response will replace the value)`}
</p>
<p>
- <b style={{ fontSize: 'larger' }}>{`[[fieldname:doctitle]] `}</b>
- {` show value of fieldname from doc specified by it’s title`}
+ <b style={{ fontSize: 'larger' }}>{`[@fieldname:=expression] `}</b>
+ {` assign a computed expression to fieldname to data document and display it (if '=:=' is used instead of ':=' the expression is set on the layout Doc. if value is wrapped in (()) then it will be sent to ChatGPT and the prompt/response will replace the value)`}
</p>
</div>
);
@@ -138,7 +132,7 @@ export class RTFMarkup extends React.Component<{}> {
render() {
return (
<MainViewModal
- dialogueBoxStyle={{ backgroundColor: SettingsManager.userBackgroundColor, color: SettingsManager.userColor, padding: '16px' }}
+ dialogueBoxStyle={{ backgroundColor: SettingsManager.userBackgroundColor, alignContent: 'normal', color: SettingsManager.userColor, padding: '16px' }}
contents={this.cheatSheet}
isDisplayed={this.isOpen}
interactive={true}