-
Notifications
You must be signed in to change notification settings - Fork 22
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
lists: Add query for being inside list #25
Comments
Or maybe one for UL and one for OL |
I like
|
well - should the type be the one that is passed as the block type, or should it be the key of the block type? In my case, that would be Also, do we anticipate any other arguments ever? If not, maybe passing just the type as a string suffices; later on the argument type could still be detected if objects are needed. |
It would be whatever you passed in as the block type, so Good question on other arguments, I'm not sure. Currently, |
Hmm. I took another look at the plugin and I have a couple of remarks:
|
I wonder if this could be accomplished by using the plugin more than once. In that case, the plugin would only have to handle one type. I chose to hard code it for now to keep it simpler, but it doesn't have to stay that way.
It made it easier to make work out of the box. A
I'm not too worried about the efficiency here. If there was a benchmark of a real world use case where it made a difference, then maybe we could change it for that reason. I'm open to changing it for other reasons, but probably further down the line. |
Hmm, but then there will be two
Does Slate require each node to be a real DOM node? Maybe For the |
Good point about multiple queries. I personally don't have a use case for more than two list types right now, so I don't plan on adding it, but would be open to a PR for it if someone needs it.
I thought so, but I'm not sure. The slate attributes have to get put into the DOM somehow. Regarding the It may be easier to discuss some of these things in separate issues. |
This is useful for e.g. button bars
Not sure what to call it,
isList
,hasList
,inList
?getListItem will then need a guard for undefined
block
The text was updated successfully, but these errors were encountered: