Php 自我编辑的页面
我想创建一个包含CKEDITOR的html文件,编辑完成后,html文件将得到正确修改Php 自我编辑的页面,php,html,file,ckeditor,edit,Php,Html,File,Ckeditor,Edit,我想创建一个包含CKEDITOR的html文件,编辑完成后,html文件将得到正确修改 <html> <head> <title>Editable</title> // Adds CKEDITOR <script src="//cdn.ckeditor.com/4.4.6/standard/ckeditor.js"></script> </head> <body> /
<html>
<head>
<title>Editable</title>
// Adds CKEDITOR
<script src="//cdn.ckeditor.com/4.4.6/standard/ckeditor.js"></script>
</head>
<body>
// Simple DIV with in-line CKEDITOR
<div id="editable1" contenteditable="true">
<h1>Inline Editing in Action!</h1>
<p>The "div" element that contains this text is now editable.
</div>
<script>
//Adds the editor
CKEDITOR.disableAutoInline = true;
CKEDITOR.inline( 'editable' );
//When focus is lost, it will perfom the action
CKEDITOR.instances.editable.on( 'blur', function( e )
{
//Right now this change is only client side, i would like to make it serverside
$data = CKEDITOR.instances.editable.getData()
$id = this.element.$.id
document.getElementById('editable').innerHTML = $data
});
</script>
</body>
</html>
如果你看到了,我对代码进行了注释,因此解释得很好。
我有一个id,我有一个新的数据,我想修改原始的HTML文件。
我应该用巫术语言吗?有什么特别的图书馆吗
我想我需要使用php
谢谢,这太宽泛了,无法用简单的StackOverflow回答,但步骤非常简洁 学习服务器端语言 学习数据库 将正文从HTML页面提取到服务器端页面 从数据库打印正文的内容 使用AJAX或简单的POST页面发送正文内容 学习足够的JavaScript将正文内容发送到新页面AJAX或生成的表单 当新页面获得HTML时,将其保存到数据库中 重新加载页面 别忘了清理你的输入