Skip to content

SPARQL Studio API / SparqlEditor / Config

Interface: Config

Defined in: sparql-editor-monaco/src/index.ts:1294

Properties

value

value: string

Defined in: sparql-editor-monaco/src/index.ts:1296

Initial query value.


createShareableLink: (yasqe) => string

Defined in: sparql-editor-monaco/src/index.ts:1302

Show a button with which users can create a link to this query. Set this value to null to disable this functionality. By default, this feature is enabled, and the only the query value is appended to the link. ps. This function should return an object which is parseable by jQuery.param (http://api.jquery.com/jQuery.param/)

Parameters

yasqe

SparqlEditor

Returns

string


createShortLink: ((yasqe, longLink) => Promise<string>) | undefined

Defined in: sparql-editor-monaco/src/index.ts:1303


consumeShareLink: ((yasqe) => void) | null | undefined

Defined in: sparql-editor-monaco/src/index.ts:1304


persistenceId

persistenceId: string | ((yasqe) => string) | null | undefined

Defined in: sparql-editor-monaco/src/index.ts:1313

Change persistency settings for the YASQE query value. Setting the values to null, will disable persistancy: nothing is stored between browser sessions Setting the values to a string (or a function which returns a string), will store the query in localstorage using the specified string. By default, the ID is dynamically generated using the closest dom ID, to avoid collissions when using multiple YASQE items on one page


persistencyExpire

persistencyExpire: number

Defined in: sparql-editor-monaco/src/index.ts:1314


showQueryButton

showQueryButton: boolean

Defined in: sparql-editor-monaco/src/index.ts:1315


requestConfig

requestConfig: RequestConfig<SparqlEditor> | ((yasqe) => RequestConfig<SparqlEditor>)

Defined in: sparql-editor-monaco/src/index.ts:1316


pluginButtons

pluginButtons: (() => HTMLElement | HTMLElement[]) | undefined

Defined in: sparql-editor-monaco/src/index.ts:1317


resizeable

resizeable: boolean

Defined in: sparql-editor-monaco/src/index.ts:1318


editorHeight

editorHeight: string

Defined in: sparql-editor-monaco/src/index.ts:1319


queryingDisabled

queryingDisabled: string | undefined

Defined in: sparql-editor-monaco/src/index.ts:1320


theme

theme: "light" | "dark"

Defined in: sparql-editor-monaco/src/index.ts:1321


editorOptions

editorOptions: Record<string, any>

Defined in: sparql-editor-monaco/src/index.ts:1327

Custom Monaco editor options (IStandaloneEditorConstructionOptions), deep-merged over yasqe defaults. Use this to fully configure the editor, e.g. { lineNumbers: "off", wordWrap: "on", fontSize: 16, minimap: { enabled: true } }.


themes

themes: object

Defined in: sparql-editor-monaco/src/index.ts:1333

Custom SPARQL theme overrides, deep-merged over the built-in light/dark themes. Use this to tweak editor colors, e.g. { dark: { colors: { "editor.background": "#000" } }, light: { semanticTokenColors: { keyword: "#005" } } }.

light?

optional light?: Record<string, any>

dark?

optional dark?: Record<string, any>


languageServers

languageServers: LanguageServerDef[]

Defined in: sparql-editor-monaco/src/index.ts:1340

The language servers the consumer makes available (yasqe is language server agnostic). The first is activated on load; when two or more are configured a switcher appears in the editor's right-click context menu. Servers are started lazily (the worker is resolved only when a server is first activated). When empty, the editor runs with Monarch syntax highlighting only.


getLanguageServerSettings?

optional getLanguageServerSettings?: (label) => Record<string, unknown> | undefined

Defined in: sparql-editor-monaco/src/index.ts:1348

Optional consumer-owned store for language server settings panel values, keyed by server label. When provided (e.g. by SparqlStudio, which persists them globally per server), it is the source of truth for pre-filling the settings panel and re-applying settings when a server (re)starts. Pairs with the languageServerSettingsChange event emitted when the user applies settings. When omitted, yasqe falls back to its own local-storage persistence.

Parameters

label

string

Returns

Record<string, unknown> | undefined