首页 > 解决方案 > Auto Save HTML file after contenteditable

问题描述

I would like to save the HTML file automatically after contenteditable is done. How to achieve this? My HTML file is:

<!DOCTYPE html>
<html>
    <head>
        <title>Sample File editor</title>
        <meta charset="utf-8" />
    </head>

    <body contenteditable="true">
        <div>Press keys here..<br/>
            <i>Sample Italic Text</i> and <b>Sample Bold Text</b> and so on...<br/>
        </div>
   </body>
</html>

I'm expecting pure javascript.

标签: javascripthtml

解决方案


推荐阅读