I would like to make my show page content editable by double clicking on the content and after I update that content, then that updated content would also be save in the database. I am working on Ruby on Rails. Any suggestions, how can make my content editable.
Ruby On Rails-Make content on show page content-editable
390 Views Asked by Arslan Ahmad At
1
There are 1 best solutions below
Related Questions in RUBY-ON-RAILS
- Rails HABTM: Select everything a that a record 'has'
- Best way to make an HABTM association via console
- dynamically create an ical / ics file from a rails model
- Ruby destroy is not working? Or objects still present?
- NoMethodError: undefined method `update_average_rating' for nil:NilClass
- Select results where joined table contains records with an attribute, but without another
- Showing posts only created when boolean was true
- Ruby on rails and HAML - Print a hash with background color
- How can I monitor an endpoint's status with Ruby?
- How to create dynamic pages without form_for helper in Rails?
- Rails 4.2 jQuery loads only after refresh
- "Access Denied" - User's Permissions to S3 Bucket
- ActiveRecord, Rails 4: has_many :through with scoped conditions failure
- Rails - formatting a list of options
- Rails - Ajax do not work properly on production server
Related Questions in CONTENTEDITABLE
- Skipping an element in CKEditor
- javasscript allow writing rtl and ltr in sentence
- How to resize or edit the buttons in html, using contenteditable attributes?
- Insert div in contenteditable
- Line height doesn't affect first line in contenteditable
- CKEditor is omitting spaces in IE and FF
- contenteditable shows markup at the result
- Get alt attribute of images inside a Contenteditable div and replace the image
- Sortable table rows using one column
- Adding bdi tag to contenteditable
- How can you drop an image from your desktop into an editor and move it around?
- HTML5 contenteditable new line jumps twice
- medium-editor and pasteHTML keeps cursor within pasted html
- HTML5 contenteditable - child block element with contenteditable=false prevents getting focus on parent
- Get Value Of Text/HTML Slection BEFORE KeyDown Event In Javascript
Related Questions in RAILS7
- rails7 RAILS_ENV=production rails assets:precompile error Command "build" not found
- Have current rails 5 heroku app - how do I start a new version on rails 7 without screwing up my current deployment?
- How to run a single-file javascript soundboard app from Rails 7
- Rails 7 turbo-stream broadcast to specific channel not working
- How do I generate a form using a model with single table inheritance?
- using ApexChart for rails7 raising error Uncaught ReferenceError: ApexCharts is not defined
- RoR Rails 7 using Turbo to Update a partial on button click
- Ruby on Rails 7 Action Cable
- Using chart.js with importmaps in rail 7
- How can I disable ActiveSupport::Notifications on Rails 7?
- Why is Users index page empty (no users loaded) in production? Works locally. Rails 7 + Railway.app
- Unpermitted parameter: :phone_number. Context: { controller: OrdersController, action: create, request: #<ActionDispatch::Request:0x00007f54ac186660>
- undefined method `type' for #<Order id: nil, paper_size: "A4", color: "Black & White", quantity
- More than 2 dynamic layout options per controller in Rails
- ActiveStorage: TypeError Exception: no implicit conversion of String into Hash
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Rails 7 has Hotwire
This can also be accomplished with AJAX and UJS
Basically, when a user clicks on an area you want to be content-editable, you would replace that static section of the DOM with a form and a field. Then either clicking a submit button or clicking away would trigger a remote PATCH or PUT call to update the database and you'd again replace that section of the DOM with a static section containing the newly edited data.
There are quite a few good tutorials out there on this subject.
And even some gems for you to use: https://www.ruby-toolbox.com/categories/rails_in_place_editing