Skip to main content

Class: Rem

Properties

_id

Readonly _id: string


backText

Optional Readonly backText: RichTextInterface


children

Readonly children: undefined | string[]


createdAt

Readonly createdAt: number


getPowerupProperty

getPowerupProperty: GetPowerupPropertyOverload


getPowerupPropertyAsRichText

getPowerupPropertyAsRichText: GetPowerupPropertyAsRichTextOverload


localUpdatedAt

Readonly localUpdatedAt: number


parent

Readonly parent: null | string


setPowerupProperty

setPowerupProperty: SetPowerupPropertyOverload


text

Readonly text: undefined | RichTextInterface


type

Readonly type: RemType


updatedAt

Readonly updatedAt: number

Methods

addPowerup

addPowerup(powerupCode): Promise<void>

Parameters

NameType
powerupCodestring

Returns

Promise<void>


addSource

addSource(source): Promise<void>

Parameters

NameType
sourcestring | Rem

Returns

Promise<void>


addTag

addTag(tag): Promise<void>

Parameters

NameType
tagstring | Rem

Returns

Promise<void>


addToPortal

addToPortal(portal): Promise<void>

Parameters

NameType
portalstring | Rem

Returns

Promise<void>


allRemInDocumentOrPortal

allRemInDocumentOrPortal(): Promise<Rem[]>

Returns

Promise<Rem[]>


allRemInFolderQueue

allRemInFolderQueue(): Promise<Rem[]>

Returns

Promise<Rem[]>


ancestorTagRem

ancestorTagRem(): Promise<Rem[]>

Returns

Promise<Rem[]>


collapse

collapse(portal): Promise<void>

Parameters

NameType
portalundefined | string | Rem

Returns

Promise<void>


copyPortalReferenceToClipboard

copyPortalReferenceToClipboard(): Promise<void>

Returns

Promise<void>


copyReferenceToClipboard

copyReferenceToClipboard(): Promise<void>

Returns

Promise<void>


copyTagReferenceToClipboard

copyTagReferenceToClipboard(): Promise<void>

Returns

Promise<void>


deepRemsBeingReferenced

deepRemsBeingReferenced(): Promise<Rem[]>

Returns

Promise<Rem[]>


descendantTagRem

descendantTagRem(): Promise<Rem[]>

Returns

Promise<Rem[]>


embeddedQueueViewMode

embeddedQueueViewMode(): Promise<boolean>

Returns

Promise<boolean>


expand

expand(portal, recurse): Promise<void>

Parameters

NameTypeDescription
portalundefined | string | Rem-
recurseboolean

Returns

Promise<void>


getAliases

getAliases(): Promise<Rem[]>

Returns

Promise<Rem[]>


getCards

getCards(): Promise<Card[]>

Returns

Promise<Card[]>


getChildrenRem

getChildrenRem(): Promise<Rem[]>

Returns

Promise<Rem[]>


getDescendants

getDescendants(): Promise<Rem[]>

Returns

Promise<Rem[]>


getEnablePractice

getEnablePractice(): Promise<boolean>

Returns

Promise<boolean>


getFontSize

getFontSize(): Promise<undefined | "H1" | "H2" | "H3">

Returns

Promise<undefined | "H1" | "H2" | "H3">


getHighlightColor

getHighlightColor(): Promise<undefined | string>

Returns

Promise<undefined | string>


getLastPracticed

getLastPracticed(): Promise<number>

Returns

Promise<number>


getLastTimeMovedTo

getLastTimeMovedTo(): Promise<number>

Returns

Promise<number>


getOrCreateAliasWithText

getOrCreateAliasWithText(aliasText): Promise<undefined | Rem>

Parameters

NameType
aliasTextRichTextInterface

Returns

Promise<undefined | Rem>


getParentRem

getParentRem(): Promise<undefined | Rem>

Returns

Promise<undefined | Rem>


getPortalDirectlyIncludedRem

getPortalDirectlyIncludedRem(): Promise<Rem[]>

