-
Notifications
You must be signed in to change notification settings - Fork 383
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
[Gutenberg] Add amp-mathml block #1165
Conversation
@westonruter Currently the block is not displaying the converted formula within editor, do you think that's OK for the first iteration, or should we try to implement displaying the converted formula in editor, too? |
Yes, this is OK for the first iteration. Once AMP can be embedded inside of React components, then we can hook up |
blocks/amp-mathml/index.js
Outdated
), | ||
<PlainText | ||
key='formula' | ||
tagName='div' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a warning here:
Warning: React does not recognize the
tagName
prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercasetagname
instead. If you accidentally passed it from a parent component, remove it from the DOM element.
…Gutenberg Remove amp-runtime from being enqueued
blocks/amp-mathml/index.js
Outdated
<InspectorControls key='inspector'> | ||
<PanelBody title={ __( 'AMP MathML Settings' ) }> | ||
<ToggleControl | ||
label={ __( 'Display inline' ) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While amp-mathml
has an inline option, it doesn't really work in the context of Gutenberg blocks which really stay mostly in the domain of block contexts. So I think this inline option should be removed until we can figure out how better to handle inline blocks in Gutenberg. I think that the work being explored with Inline Images will make this possible: WordPress/gutenberg#2043
Adds Gutenberg block for
amp-mathml
width input for formula and toggle for displaying inline.