Open michapixel opened 4 years ago
I would like to know this too. The above suggestion doesn't work as you can't select the file for use in the editor. Also, it looks kinda naff.
We will think about this. 👍🏽
Thank you :)
Hello ! Any news for this feature? Thanks!
Was looking into this myself and it looks like sending a postMessage to the parent frame from inside the modal's iFrame is what needs to be done. Also, the suggestion by @DerekBuntin above sends the parameter 'editor' over in the url with a value of tinymce5, so maybe that could be used to identify that we want to allow file selection (like in the form field modal) via the popup prop and then use the postMessage before closing the modal?
I'm interested in building this but I'm having issues with installing it locally.
I moved the package to nova-components
and amended the composer.json
file but when I run npm run dev
I get some errors...
v-viewer in Image.vue seems to not exist and plyr.min.js in DetailPopup.vue seems to be complaining about an Unexpected token?
For my current needs I was thinking to check the url for a string query ?editor=tinymce5
.
If found, I would amend the "select file" button to run the following commands:
parent.postMessage({ mceAction: 'insert', content: filePath });
parent.postMessage({ mceAction: 'close' });
I was also going to amend the layout to remove the left column.
Not that you asked me @7ammer, but query string would probably work just as well as what I suggested. I was trying to keep it as close to the Tinymce package spec as possible, but that's not going to be needed in all cases. Thanks for taking a crack at this, I'm interested to see what you come up with if you're willing to share.
@temp1029 I'm happy to create a pull request but unfortunately I can't get going because I can't compile the project (npm run watch). I'm compiling with node v14.17.0
.
any news about this?
I've added this to the following Tinymce package with the following config:
It pops up with the full admin interface and allows you to select the URL, which is all we need.
What would be ideal is a more integrated interface for item selection so when the image or object is clicked it adds the URL to the respective input and closes the window.