-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Overview: RichText, APIs, & Formatting Library #13778
Comments
Just created my first PR for text color. I need guidance on proper testing though if I missed something. Thanks a lot in advance. |
Some pals and I had this conversation yesterday. There are no doubt branches and offshoots I've missed capturing, but here it is: https://twitter.com/ChrisWiegman/status/1137449406108594176 |
@marybaum I'm not sure what we can do with that thread? Any specific thing that should be added to this roadmap? |
@ellatrix can we add the item to make it consistent when pressing enter on empty line new Paragraph blocks is crated for all text blocks? It works for:
I experimented with Verse block in #16880 but it was far from production quality :) |
@ellatrix what's the state of these tasks? |
There's still a lot of items left here. I'll look into footnotes after the iframe PRs are done. |
@ellatrix Just wondering if these items are still being worked on? I'd be interested to see (and help test) the "API for rendering more complex structures in RichText" option so I can allow users to write inline |
@SeanDS Thanks for mentioning a use case. Curious, would this MathJax markup be React? |
Sorry I meant MathML, not MathJax. And React isn't really involved as far as I can tell. The background is that I have a "TeX" block for rendering mathematics, but this of course only works as a block. I'd also like to add support for rendering inline mathematics inside paragraphs, ideally in a form similar to how the URL tool currently works: a popup where the user can write some TeX markup, and then when closed this can be rendered in math form using MathML (e.g. via KaTeX). Another behaviour could be to let users write out some TeX inside a paragraph, then highlight it and click a "TeX" format button (similar to "bold") and have it convert to equivalent MathML (read-only). I tried to make this work using the format API as of last year but ran into problems because the format API seems to require that the text being formatted is wrapped in some tag(s) rather than completely replaced by something else (see #19756). In my case, I would want to replace the user's raw markup (e.g. |
I should also add a general point: if the format API is really supposed to replace shortcodes, then I think it needs some way to replace text with arbitrary HTML rather than just wrapping existing text. |
Have you tried setting |
I'll try that and report back, thanks for the hint. |
@ellatrix, I have indeed run into the issue of not being able to add child nodes tree into my wrapper tags with EDIT: I suppose I could have KaTeX render the MathML into the |
It's possible. Could you maybe create a separate issue? Not sure when I'll have the time to work on this myself. |
Fascinating. Has there been any traction on this @ellatrix? I'm using Gutenberg with a custom renderer, and makes heavy use of the format API. My renderer pares out attributes, uses them as props for react-components and uses that as information to compose the view, replacing my custom tags with react components. I'd like to, in the Gutenberg editor view, replace the text in the editor that is having the format applied to it, with a react component - and I think this would help me achieve that :) |
Hello, I'm trying to register a format type, which renders a popover to enter class names and then inserts When I try to register a new format type, e.g. for the span-tag, then I get an error, the span tag was registered for underline. I think, underline should use -tag. Is there any hook, to filter or add actions in registering and unregistering format types? Is it possible to extend an existing format type, e.g. the link, to enable custom class names, data-attributes and schema data, wich can entered in the link popover? |
Let's close this for now and create a new overview if needed. |
Just wanted to make part of my to do list for the Rich Text package public so it is out there and people can help if they'd like, add items, etc. This is a bit of a "living issue".
Formatting Library
Roadmap
save
method in the format type object.<Autocomplete>
component that can be used by formats. This can help us move mentions to the format library, but is also very useful for plugins.Low priority
wptexturize
intoRichText
. It makes the visual editor more visual, and it allows the user to undo it. It would also solve long standing bugs withwptexturize
where it is not able to handle HTML tags well. In rich text values, text and formatting are separated, so it's fairly easy to implement.RichText
instance per list item. I think this would be needed if we ever want to add movers per list item. This seems low priority though. See List Block: Try nesting with InnerBlocks #6394.RichText
, although I'm fine with keeping multiline capabilities.toTree
faster.Docs
The text was updated successfully, but these errors were encountered: