You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems easier to use Blocks outside the editor context
I have a personal preference over having the state as an Object, external manipulation of the state (actions not built-in in TinyMCE) seem easier to achieve.
Cons:
Multi-block selection seems impossible to achieve. Ctrl+A is per block.
Based on this experimental prototype #113 I tried to work on a mixed approach where we use TinyMCE as a wrapper but rerender its content based on state changes. After some exploration, this approach feels like trying to recreate DraftJS or ProseMirror. And I don't think it's the right way to use TinyMCE.
I think Prototype 2 is the way to go, although it might be more of a pain because it will involve a lot more TinyMCE work, ultimately it would probably be the best approach forward for now.
Harder to reuse the blocks outside the editor?
I think that would not be a con for Prototype 2, as long as the API for defining Block Types and Control types provides enough data for something other than TinyMCE to use. I think we should develop an Block Type/Control Type defining API that will be used to feed a highly Custom TinyMCE instance. Data from the Block Type/Control Type could also be used to feed something else potentially in the future.
As much as it is probably not palatable, Prototype 2 mirrors the most of how WordPress already works and TinyMCE does a lot, which to me makes it a very sensible path forward.
Activity
youknowriad commentedon Feb 23, 2017
Here are my feelings about these two prototypes:
Prototype 1:
Pros:
Cons:
Prototype 2:
Pros:
Cons
Based on this experimental prototype #113 I tried to work on a mixed approach where we use TinyMCE as a wrapper but rerender its content based on state changes. After some exploration, this approach feels like trying to recreate DraftJS or ProseMirror. And I don't think it's the right way to use TinyMCE.
jasmussen commentedon Feb 23, 2017
Thanks for creating this ticket.
As we compare we should also think of #3, as that seems dependant on which approach we choose.
BE-Webdesign commentedon Mar 21, 2017
I think Prototype 2 is the way to go, although it might be more of a pain because it will involve a lot more TinyMCE work, ultimately it would probably be the best approach forward for now.
I think that would not be a con for Prototype 2, as long as the API for defining Block Types and Control types provides enough data for something other than TinyMCE to use. I think we should develop an Block Type/Control Type defining API that will be used to feed a highly Custom TinyMCE instance. Data from the Block Type/Control Type could also be used to feed something else potentially in the future.
As much as it is probably not palatable, Prototype 2 mirrors the most of how WordPress already works and TinyMCE does a lot, which to me makes it a very sensible path forward.
Merge pull request #122 from wordpress-mobile/feature/test-focused-block
refactor: Switch from AVA to Jest for tests. (#122)
Add new package `@wordpress/stylelint config` (#22777)