Hi Sebastian,
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?
i.e.
- 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?
Thanks,
Wesley.
Hi,
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.
-
new Date().getTime()
?
- 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.
- Can be solved with pure javascript
- Can also be solved with pure javascript.
1 Like
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
So you can just use css or javascript or whatever you want.
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.