Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8825147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:48:35+00:00 2026-06-14T06:48:35+00:00

I’ve just found out about the contenteditable attribute and I was thinking about practical

  • 0

I’ve just found out about the contenteditable attribute and I was thinking about practical uses for it.

I think it would be awesome for quick updates to a page, but there are some concerns such as:

  • Security: You obviously don’t want anyone to update your pages so allowing the editing of content should be fairly strictly controlled
  • Making the content of the page editable after login. Wouldn’t this require altering the entire page’s markup? Not a problem per se but quite a big job I should imagine
  • Saving the new content. Theoretically this could be done through ajax with a json to save the new page markup in a field in a database, could it not? Also, how do you actually confirm to the website that “I’m done changing this, you can save it now”

I love this idea of quickly editing the page’s content right where you’re going to see it. I’m pretty excited about implementing such a thing on my website, but I could use a bit of guidance before attempting it.

Can anyone address the above listed issues as well as anything I haven’t considered that might be pertinent?

Thanks for your time!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:48:36+00:00Added an answer on June 14, 2026 at 6:48 am
    • Security Yes, you don’t want just anyone to update your page, but that’s not anything to do with contenteditable itself. People can change the content of any page on the internet right now using the browser’s development tools but, other than faking funny screenshots, it’s not much use to them if the server doesn’t accept updates. The more important issue here is protecting against things like cross-site scripting attacks by making sure the content the user adds to the page is ‘safe’ (this, for example, is why blogs typically disallow most HTML tags in comments).
    • Making content editable after login Simply add the contenteditable attribute in the server side logic after the user has logged in. Alternatively, add it with JavaScript when the user clicks an ‘Edit’ button. I wouldn’t expect it to change the whole page’s markup because for this approach to be sensible the pages would already be getting generated at the server side anyway from a template being filled with content stored in a database. If you’re talking about making a static site editable then, yes, you’d have a lot of work to do, but you’d have that work to do however you planned on letting people edit the pages.
    • Saving the new content Yes, do it with Ajax. JSON is not really necessary, it’s the HTML content you want to send back, right? Send it back as HTML, just bear in mind the above comment about cross-site scripting and do security checks on the server side (never trust user input). How you confirm the user is done editing is up to you, in the same way that you’re going to have to add programming logic to send the changes back with Ajax and process those changes on the server, you’re going to have to add logic which shows editing tools (buttons for bold, italic etc.) when necessary – add a button to perform the update at the same time.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I would like to count the length of a string with PHP. The string
I know there's a lot of other questions out there that deal with this
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.