我想集成Asp.net (C#和ASPX)项目的CKEditor 5(最新版本)。但是NuGet包管理器和包括Stackoverflow在内的其他论坛引导我使用CKEditor版本3.6.4。如何在Asp.net (C# & ASPX)项目中使用最新版本?
我在哪里可以找到任何与此相关的信息?
-Thanks
发布于 2019-03-08 16:44:27
在他们的网站上给出的例子
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CKEditor 5 – Classic editor</title>
<script src="https://cdn.ckeditor.com/ckeditor5/12.0.0/classic/ckeditor.js"></script>
</head>
<body>
<h1>Classic editor</h1>
<asp:TextBox ID="txtarea" runat="server" ClientIDMode="Static"></asp:TextBox>
<script>
ClassicEditor
.create( document.querySelector( '#txtarea' ) )
.catch( error => {
console.error( error );
} );
</script>
</body>
</html>
发布于 2020-08-03 10:57:17
按照@Gagan Deep的示例,您可以在每次CKEditor5更改时将内容复制到那里。
请参阅此示例:
ClassicEditor
.create(document.querySelector('#txtarea'), {
})
.then(editor => {
editor.model.document.on('change', () => {
console.log('The Document has changed!');
$("#txtarea").html(editor.getData());
});
})
.catch(error => {
console.error(error);
});这段代码创造了魔力
.then(editor => {
editor.model.document.on('change', () => {
console.log('The Document has changed!');
$("#txtarea").html(editor.getData());
});
})https://stackoverflow.com/questions/55058613
复制相似问题