Skip to content

fix: updates default node option for reference #81

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

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Conversation

nadeem-cs
Copy link
Contributor

No description provided.

@nadeem-cs nadeem-cs requested a review from a team as a code owner July 10, 2024 08:53
Comment on lines +108 to +114
const src = node.attrs['asset-link'];
const alt = node.attrs?.['redactor-attributes']?.['alt'];
const link = node.attrs.link;
const target = node.attrs.target || "";
const caption = node.attrs?.['redactor-attributes']?.['asset-caption'] || node.attrs?.['asset-caption'] || "";
const style = node.attrs.style;
const asset_uid= node.attrs['asset-uid'];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nadeem-cs [Minor] we can use destructuring to accessing the properties of node.attrs. like below
const {
'asset-link': src,
'redactor-attributes': { alt, 'asset-caption': redactorCaption } = {},
link,
target = "",
'asset-caption': assetCaption = "",
style,
'asset-uid': assetUid
} = node.attrs;

const caption = redactorCaption || assetCaption;

@nadeem-cs nadeem-cs merged commit 649b0b7 into next Jul 25, 2024
8 checks passed
@cs-raj cs-raj deleted the fix/DX-887 branch August 16, 2024 08:24
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

Successfully merging this pull request may close these issues.

2 participants