Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
RichText: absorb internal list controls #10744
This change aims to absorb any RichText related logic from the list block into the RichText component. With this, none of our core blocks will use the
Also fixes a bug where the the active button is not set for nested lists.
After #10799, the list buttons may be rewritten to manipulate the internal rich text value directly, removing the dependency on the TinyMCE lists plugin.
How has this been tested?
The list block should continue to work as before.
Types of changes
Oct 18, 2018
It's not immediately obvious to me what's going on with the list indentation. The callbacks for the key handlers are not being called. Doing anything after the new item (even moving mouse, leaving screen and returning, pressing Escape) is enough to cause the keybind to work again, which itself is concerning as these don't seem like they should be causing any change in state to the RichText element.
We also still didn't quite port the existing binds as they were before, because Cmd+M / Cmd+Shift+M were only bound previously if the keyboard didn't support the
Given this is more a refactoring, and while I'd like to see the unstable functions gone sooner than later, I'm inclined to punt this to 4.4.
Nov 14, 2018
It's a bit strange to me that we're only binding based on some random language detection. The  shortcuts won't do anything if you don't have the keys on your keyboard so it doesn't hurt to bind them. I don't think we can accurately detect if a keyboard has these keys
I also think we should bind Cmd+M / Cmd+Shift+M for everyone. Why would we only make them work in certain cases?