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

Toggling external content #67

Open
ihostage opened this issue Dec 19, 2023 · 1 comment · May be fixed by #68
Open

Toggling external content #67

ihostage opened this issue Dec 19, 2023 · 1 comment · May be fixed by #68

Comments

@ihostage
Copy link

Hi, @mojavelinux! 👋
Thanks a lot for your great work in general and for this extension in particular 👍
Context: We migrate a part of PlayFramework docs that was written by Paradox and use AsciiDoc Tabs. But we have a one issue.
Is it possible to add behavior when the switching tabs also change the content outside the tabs?

I'll explain what I mean. In Paradox it's looks like next:

Java
:   @@snip [example-second.java](/docs/src/main/resources/tab-switching/examples.java)

Scala
:   @@snip [example-second.scala](/docs/src/main/resources/tab-switching/examples.scala)

The module file is generated in ... for @java[Java]@scala[Scala]

And when I'm switching the tabs, the text in paragraph also is changed. You can see how it works on this page for example.

chrome-capture-2023-12-19

I can try to create a pull request to solve this issue, but I need your opinion about how the solution should look to be accepted 🙏

@mojavelinux
Copy link
Member

Toggling content outside the tabset is not within the scope of this project. However, I'd be willing to consider having the script raise an event when a tab is switched so that you can hook in your own code to toggle other content. Alternatively, you could register listeners on the tabs to do the same since the state of the tab is stored in the HTML DOM.

@ihostage ihostage linked a pull request Dec 20, 2023 that will close this issue
@ihostage ihostage changed the title Support "inline" tabs Toggling external content Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants