Dear All,
I have a page with
- a dataset ‘DatasetItems’
- a repeater connected to the ‘DatasetItems’
- a Lightbox ‘Customer’
I typed the following code to transfer to the lightbox the items from the collection. For the FirstName and LastName is OK because the collection fields are Text Format but I have an issue with the Comment text who is a RichText format.
//PAGE CODE
import wixWindow from ‘wix-window’;
export function Container_click(event) {
let currentItemFirstName = $w(‘#DatasetItems’).getCurrentItem();
let currentItemLastName = $w(‘#DatasetItems’).getCurrentItem();
let currentItemComment = $w(‘#DatasetItems’).getCurrentItem();
wixWindow.openLightbox(“Customer”, {
“pageSend1”: (currentItemFirstName.firstName),
“pageSend2”: (currentItemLastName.lastName),
“pageSend3”: (currentItemComment.comment) THIS IS A RICH TEXT
})
}
// LIGHTBOX CODE
import wixWindow from ‘wix-window’;
$w.onReady( function () {
let received = wixWindow.lightbox.getContext();
$w(‘#FirstName’).text = received.pageSend1;
$w(‘#LastName’).text = received.pageSend2;
$w(‘#Comment’).text = received.pageSend3; THIS IS A RICH TEXT
} );
What to do to avoid to have in my lightbox text item →
Comment
Thank you for your help
Best regards,
Domivax