[IMPLEMENTED] Custom Editor (Schema, Schema Fields)

Hi Sebastian,

I need a custom editor on the content side. I need to put a dropdown object and display schemas inside it. Then I want to show the fields of the selected schema in another dropdown object.

Schema Selected

I need both the id of the schema and the name of the selected field in the background.
Its data model can be json or a string separated by a special expression.

Can you help me for this?

Thank you.

You mean a sidebar plugin? You cannot edit content values there right now.

What do you mean with the “selected field”?

No,

i want to talk about Custom Editor (Editor Url)

Unfortunately, the selected field name and the schema id are not available right now. I can change that.

I need the id of the selected schema in the schema list and the list of fields and the name of the selected field. I need to design a custom editor(Editor Url) for this. I would be very happy if you could make these possible.

Sure, I will have a look.

Hi Sebastian,

How can I integrate this?

The schema is available in the context of the editor. YOu can call field.getContext().

There is also a sample editor just to view the context: https://github.com/Squidex/squidex/tree/master/backend/src/Squidex/wwwroot/scripts

I have just seen that the production build of the master has an issue with angular. Going to fix that today.

1 Like

Hi,

did you finish all your fixes? Or would you suggest I wait?
Also, I still don’t understand how to use it.
can you explain a little more?

Thank you

The editor can subscribe to an init callback that is invoked once. This callback has an argument called “context”, which contains all information like user-credentials, app name and so on and also the schema with the fields now.

You can use the following editor as an example to have a look to the context: https://github.com/Squidex/squidex/blob/master/backend/src/Squidex/wwwroot/scripts/editor-context.html

It is also described here: https://docs.squidex.io/02-documentation/developer-guides/editors#context

This topic was automatically closed after 2 days. New replies are no longer allowed.