---
title: Current Page Document Loader
description: Load the current tab as text to feed into the Indexer
---

Load the text of the page in your current tab, ready to index into a knowledge base.

## What it does

Current Page Document Loader reads the text of the active browser tab and puts it in one output field, named by **Output field name** (`text` by default). It reads the page as you see it, so pages behind a login and content added by scripts are included.

Set **DOM Selector** to read only part of the page, such as the main article. It uses the same text extraction as [Get All Text](/nodes/extension/getalltext/), and is meant to feed the [Indexer](/nodes/builtin/ai/aiagents/indexernode/).

## When to use it

* Save the article, document or internal tool page you are looking at into a knowledge base.
* Index pages that need you to be signed in, which [URL Document Loader](/nodes/builtin/ai/loaders/urldocumentloader/) cannot reach.
* Start it from a right-click so you can index any page as you browse.

## Inputs and settings

* Leave **DOM Selector** empty to read the whole page. Use the picker to click the part you want, or type a selector such as `article` or `main`.
* Turn on **Visible text only** to skip hidden menus, collapsed sections and other text you can't see.

## Outputs

Each item has the page text in the field you named (default `text`). With **Include input fields** on, the incoming fields are kept next to it. Pass it to the Indexer's **Input** as `{{ $input.text }}`.

## Dependencies and credentials

None. This node needs no connection and has no slots for other nodes.

## Example workflow

1. [Context Menu](/nodes/builtin/trigger/contextmenu/) with **Menu Contexts** `Page`, so you can right-click any page to run the workflow.
2. Current Page Document Loader with **DOM Selector** `article`, **Visible text only** on and **Output field name** `text`.
3. [Indexer](/nodes/builtin/ai/aiagents/indexernode/) with **Input** `{{ $input.text }}`. Connect [Local Knowledge](/nodes/builtin/ai/aidependencies/vectorstore/localknowledge/) to **Knowledge** and [Recursive Character Text Splitter](/nodes/builtin/ai/aidependencies/textsplitter/recursivecharactertextsplitter/) to **Text Splitter**.

## Common issues

* **"No content found".** The page, or the element matched by **DOM Selector**, has no text. Run the workflow once the page has loaded, and check or clear **DOM Selector**.
* **The node doesn't run in the web app.** This node runs in the browser extension; install it or run the workflow from the extension.
* **Menus and footers end up in the knowledge base.** Set **DOM Selector** to the main content, and turn on **Visible text only**.

## Related nodes

* [Indexer](/nodes/builtin/ai/aiagents/indexernode/): save the text into a knowledge base.
* [Get All Text](/nodes/extension/getalltext/): the same page text, when you don't need to index.
* [URL Document Loader](/nodes/builtin/ai/loaders/urldocumentloader/): load a page by its address, without opening it.