-
Notifications
You must be signed in to change notification settings - Fork 2
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
Apply Settings to export #51
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non blocking comments. looks good overall 🚀🚀🚀
let's run prettier here npm run prettier:write
const validStyles = {}; | ||
|
||
const cssValidationRegex = { | ||
padding: "^(\\d+(px|em|%|rem) ?){1,4}$", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might make sense to put these valid, modifiable css properties in a doc somewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, can add something to the UI customization page
export/index.template.html
Outdated
); | ||
} | ||
|
||
// Validate, sanitize, and apply the styles to the "key-div" textarea. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key-div
element is just a simple div, which later gets its innerText
set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed this
@@ -709,6 +836,11 @@ <h2>Message log</h2> | |||
document.addEventListener( | |||
"DOMContentLoaded", | |||
async () => { | |||
// If styles are saved in local storage, sanitize and apply them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may have already done this, and nothing indicates the contrary, but would be nice to do a sanity check to make sure these loaded settings can be overridden if the user calls applySettings
again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this works as exepected!
Add support for adding css to the export iframe