I have created/integrated a Cloudinary Media Widget to allow browsing media assets from this DAM system. I am able to retrieve image responses (JSON) from the DAM indicating a single image (or multiple images).
Accessing the DAM via the widget requires a handshake of user credentials/api key. etc. I have hardcoded a this for my initial tests, however, I would user email address of the current Squidex user.
Is there any method to retrieve the current logged-in Squidex user account (name, email address) in a custom editor? Is this part of the API?
What I would like to know if there is a way to have have a custom editor perform some Squidex operations
before displaying inline with the form. I.e. server-side processing accessing Squidex APIs?
- retrieve user account details - email (important)
- generate UNIX timestamp of the current time
- construct a signature string of Cloudinary details (api key/secret, email, unixtimesamp etc).
- generate a sha256 hash string of above params
- make this value available to the clientside / jquery logic?
Would we need to build the Squidex binaries from source to accomplish this?
It is not part of the API yet, but can be added. As usual: PRs are welcome
- It is not part of the API yet, but of course it can be added.
- If you are okay with storing it in the jscript then it works already, but we could also use the ui settings system to forward everything that is stored there.
Thanks - Sorry for the tardy response, but I will test this out. I am eager to see this in action.
By the way, if I want to control the dimensions (namely, the height) of the custom editor field. How do I force the field to be long/taller than the default from the Iframe’s HTML document?
Hi, the height is controlled by the editor itself. You can see here in the SDK that the iframe notifies the parent about the actual height every 500ms: https://github.com/Squidex/squidex/blob/master/src/Squidex/wwwroot/scripts/editor-sdk.js#L72
Thanks Sebastian. I will pass this detail onto a resource digging into some custom editor development work.
There is an idea to develop our custom widget in Angular 7. I suspect we can host it on another web server instance.
A far-reaching question would be to create an angular-based custom/editor but have it piggyback/server from the same server where Squidex is deployed.