From 4b4d77f99bd55e6de0593c3acd1cf5798ae038bf Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 10 May 2024 14:05:01 -0400 Subject: added an always option for OpenWhere lightbox. cleaned up/fixed making collections capable of being a lightbox. --- src/client/util/DocumentManager.ts | 4 ++-- src/client/util/RTFMarkup.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/client/util') diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 97051207b..09a8194ca 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -264,11 +264,11 @@ export class DocumentManager { (!DocumentView.LightboxDoc() && docContextPath.some(doc => DocumentView.activateTabView(doc))) || DocumentViewInternal.addDocTabFunc(docContextPath[0], options.openLocation ?? OpenWhere.addRight); this.AddViewRenderedCb(docContextPath[0], dv => res(dv)); })); - if (options.openLocation === OpenWhere.lightbox) { + if (options.openLocation?.includes(OpenWhere.lightbox)) { // even if we found the document view, if the target is a lightbox, we try to open it in the lightbox to preserve lightbox semantics (eg, there's only one active doc in the lightbox) const target = DocCast(targetDoc.annotationOn, targetDoc); const contextView = this.getDocumentView(DocCast(target.embedContainer)); - if (contextView?.ComponentView?.addDocTab?.(target, OpenWhere.lightbox)) { + if (contextView?.ComponentView?.addDocTab?.(target, options.openLocation)) { await new Promise(waitres => { setTimeout(() => waitres()); }); diff --git a/src/client/util/RTFMarkup.tsx b/src/client/util/RTFMarkup.tsx index 248fda7e3..a07ad2047 100644 --- a/src/client/util/RTFMarkup.tsx +++ b/src/client/util/RTFMarkup.tsx @@ -26,10 +26,6 @@ export class RTFMarkup extends React.Component<{}> { @computed get cheatSheet() { return (
-

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

(( any text )) {` submit text to Chat GPT to have results appended afterward`} @@ -106,6 +102,10 @@ export class RTFMarkup extends React.Component<{}> { {`%h `} {` start a block of text that begins with a hanging indent`}

+

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

{`@(doctitle) `} {` hyperlink to document specified by it’s title`} -- cgit v1.2.3-70-g09d2