Primitive inputs seem to not allow long articles, so this is all an attempt to create a workaround.
I have successfully created a list of paragraphs bound to a primitive input repeated by a pageVariable list of objects, so that when a user writes a paragraph and clicks insert new paragraph check mark, each paragraph is added to the list and displays appropriately.
But now what I need to do is make it work with another feature where I want users to be able to insert their previously created docs in our legacy website into the post or the book chapter.
I use rest api to get collection of their docs, then on click I get the doc content, which is a long string of text, and split it into separate paragraphs as a list of texts, docParagraphList:
But I am having trouble trying to use INSERT_ITEMS_AT formula to try to add the items in the docParagraphList as the values of the items in the list of objects page variable paragraphList in order to display the list of paragraphs in the repeated inputs the same as the first video. It say it cannot work with lists???
I tried achieving this same concept with a list of texts instead of a list of objects but it would not let me repeat the inputs with a list of texts.
Once I get this down, I want to take it further by allowing users to change the item type of each item, so that each section can be either a paragraph, a heading, a link, an image, a video, etc, etc… Like a true editor.
I would appreciate the communities help with this and will ofcourse share so that developers have a better type of editor for long articles.
Thank you.
EDIT: I have figured it out thanks to this person!
Though it shows red in formula editor, it works to convert the list of texts to the list of objects:
Now I need to figure out a formula to set the height of the inputs appropriate based on the length of each paragraph, as it does not seem to grow on web with just fit content setting.
But the good thing about this is user can click on any paragraph and edit it without having to deal with the dificulty of scrolling though the input, which seems very buggy yet. Now we just have to allow user to remove any paragraph and change the size of any paragraph or even from paragraph to other block type using more complex array.