question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inline examples in the documentation

See original GitHub issue

🚨 PLEASE DO NOT WORK ON THIS ISSUE: This work is earmarked for a Meta intern.

Compared to other rich text editors, our documentation lacks inline/iframe examples of various Lexical concepts and plugins.

As we have opened up Lexical to the OSS community, more and more functionality is being added to the official playground.

This creates a kitchen sink example which is confusing to navigate for first time and existing users alike. It also blocks many developers who try to navigate the playground’s codebase to simply copy and paste example code.

To solve this issue, my proposal is to break down the playground into several smaller examples, each one highlighting a different piece of functionality, or different plugin.

These example can then be collated into iframes in an “Examples” section within our docs.

Some examples of other inline example pages from other RTEs:

This work will also involve changing some of our E2Es which rely exclusively on the playground.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
echarlescommented, Aug 25, 2022

Sandpack has a plugin for docusaurus https://github.com/codesandbox/sandpack/tree/main/plugins/docusaurus

and their docs website on https://sandpack.codesandbox.io/docs/ is built with docusaurus (the introduction page has such a “Live coding environment in minutes”).

Screenshot 2022-08-25 at 16 11 07
1reaction
echarlescommented, Aug 24, 2022

There are other examples that allow to show live code and also generate a button to open that code in codesanbox

I have looked at a docusaurus plugin that would allow to embed a codesandbox in a docusaurus webpage but have not found any. Maybe it exists somewhere, or it should not be too difficult to implement. This would allow to directly embed the existing codesanbox plain and rich text.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inline Documentation - Software Engineering Tips
Inline documentation, or "comments", is a habit of good programming that beginners don't always use effectively. They should be used the way a...
Read more >
Inline documentation - the secret habit of successful devs.
The common understanding of inline documentation refers to comments placed within the code files, but that's a very big simplification. Comments in the...
Read more >
inline {@example} - phpDocumentor
Like the @example tag, the inline example tag can be used to parse an example file for syntax highlighting and linking to documentation....
Read more >
Inline Documentation Standards | Coding Standards Handbook
Inline documentation provides a good resource for core developers in future development, and other developers when learning about WordPress.
Read more >
Inline documentation · Modern Development Handbook
Here's a very basic example of documentation that was written in haste. Despite missing actual words, a quick glance can help a new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found