下記のコードをページ下のコードにペースト。
先頭には:
import wixData from “wix-data”
が必須です。
button3_click_1
richcontents
のところは必要に応じて変更です。
1 2 3 4 5 6 7 8 9 10 11 12 13 |
export function button3_click_1(event, $w) { //Send a blank message to the HTML element. This tells the HTML //element you want it to send you its contents $w("#html1").postMessage(" "); //Receive the message from the HTML element $w("#html1").onMessage((event) => { //Set the value for the rich text field of the dataset's //current item to be the data in the HTML element $w("#dataset1").setFieldValue("richcontents", event.data); //Submit the current item of the dataset $w("#dataset1").save(); }); } |