Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock block #430

Open
chen665 opened this issue Oct 21, 2024 · 1 comment
Open

Lock block #430

chen665 opened this issue Oct 21, 2024 · 1 comment

Comments

@chen665
Copy link

chen665 commented Oct 21, 2024

Using 'react-email-editor,' I have created a custom row that is added to every email created in the editor. This row should be locked so the user cannot delete or edit it but can drag it to change its placement.

Here is the JSON of my custom row:

{
            id: 'footer',
            cells: [1],
            columns: [
              {
                id: 'Ret06MioaO',
                contents: [
                  {
                    id: '_3Kpneo8mv',
                    type: 'text',
                    values: {
                      containerPadding: '10px',
                      anchor: '',
                      fontSize: '14px',
                      ...
                      hideDesktop: false,
                      displayCondition: null,
                      _styleGuide: null,
                      _meta: {
                        htmlID: 'u_content_text_3',
                        htmlClassNames: 'u_content_text',
                      },
                      selectable: false,
                      draggable: false,
                      duplicatable: false,
                      deletable: false,
                      hideable: false,
                      text: '<div id="footer_content">${companyInfoHTML}\n${unsubscribeHTML}</div><div id="footer_content_end" style="display:none;"></div>',
                      _languages: {},
                    },
                  },
                ],
                values: {
                  _meta: {
                    htmlID: 'u_column_3',
                    htmlClassNames: 'u_column',
                  },
                  backgroundColor: '#ffffff',
                },
              },
            ],
            custom: false,
            values: {
              custom: false,
              displayCondition: null,
              columns: false,
              _styleGuide: null,
              backgroundColor: '',
              columnsBackgroundColor: '',
              ...
              selectable: true,
              draggable: true,
              duplicatable: false,
              deletable: false,
              hideable: false,
        },
 }

As a result, I have a row that cannot be deleted, and the column inside it also cannot be deleted.
Unfortunately, selecting the row allows the user to change the row's division into multiple columns and then delete the original column, which should not be delectable.

How can I prevent changing the row division or at least prevent the original column from being deleted?

Screen.Recording.2024-10-21.at.17.13.02.mov
@adeelraza
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants