A xblock form to set configuration?

Hi all, I am still new to xblock. There is a xblock video demo which shows that the user press the edit button, a form pops up and allows the user to configure the URL and stuff. Upon seeing the code, there is too much information for me to modify to the desired outcome. Default xblock examples didn’t cover this part as well. Hence I am asking is there a simpler example/code for me to allow user to enter the form upon entering the details show what he/she has entered?

Hi @Programmingisfun93,

For basic configuration functionality, you can use StudioEditableXBlockMixin which will auto-generate a working configuration form for you.

You can see examples of its use in the LTI XBlock as well as problem builder. (Basically, you need to declare a list of editable_field_names and you can optionally set options for advanced customization of specific fields - like this which sets the list of values for a select element. Options include resettable_editor=False, multiline_editor="html", multiline_editor="text", list_style="set", list_values_provider, values_provider, and values.)

If that doesn’t cover your use cases, you’ll need to create your own editor form, and you can copy the example of almost any XBlock that doesn’t use StudioEditableXBlockMixin.

Thank you, I have tried the xblock that doesn’t use StudioEditableXBlockMixin referencing pdfXBlock. Right now facing another problem where do I change the header , for example, where is the “Editing Video” from the video,