[ WIXcode ] Good way input data to collection. and more..

  1. I send any text & IMGs from form page to collection(database) then I can add to data to row1 in collection.
    but, next time. I take same action then over write when input.
    Why?
    (and I hope choice Overwrite or add new data when input)
  2. I am setting “richtext” options in row on collection. but I can not set “richtext” in form options.(text only), Why?

ad 1) Are you sure you are not constantly selecting the same row, like when you Update instead of add?
ad 2) Rich text is a data type here, a blob, it can hold a lot more than just a text field (e.g. it could hold a whole Word document with all it´s settings, I believe)

Giri Zano
Hi ! Thank you for your advice.

sorry I failed preview my comment.
fail >>I am setting “richtext” options in “row” on collection.
collect>>I am setting “richtext” options in “column” on collection.

At first I show ad2) detail.

  1. I m setting “richtext”(column “what”) in my collection.( photo1)
  2. I m setting on textbox (photo2)
  3. I can’t setting “richtext” in textbox option…(photo3)

How to set richtext box in form page ?
I want edit richtext input text box.(font size, font color,etc,)

Sorry , My english is rough.if you can’t understand this explanation.
then please request me.

Thanks!

(photo 1) I m setting “richtext” in “what” column.

photo2(I chose input text box in page edit )

photo 3( richtext is gray out,I can’t chose it,)

Hello again,
I believe I understand want you want to do: present the user with a word processor-like interface. As far as I know, that is not available.
You could try to code it yourself (I 'borrowed` it a long time ago from Yahoo Mail interface), but it will be ugly: the html you have to paste back into the Wix text box will be HTML (

, etc) and users will be confused.

The data type RTF is, as far as I can see, only useful in the future, when Wix adds document upload possibility (now it is Images only). I read here that they are working on that.

This is as far as I can help you, maybe somebody else can contribute more.

Hi Watanabe,
You can achieve this with an HTML component which embeds a rich text editor like CK editor.
You can communicate with the HTML component and sync values using its API:

See this example on embedding a custom chart which uses this ability:

We will post an article in the future about this specific use case.

Here are the articles Tomer was writing about:

Working with the HTML Component in Developer Tools
How to Create a Rich Text Editor using the HTML Component

We’d appreciate any feedback you have on these articles.

Sam, what an excelent article, especially the Rich Text Editor. Way back, I did something likewise and the problem was that, exactly like in the example, the user would see two text windows: the text box with the raw code and the CKWindows. I don´t have time to try this example (still fighting with the HTML-component and the Tripadvisor script), but would one be able to set the textbox to HiddenOnload and never show it, put the HTML-component in (over) its position on the form (so user would ONLY see the rich text editor), without breaking the code?

Yes, you could do that. The issue is with getting the text from the editor into the Wix text element. In our example we use a button. In your case, that button wouldn’t fit in. You’d have to work out some way in the HTML Component to tell when the user left the rich text editor and then move the html into the Wix text element.

When I tried your example code from Velo: Working with the HTML iframe Element | Help Center | Wix.com it did not work. I had to make the following adjustments:
1: the browser´s console displayed an error that export function should be declared at top level. When I put the export function above the $w.onReady, it was gone
2; the onClick was never fired. My button looks standard for the _click event. This was solved by changing the properties
3: the function messageSendButton_onClick() never sent anything to the html window until I changed it into function messageSendButton_onClick(event)
Hope this helps.