Returns

Promise<Rem[]>


getPortalType

getPortalType(): Promise<PORTAL_TYPE>

Returns

Promise<PORTAL_TYPE>


getPowerupPropertyAsRem

getPowerupPropertyAsRem<PowerupCode>(powerupCode, powerupSlot): Promise<undefined | Rem>

Type parameters

NameType
PowerupCodeextends BuiltInPowerupCodes

Parameters

NameType
powerupCodestring | PowerupCode
powerupSlotstring | keyof { a: { SortDirection: string = 'd' } ; at: { Templates: string = 't' } ; b: { FileURL: string = 'f'; LastReadDate: string = 'd'; ReadPercent: string = 'r'; Title: string = 't'; URL: string = 'u' } ; c: {} = {}; cd: { DontBoundHeight: string = 'b'; DontWrap: string = 'w'; Language: string = 'l' } ; ct: { Template: string = 't' } ; d: { Date: string = 'd'; Timestamp: string = 's' } ; de: { ExamSchedulerCollection: string = 'emcd'; ExamSchedulerDate: string = 'e'; ExamSchedulerDesiredStability: string = 'eds'; ExamSchedulerMaxNewCardsPerDay: string = 'emnc'; ExamSchedulerMaxTotalCardsPerDay: string = 'emtc'; MaxNewCardsPerDay: string = 'm'; MaxTotalCardsPerDay: string = 'c'; Status: string = 's'; Topics: string = 't' } ; dv: {} = {}; e: { Message: string = 'm' } ; f: { Authors: string = 'a'; HasNoTextLayer: string = 'tl'; Keywords: string = 'k'; LastReadDate: string = 'd'; Name: string = 'n'; ReadPercent: string = 'r'; Theme: string = 'h'; Title: string = 'i'; Type: string = 't'; URL: string = 'u'; ViewerData: string = 'v' } ; g: { AutoActivate: string = 'a'; CollapseConfigure: string = 'c'; Pinned: string = 'p'; PrimaryColumnName: string = 'n' } ; h: { Color: string = 'c' } ; ha: {} = {}; hh: { Data: string = 'd'; HTMLId: string = 'h' } ; i: {} = {}; id: {} = {}; j: {} = {}; k: {} = {}; l: { Aliases: string = 'a' } ; m: {} = {}; n: { Data: string = 'd'; PdfId: string = 'p' } ; o: { DeprecatedSource: string = 'o'; Status: string = 's' } ; os: { Sources: string = 'os' } ; p: { Data: string = 'd'; Url: string = 'w' } ; pn: {} = {}; q: {} = {}; qt: {} = {}; r: { Size: string = 's' } ; rt: { Date: string = 'd' } ; s: {} = {}; sd: {} = {}; sp: { AutomaticBacklinkSearchPortalFor: string = 'b'; DontIncludeNestedDescendants: string = 's'; Filter: string = 'f'; Query: string = 'q' } ; t: { Status: string = 's' } ; ty: {} = {}; u: {} = {}; w: {} = {}; x: {} = {}; y: { ExtraSlotsOnBackOfCard: string = 'b'; ExtraSlotsOnFrontOfCard: string = 'f'; SelectTag: string = 't' } ; z: { Hostname: string = 'u' } }[PowerupCode]

Returns

Promise<undefined | Rem>


getPracticeDirection

getPracticeDirection(): Promise<"both" | "none" | "forward" | "backward">

Returns

Promise<"both" | "none" | "forward" | "backward">


getPropertyType

getPropertyType(): Promise<undefined | PropertyType>

Returns

Promise<undefined | PropertyType>


getSchemaVersion

getSchemaVersion(): Promise<number>

Returns

Promise<number>


getSources

getSources(): Promise<Rem[]>

Returns

Promise<Rem[]>


getTagPropertyAsRem

getTagPropertyAsRem(propertyId): Promise<undefined | Rem>

Parameters

NameType
propertyIdstring

