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

Any hints/ideas on how to use this with a WYSIWYG editor #129

Open
michapixel opened this issue Mar 27, 2020 · 11 comments
Open

Any hints/ideas on how to use this with a WYSIWYG editor #129

michapixel opened this issue Mar 27, 2020 · 11 comments
Labels
enhancement New feature or request

Comments

@michapixel
Copy link

No description provided.

@DerekBuntin
Copy link

I've added this to the following Tinymce package with the following config:

'use_lfm' => true,
'lfm_url' => 'nova/nova-filemanager'

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.

Screen Shot 2020-06-02 at 12 50 41 pm

@7ammer
Copy link

7ammer commented Jul 7, 2020

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.

@Krato Krato added the enhancement New feature or request label Oct 15, 2020
@Krato
Copy link
Collaborator

Krato commented Oct 15, 2020

We will think about this. 👍🏽

@7ammer
Copy link

7ammer commented Nov 27, 2020

Thank you :)

@Jimmylet
Copy link

Hello ! Any news for this feature? Thanks!

@temp1029
Copy link

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?

@7ammer
Copy link

7ammer commented Oct 4, 2021

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?

@7ammer
Copy link

7ammer commented Oct 4, 2021

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.

@temp1029
Copy link

temp1029 commented Oct 4, 2021

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.

@7ammer
Copy link

7ammer commented Oct 4, 2021

@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.

@devsquadcore
Copy link

any news about this?

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

No branches or pull requests

7 participants