Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: redocly ctrl-f hijack #1631

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Using a theme, all of your default configuration lives in an npm package.
- [width (optional)](#width-optional)
- [typography (optional)](#typography-optional)
- [codeblock (optional)](#codeblock-optional)
- [ctrlFHijack (optional)](#ctrlfhijack-optional)
- [disableSidebar (optional)](#disablesidebar-optional)
- [disableSearch (optional)](#disablesearch-optional)
- [hideTryItPanel (optional)](#hidetryitpanel-optional)
Expand Down Expand Up @@ -1164,6 +1165,18 @@ Defaults to ```"tokens: { punctuation: { color: 'white' }}"```

https://redocly.com/docs/api-reference-docs/configuration/theming/#path=codeBlock

#### ctrlFHijack (optional)

```js
<RedoclyAPIBlock src="URL pointing to your open api yaml file." ctrlFHijack={false} />
```

Brings focus to the search bar when Control-F is pressed.

Defaults to ```false```

https://redocly.com/docs/api-reference-docs/configuration/functionality/#theme-object-openapi-schema

#### disableSidebar (optional)

```js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const RedoclyAPIBlock = ({
codeBlock = "tokens: { punctuation: { color: 'white' }}",
disableSidebar = false,
disableSearch = false,
ctrlFHijack = true,
hideTryItPanel = false,
scrollYOffset = 0,
sortOperationsAlphabetically = false,
Expand Down Expand Up @@ -70,6 +71,7 @@ const RedoclyAPIBlock = ({
{licenseKey: '${licenseKey}',
disableSidebar: ${disableSidebar},
disableSearch: ${disableSearch},
ctrlFHijack: ${ctrlFHijack},
hideTryItPanel: ${hideTryItPanel},
scrollYOffset: ${scrollYOffset},
sortOperationsAlphabetically: ${sortOperationsAlphabetically},
Expand Down
Loading