-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Comments
Will this work with generic shortcodes as well, or just oEmbed? If the former, are you building a generic form editor for shortcodes? |
@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. |
@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. |
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. |
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 |
Well, true. :) I was thinking of the broader goal that Gutenberg will help with:
|
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.
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.
The text was updated successfully, but these errors were encountered: