简体   繁体   English

magento2中的媒体存储浏览器字段

[英]Media storage browser field in magento2

I'm currently trying to create (or find how to) a field to display the Media browser (or media storage manager) in admin Edit on a custom module. 我当前正在尝试在自定义模块上的admin编辑中创建(或找到方法)以显示媒体浏览器(或媒体存储管理器)的字段。

Type file / image work fine, but it could be much more efficient if this button open the panel like in the wysiwyg. 键入文件/图像工作正常,但是如果像在所见即所得中那样打开面板,则可能会更有效。 I see the javascript call in the wysiwyg 我在所见即所得中看到了javascript调用

javascript:openBrowser('filebrowser','src', 'media','media_media_browser_callback');

but i didn't find a way to call that out of this field. 但是我没有找到一种方法可以从这个领域中调用它。

So, since i needed it, i made it : https://github.com/Losams/Magento-2-Media-storage-field/ 所以,因为我需要它,所以我做到了: https : //github.com/Losams/Magento-2-Media-storage-field/

A new magento2 element form field to display what i want only. 一个新的magento2元素表单字段来显示我只想要的内容。 It's a first thing, not really beautiful but it work. 这是第一件事,虽然不是很漂亮,但是可以工作。 Feel free to use it. 随意使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM