Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit 083203d

Browse files
committed
fix(web-scraping): update content extractor script hint
1 parent 7fca493 commit 083203d

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/pages/workspace/utils/web_scraping/web_page_content_tracker_edit_flyout.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,18 @@ export function WebPageContentTrackerEditFlyout({ onClose, tracker }: Props) {
266266
label="Content extractor"
267267
helpText={
268268
<span>
269-
The script accepts optional "previousContent" argument for the previously extracted content, and should
270-
return any portion of the web page content that should be tracked. The function can return any value as
271-
long as it can be{' '}
269+
The script accepts a single "context" object argument, and should return the content intended for
270+
tracking. The returned value can be anything as long as it can be serialized to a{' '}
272271
<EuiLink
273272
target="_blank"
274273
href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description"
275274
>
276-
<b>serialized to a JSON string</b>
275+
<b>JSON string</b>
276+
</EuiLink>
277+
{', '}
278+
including any{' '}
279+
<EuiLink target="_blank" href="https://eui.elastic.co/#/editors-syntax/markdown-format#kitchen-sink">
280+
<b>valid markdown-style content</b>
277281
</EuiLink>
278282
. Refer to the{' '}
279283
<EuiLink
@@ -282,7 +286,7 @@ export function WebPageContentTrackerEditFlyout({ onClose, tracker }: Props) {
282286
>
283287
<b>documentation</b>
284288
</EuiLink>{' '}
285-
for a list of script examples.
289+
for a list of script examples and properties available in the "context" object argument.
286290
</span>
287291
}
288292
>

0 commit comments

Comments
 (0)