Repository navigation
Add collapsible container plugin - #3082
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| editor.dispatchCommand(INSERT_COLLAPSIBLE_COMMAND, undefined); | ||
| }} | ||
| className="item"> | ||
| <i className="icon plus" /> |
There was a problem hiding this comment.
Maybe arrow-right instead?
thegreatercurve
left a comment
There was a problem hiding this comment.
LGTM! Out of interest, how badly does this mess up browser search for the document? You could possibly look at adding something like hidden=until-found but it's still in early development: https://developer.chrome.com/articles/hidden-until-found
|
I like the nested nodes approach, it could be nice to have draggable blocks support inside the container and from/to the outside. |
zurfyx
left a comment
There was a problem hiding this comment.
Awesome work! Not sure how to best validate the CollapsiblePlugin logic besides assuming that you came across them via trial and error and that we potentially still missed some that we will have to address over time.
|
Never got a chance to finish this, but a while back I was messing around with doing this leaning more on browser native behaviors and semantic html: Yours is certainly way better, just thought I would share |
I completely forgot about details/summary tags, thank you! It's actually a way better html structure as it both solves collab problem (collapsed/open state won't be synchronized) and auto-open if content matches CMD+F query |
88f3d88 to
cc03e27
Compare
|
* Add collapsible container plugin * Change icon, improve newline handling * Use summary/details tags for a native support
* Add collapsible container plugin * Change icon, improve newline handling * Use summary/details tags for a native support

Kind of an experiment with nested elements (vs going w/decorator and nested editors). Main part is in transformers that enforce nesting structure (and if it's violated unwrap content and convert collapsible content into regular paragraphs)
Screen.Recording.2022-09-28.at.10.31.15.AM.mov