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

RichText with list items forces the "convert to ordered/unordered" toolbar options #13143

Closed
ryelle opened this Issue Dec 30, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@ryelle
Copy link
Contributor

ryelle commented Dec 30, 2018

Using RichText with multilineTag='li' turns on the ListEdit toolbar, but without passing in onTagNameChange, clicking "convert to ordered list" triggers an error: "Uncaught TypeError: onTagNameChange is not a function".

To Reproduce

I have a block that includes an unordered list, which right now I've made using the following code. This should always be an unordered list, so I don't want the writer to be able to switch ol for ul (so I'm not using onTagNameChange). But I do get the "convert…" options regardless (see screenshot).

<RichText
	multiline="li"
	tagName="ul"
	onChange={ ( nextValues ) => setAttributes( { list: nextValues } ) }
	value={ list }
	placeholder={ __( 'Write list…' ) }
/>

screen shot 2018-12-30 at 2 41 41 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment