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
Old style for classic block #4948
Fixes #4926. Gives the classic block the old look.
One problem: the toolbar will only start showing on first time focus. :( @spocke, would it be possible at all to add a setting to the modern/inline theme to always show the toolbar? It might also be good to make a separate "theme" for this as we're not using quite a bit of logic in it.
How Has This Been Tested?
Create a classic block.
I don't really see a way of fixing the focus problem without having to copy over a significant amount of code to the classic block to overwrite the theme. It would be nicer if the inline theme just had a setting to show toolbars all the time instead of just when the editor is focussed.
Sorry I missed this. This is looking really good.
Here's the toolbar issue in GIF form:
It would be nice if we could address this, but it doesn't feel like the end of the world to me. Unless we can do some simple hack like run an onload focus for each classic block (hacky), I think it might be worth getting this in and iterating.
Rebased, hopefully the error is gone.
Also added the focus and attempted to reset focus to the previous element, but for some reason it still has the caret in the last classic block... TBH I can live with this so the UI shows up while we wait for a setting in TinyMCE.
What we could do is to add a new way of initializing the editor. Currently there is inline and iframe mode what's needed here is some form of inplace editing where a div is converted to contenteditable and the ui is appended before that target element. Not exactly sure how that should be exposed though the api though. But this is something we have seen people asking for before being able to convert div elements to editors but have the ui in place and not hide on blur.
referenced this pull request
Mar 30, 2018
Nice work Ella, here's a GIF:
I pushed a little polish so it looks like this:
That included removing the hover label. This label is likely to go through some iteration regardless, and perhaps become a drag handle, but once we do that it migh sit to the left instead of the top.
With this latest polish, if you approve the code, I think this is good to go! Stellar work, excited to get this in!