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

Editor: add "insert items" menu item #5070

Closed
dmsnell opened this issue Apr 28, 2016 · 7 comments
Closed

Editor: add "insert items" menu item #5070

dmsnell opened this issue Apr 28, 2016 · 7 comments
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Type] Task

Comments

@dmsnell
Copy link
Member

dmsnell commented Apr 28, 2016

Adds an "insert item" menu bar to the editor toolbar to allow inserting various types of media or embeds into a post, similar to how the insert menus in mainstream applications work.

artboard1

The button in the menu should default to opening the media dialog, but a click on the down arrow should open up the dropdown with all of the other embeddable options.

@dmsnell dmsnell added [Feature] Plans & Upgrades All of the plans on WordPress.com and flow for upgrading plans. [Status] In Progress labels Apr 28, 2016
@fabianapsimoes fabianapsimoes added [Feature] Post/Page Editor The editor for editing posts and pages. and removed [Feature] Plans & Upgrades All of the plans on WordPress.com and flow for upgrading plans. labels Apr 28, 2016
@mtias mtias changed the title Add "insert items" menu item to editor Editor: add "insert items" menu item Apr 28, 2016
@davewhitley davewhitley added this to the Editor Widgets/Embeds milestone May 16, 2016
@danielbachhuber
Copy link
Contributor

Will this work with generic shortcodes as well, or just oEmbed? If the former, are you building a generic form editor for shortcodes?

@dmsnell
Copy link
Member Author

dmsnell commented May 26, 2016

@danielbachhuber my initial goal was to build it for all shortcodes, but that is starting to look a bit more difficult technically to do, so my next path might be to try building a new view plugin for each additional integration. the view plugins can be made fairly simply and you can see some in the TinyMCE plugins directory, such as the contact form plugin.

@danielbachhuber
Copy link
Contributor

@dmsnell Cool.

Just so it's mentioned, for shortcode integration, you might want to check out some of the prior art with Shortcake: https://github.com/wp-shortcake/shortcake

I do like your design decision to put the "Insert" UX into the TinyMCE toolbar. Shortcake is too closely coupled to the Media Library at the moment, and I now like your TinyMCE toolbar approach over our proposed approach of creating a dedicated button for it: wp-shortcake/shortcake#281 One potential problem with the TinyMCE toolbar approach is how to accommodate more than, say, 6 options.

@dmsnell
Copy link
Member Author

dmsnell commented May 27, 2016

Thanks for the link to shortcake, @danielbachhuber.

My vision wasn't to add every shortcode to the editor, but rather allow the editor to render shortcodes and provide some dialog to edit them. Then, certain shortcodes could be lifted into the insert menu which are deemed more useful to be there.

Not all of the UX for this vision is figured out. For example, it's easy enough to write in a shortcode, but once it's in there and rendered in its box, you have to click edit in order to modify it, instead of simply editing the attributes like normal text.

On the other hand, it looks pretty cool when you can see the rendered content while you edit.

@rachelmcr
Copy link
Member

I'm going to close this issue, since the eventual switch to Gutenberg will provide more visibility and editing options for shortcodes/embeds.

#pre-gutenburg-bug-purge

@folletto
Copy link
Contributor

folletto commented Jan 23, 2018

Plus, it's already done in Calypso. ;)

screen shot 2018-01-23 at 18 04 23

@rachelmcr
Copy link
Member

Well, true. :) I was thinking of the broader goal that Gutenberg will help with:

my initial goal was to build it for all shortcodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Type] Task
Projects
None yet
Development

No branches or pull requests

7 participants