Returns

Promise<undefined | Rem>


getTagPropertyValue

getTagPropertyValue(propertyId): Promise<RichTextInterface>

Parameters

NameType
propertyIdstring

Returns

Promise<RichTextInterface>


getTagRems

getTagRems(): Promise<Rem[]>

Returns

Promise<Rem[]>


getTodoStatus

getTodoStatus(): Promise<undefined | "Finished" | "Unfinished">

Returns

Promise<undefined | "Finished" | "Unfinished">


getType

getType(): Promise<RemType>

Returns

Promise<RemType>


hasPowerup

hasPowerup(powerupCode): Promise<boolean>

Parameters

NameType
powerupCodestring

Returns

Promise<boolean>


indent

indent(portal?): Promise<void>

Parameters

NameType
portal?string | Rem

Returns

Promise<void>


isCardItem

isCardItem(): Promise<boolean>

Returns

Promise<boolean>


isCode

isCode(): Promise<boolean>

Returns

Promise<boolean>


isCollapsed

isCollapsed(portalId): Promise<boolean>

Parameters

NameType
portalIdstring

Returns

Promise<boolean>


isDocument

isDocument(): Promise<boolean>

Returns

Promise<boolean>


isListItem

isListItem(): Promise<boolean>

Returns

Promise<boolean>


isPowerup

isPowerup(): Promise<boolean>

Returns

Promise<boolean>


isPowerupEnum

isPowerupEnum(): Promise<boolean>

Returns

Promise<boolean>


isPowerupProperty

isPowerupProperty(): Promise<boolean>

Returns

Promise<boolean>


isPowerupPropertyListItem

isPowerupPropertyListItem(): Promise<boolean>

Returns

Promise<boolean>


isPowerupSlot

isPowerupSlot(): Promise<boolean>

Returns

Promise<boolean>


isProperty

isProperty(): Promise<boolean>

Returns

Promise<boolean>


isQuote

isQuote(): Promise<boolean>

Returns

Promise<boolean>


isSlot

isSlot(): Promise<boolean>

Returns

Promise<boolean>


isTable

isTable(): Promise<any>

Returns

Promise<any>


isTodo

isTodo(): Promise<boolean>

Returns

Promise<boolean>


merge

merge(remIdToMergeIntoThisOne): Promise<void>

Parameters

NameType
remIdToMergeIntoThisOnestring

Returns

Promise<void>


mergeAndSetAlias

mergeAndSetAlias(remToMergeIntoThisOne): Promise<void>

Parameters

NameType
remToMergeIntoThisOnestring | Rem

Returns

Promise<void>


openRemAsPage

openRemAsPage(): Promise<void>

Returns

Promise<void>


openRemInContext

openRemInContext(): Promise<void>

Returns

Promise<void>


outdent

outdent(portal?): Promise<void>

Parameters

NameType
portal?string | Rem

Returns

Promise<void>


portalsAndDocumentsIn

portalsAndDocumentsIn(): Promise<Rem[]>

Returns

Promise<Rem[]>


positionAmongstSiblings

positionAmongstSiblings(portalId?): Promise<undefined | number>

Parameters

NameType
portalId?string

Returns

Promise<undefined | number>


positionAmongstVisibleSiblings

positionAmongstVisibleSiblings(portalId?): Promise<undefined | number>

Parameters

NameType
portalId?string

Returns

Promise<undefined | number>


remove

remove(): Promise<void>

Returns

Promise<void>


removeFromPortal

removeFromPortal(portal): Promise<void>

Parameters

NameType
portalstring | Rem

Returns

Promise<void>


removePowerup

removePowerup(powerupCode): Promise<void>

Parameters

NameType
powerupCodestring

Returns

Promise<void>


removeSource

removeSource(source): Promise<void>

Parameters

NameType
sourcestring | Rem

Returns

Promise<void>


removeTag

removeTag(tagId, removeProperties?): Promise<void>

Parameters

NameTypeDefault value
tagIdstringundefined
removePropertiesbooleanfalse

Returns

Promise<void>


remsBeingReferenced

remsBeingReferenced(): Promise<Rem[]>

Returns

Promise<Rem[]>


remsReferencingThis

remsReferencingThis(): Promise<Rem[]>

Returns

Promise<Rem[]>


scrollToReaderHighlight

scrollToReaderHighlight(): Promise<void>

Returns

Promise<void>


setBackText

setBackText(backText): Promise<void>

Parameters

NameType
backTextundefined | RichTextInterface

Returns

Promise<void>


setEnablePractice

setEnablePractice(enablePractice): Promise<void>

Parameters

NameType
enablePracticeboolean

Returns

Promise<void>


setFontSize

setFontSize(fontSize): Promise<void>

Parameters

NameType
fontSizeundefined | "H1" | "H2" | "H3"

Returns

Promise<void>


setHighlightColor

setHighlightColor(highlightColor): Promise<void>

Parameters

NameType
highlightColor"Red" | "Orange" | "Yellow" | "Green" | "Blue" | "Purple"

Returns

Promise<void>


setIsCardItem

setIsCardItem(isCardItem): Promise<void>

Parameters

NameType
isCardItemboolean

Returns

Promise<void>


setIsCode

setIsCode(isCode): Promise<void>

Parameters

NameType
isCodeboolean

Returns

Promise<void>


setIsCollapsed

setIsCollapsed(isCollapsed, portalId): Promise<boolean>

Parameters

NameType
isCollapsedboolean
portalIdstring

Returns

Promise<boolean>


setIsDocument

setIsDocument(isDocument): Promise<void>

Parameters

NameType
isDocumentboolean

Returns

Promise<void>


setIsListItem

setIsListItem(isListItem): Promise<void>

Parameters

NameType
isListItemboolean

Returns

Promise<void>


setIsProperty

setIsProperty(isProperty): Promise<void>

Parameters

NameType
isPropertyboolean

Returns

Promise<void>


setIsQuote

setIsQuote(isQuote): Promise<void>

Parameters

NameType
isQuoteboolean

Returns

Promise<void>


setIsSlot

setIsSlot(isSlot): Promise<void>

Parameters

NameType
isSlotboolean

Returns

Promise<void>


setIsTodo

setIsTodo(isTodo): Promise<void>

Parameters

NameType
isTodoboolean

Returns

Promise<void>


setParent

setParent(parent, positionAmongstSiblings?): Promise<void>

Parameters

NameType
parentnull | string | Rem
positionAmongstSiblings?number

Returns

Promise<void>


setPracticeDirection

setPracticeDirection(direction): Promise<void>

Parameters

NameType
direction"both" | "none" | "forward" | "backward"

Returns

Promise<void>


setTableFilter

setTableFilter(filter): Promise<void>

Parameters

NameType
filterSearchPortalQuery

Returns

Promise<void>


setTagPropertyValue

setTagPropertyValue(propertyId, value): Promise<void>

Parameters

NameType
propertyIdstring
valueundefined | RichTextInterface

Returns

Promise<void>


setText

setText(text): Promise<void>

Parameters

NameType
textRichTextInterface

Returns

Promise<void>


setTodoStatus

setTodoStatus(todoStatus): Promise<void>

Parameters

NameType
todoStatus"Finished" | "Unfinished"

Returns

Promise<void>


setType

setType(type): Promise<void>

Parameters

NameType
typeSetRemType

Returns

Promise<void>


siblingRem

siblingRem(): Promise<Rem[]>

Returns

Promise<Rem[]>


taggedRem

taggedRem(): Promise<Rem[]>

Returns

Promise<Rem[]>


timesSelectedInSearch

timesSelectedInSearch(): Promise<number>

Returns

Promise<number>


visibleSiblingRem

visibleSiblingRem(portalId?): Promise<Rem[]>

Parameters

NameType
portalId?string

Returns

Promise<Rem[]>