Hello i am using this custom property pane control called PropertyFieldCodeEditor. what i want is to display the actual webpart code as the initial value of the code editor, then after i click save, the changes will be reflected on the webpart..

 PropertyFieldCodeEditor('htmlCode', {
        label: 'Edit Code',
        panelTitle: 'Edit Code',
        initialValue: "",
        onPropertyChange: this.onPropertyPaneFieldChanged,
        properties: this.properties,
        disabled: false,
        key: 'codeEditorFieldId',
        language: PropertyFieldCodeEditorLanguages.HTML

i tried to put this.domElement on initialvalue but it only accept string, also i cand find a way to convert this.domelement to string..

also what should i put inside

protected onPropertyPaneFieldChanged(path: string, newValue: string) {


best regards

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.