Skip to content
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

Multiple editor instances and the editor UI #568

Closed
afercia opened this issue Apr 28, 2017 · 7 comments
Closed

Multiple editor instances and the editor UI #568

afercia opened this issue Apr 28, 2017 · 7 comments

Comments

@afercia
Copy link
Contributor

afercia commented Apr 28, 2017

Some plugins (disclaimer: not the ones from the company I work for) instantiate multiple TinyMCE instances in the editor screen. I'm pretty sure this can be done also with the new editor. However, how this would work from a UI perspective? For example, the fixed toolbar: seems it has been designed with just one editor instance in mind.

Has this ever been discussed, or are there any plans?

@afercia
Copy link
Contributor Author

afercia commented Apr 28, 2017

More specifically, the toolbar contains controls that are instance-specific like: the mode switcher, undo/redo, and the block inserter:

screen shot 2017-04-28 at 23 33 34

@nylen
Copy link
Member

nylen commented Apr 28, 2017

I'm pretty sure this can be done also with the new editor.

There are likely technical concerns here as well: wp.blocks.registerBlock is global, our Redux store is global, and there are probably more things.

For the UI I'd imagine that we'll have a global mode which sets the toolbar to fixed - but the toolbar design is pretty uncluttered and could easily fit into a modal or into a smaller area of the page.

@jasmussen
Copy link
Contributor

Philosophically, the idea of blocks as a whole were designed to embrace such practices, but with a better UI. I can definitely see a plugin providing blocks instead of multiple editors. Whether you provide a template that always includes a hero image placeholder block, and a Markdown editor below, that's definitely an option I'd encourage.

That being said there's probably going to be a period where some plugins rely on old editor behavior that we probably won't port, and so it could be good to think about how to handle that.

@afercia
Copy link
Contributor Author

afercia commented May 1, 2017

From what I've see around, the most common scenario when plugins add more TinyMCE instances is not to add something to the post_content but to make some custom field editable with the editor.

@jasmussen
Copy link
Contributor

Right, and we definitely still want to think of a way that can work. Though — and the more technical in the crowd here please correct me if I'm wrong — I would consider that to be the old way to do things, and that we would want to encourage those plugins to move towards blocks, saved in post_content instead.

@jasmussen
Copy link
Contributor

Revisiting this, one of the things the new editor is doing, is being written in JavaScript, and being block focused.

By block focused the idea would be to surface new tools and APIs and improved user experiences by offering such plugins an opportunity to create blocks instead.

However for plugins that add metaboxes to the editor which aren't written in JavaScript, we can add an area below the editor itself, to show "legacy" plugins:

post settings

At some point I'll track this separately in a new issue with mockups. That way we should also be able to close/address #352.

@jasmussen
Copy link
Contributor

Closing this in favor of #952

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants