/
Example.php
38 lines (27 loc) · 858 Bytes
/
Example.php
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
<?php
use CKEditorPHP\CKEditorPHP;
include '../__autoload.php';
$CKEditor = new CKEditorPHP('.textarea-ckeditor');
$CKEditor->addToConfig('removePlugins', 'font');
$CKEditor
->addExtraPlugin(new \CKEditorPHP\plugins\Image2Plugin(true))
->addExtraPlugin(new \CKEditorPHP\plugins\FindPlugin())
->addExtraPlugin(new \CKEditorPHP\plugins\CopyformattingPlugin())
->addExtraPlugin('pastefromword');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CKEditor</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://cdn.ckeditor.com/4.13.0/full-all/ckeditor.js"></script>
<script src="https://cdn.ckeditor.com/4.13.0/full-all/adapters/jquery.js"></script>
</head>
<body>
<textarea class="textarea-ckeditor"></textarea>
<script>
<?php echo $CKEditor ?>
</script>
</body>
</html>