Saving Contenteditable with Coldfusion - coldfusion

I want to be able to add a contenteditable area for a client to update text.
Anyone know the best way to save the changed content to sql db with Coldfusion ?

Related

How to store large fetched dataset from postgres in Django view?

When user open some Django view there is option to choose what data to load from postgres DB. After that click submit and process is started. But when data is fetched and in the same view pressed reload, then all process starts from begining. Fetched time is about ~10min (best solution to fetched once by opening view and after that just manupulate with data without fetced each reloading)
I want to load data once or by button. But how to implement that i don't understand.
The easier approach is to do this with two pages:
First page: User can choose to load the data
Second page: Loads the data and shows it
If you want to do this on the same page you normally put a div on your page where the data should be loaded and then you need to use Javascript / AJAX to load and update your current page (or a part of it) based on user input like a clicked button.
There are multiple ways to implement this. Here are some examples:
HTMX - Click to load
JQuery - load div on button click
Pure Javascript
I would recommend HTMX, because it allows you to do this without having to write any JavaScript and it works great together with Django templates.

UI field for text and picture editing

I have a CreateView with title, content and image fields.
I would like to allow users to put the picture where they please within the contend field. I would like to add to my site a field like this :
I don't need something so detailed but for the moment the picture position is where I have put the img html tag. And I want it to be chosen by the user as he is writing a post.
If someone could help me please to figure out how to achieve this with bootstrap and django. thx
So I need to integrate a custom rich text editor and this is how you do it

I am unable to migrate data into the Sitecore/Content Field items through GatherContent module

I am unable to fill data into the Sitecore/Content Field items through GatherContent module in Sitecore for content gathering mapping to Sitecore items.
I am unable to migrate the Home data items from Gathercontent to the sitecore/Content/Home data items.
I mean to field to field level data mapping or sharing.
Kindly prefer the below images.
I want to migrtate GC(Gathercontent)home item title and text data into
Sitecore fields Home items title and text.
Thanks in Advance.
I got the solutions.
In content migration from Gather content to sitecore items , doesn't
directly map with the already created Sitecore items,it create new
items to the Sitecore with new GC Content Id:,GCPath
[shared]:,MappingId: and Last syn date.
kindly prefer the below image
just update this all same data with the already created sitecore items field.
suppose want to add in the home item field ..
Now click the Update from Sitecore ribbon gathercontent update button to update the content and select the appropriate project and template.
next
Now confirm the locations items and click update , this update already created all Sitecore items.
comment below if you find best solutions, for this.

DJango-tables2 how do I refresh/update the table on the webpage without hitting refresh button

I followed the DJango-tables2 official tutorial and was able to create data set in the terminal using:
Person.objects.bulk_create([Person(name='Jieter'), Person(name='Bradley')])
However, the new data in the table on the website doesn't show up until I hit the refresh button. My question is how the table can be updated/refreshed without any human interaction on the webpage.
What I'm trying to achieve is to update the table on the webpage without human interaction as soon as new data comes in. I'm relatively new to this, any suggestions would be greatly appreciated.
Thank you.
To avoid refreshing the page you would need to get new data using an Ajax request, this table use template rendering meaning it is not meant to work like you want to use it.
Usually, to do what you want to do, you need a front end JavaScript component like Datatables.net, FancyGrid ... and make requests to server using Ajax to get new data.

Autocomplete field in Web Forms for Marketers and custom Field validator

I am using WFFM in Sitecore 7.1 , one of the requirement to have a field named Countries and want to use it as autocomplete field.
I have already loaded all the Countries in Sitecore as Sitecore Object.
I was following the Custom Credit card field , but it didn't help much.
I created custom autocomplete Field in WFFM and now i want to create custom validation for this field .
Any help..
Thanks
To keep it simple you might want to consider a custom control like credit card and use client side JS to call your countries via sitecore web API and then do all the auto complete stuff in the js leaving all logic there.
If server side code is a preference then u can write a web service to return you the JSON objects of matching countries making your JS more simpler.
Hope this can help with some ideas.