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

Allow editors.List subclasses to define their ListItem class #398

Closed
wants to merge 4 commits into from

Conversation

fonji
Copy link
Contributor

@fonji fonji commented Jul 7, 2014

Hello,

I'm writing a new editor based on List and I need it to use another List.Item class.
I didn't want to override the whole List.Item as I want to be able to use both editors (my extension and the original List).
Here's how I did it. Tests passed successfully on firefox and chromium (and I don't see why it wouldn't).

I wonder if it can be useful to allow to override this in the schema. Let me know what you think.

Have a nice week!

@fonji fonji changed the title Allow editors.List subclass to define their ListItem class Allow editors.List subclasses to define their ListItem class Jul 7, 2014
@philfreo
Copy link
Collaborator

philfreo commented Jul 7, 2014

Just curious, for what reason did you want to override List.Item?

@fonji
Copy link
Contributor Author

fonji commented Jul 7, 2014

I'm trying to render a List of inlineNestedForms in bootstrap's tabs. Each object is in a tab.
So the list is not an ul > li but a collection of divs. So I have to use another template by default when using tabs editor.
I'll post a gist once it's nicely done but I need #392 and #393 to make it correctly.

Sorry for not posting the whole story first!

@philfreo
Copy link
Collaborator

philfreo commented Jul 7, 2014

Cool. 👍

@exussum12
Copy link
Collaborator

@fonji can you remove the /dist files please ? These are conflicted.

Could a test be added to prove that this works too please ?

@fonji
Copy link
Contributor Author

fonji commented Mar 13, 2016

Will do! I'll try to find some time this week.

@fonji fonji closed this Sep 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants