This repository has been archived by the owner on Mar 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
60 lines (48 loc) · 1.56 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CKEditor 5 – classic editor build – development sample</title>
<style>
body {
max-width: 800px;
margin: 20px auto;
}
</style>
</head>
<body>
<h1>CKEditor 5 – classic editor build – development sample</h1>
<div id="editor">
<h2>Sample</h2>
<p>This is an instance of the <a
href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#classic-editor">classic
editor build</a>.</p>
<figure class="image">
<img src="./tests/manual/sample.jpg" alt="Autumn fields" />
</figure>
<p>You can use this sample to validate whether your <a
href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/custom-builds.html">custom
build</a> works fine.</p>
</div>
<div id='word-count'></div>
<script src="./dist/ckeditor.js"></script>
<script>
ClassicEditor.create(document.querySelector('#editor'), {
// https://ckeditor.com/docs/ckeditor5/latest/features/image-upload/easy-image.html
cloudServices: {
// tokenUrl: 'https://example.com/cs-token-endpoint',
// uploadUrl: 'https://your-organization-id.cke-cs.com/easyimage/upload/'
}
})
.then(editor => {
window.editor = editor;
const wordCountPlugin = editor.plugins.get('WordCount');
const wordCountWrapper = document.getElementById('word-count');
wordCountWrapper.appendChild(wordCountPlugin.wordCountContainer);
})
.catch(error => {
console.error('There was a problem initializing the editor.', error);
});
</script>
</body>
</html>