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

Open aria practice's examples in online javascript/html/css editor #1102

Closed
spectranaut opened this issue Jul 19, 2019 · 1 comment · Fixed by #1110
Closed

Open aria practice's examples in online javascript/html/css editor #1102

spectranaut opened this issue Jul 19, 2019 · 1 comment · Fixed by #1110
Assignees
Labels
enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Example Page Related to a page containing an example implementation of a pattern
Milestone

Comments

@spectranaut
Copy link
Contributor

spectranaut commented Jul 19, 2019

See draft PR #1110 for an example implementation using Codepen's post API.

See draft PR #1111 for an example implementation using JSFiddle's post API

We'd really like to hear from the community if they prefer JSFiddle or Codepen, it seems like both are perfectly workable solutions from the tech side.

@mcking65 mcking65 added Example Page Related to a page containing an example implementation of a pattern enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy labels Aug 6, 2019
@mcking65
Copy link
Contributor

@zcorpan, we are going with the codepen implementation in PR #1110.

However, instead of manually adding the button to open codepen to each example page, we would like to add it dynamically. The examples/js/examples.js script runs on every example page to add the HTML source of the example. We can add this capability to that script.

I'm assigning this issue to you to make that change to examples.js.

@mcking65 mcking65 added this to the 1.2 Release 1 milestone Apr 29, 2020
@mcking65 mcking65 linked a pull request Apr 29, 2020 that will close this issue
mcking65 added a commit that referenced this issue Sep 15, 2020
Resolves issue #1102 by adding support to dynamically add an "Open in Codepen" button adjacent to the heading above an example.
The examples/js/examples.js script uses the Codepen POST API to prefill its HTML/CSS/JS inputs.
The script expects a specific class on the heading of the example and requires that IDs for specific elements be passed to the scourceCode.add method call.

Co-authored-by: Matt King <a11yThinker@gmail.com>
Co-authored-by: Zoë Bijl <zoe.bijl@crowdstrike.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Example Page Related to a page containing an example implementation of a pattern
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants