-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathckeditor_Content.php
50 lines (46 loc) · 1.34 KB
/
ckeditor_Content.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
39
40
41
42
43
44
45
46
47
48
49
50
<!doctype html>
<html lang="th-TH">
<head>
<meta charset="utf-8">
<title>CKEditor: Content Templates</title>
</head>
<body>
http://ckeditor.com/forums/Support/Disable-HTML-correction
http://margotskapacs.com/2014/11/ckeditor-stop-altering-elements/
<form method="post" id="contentF">
<div id="editor">
<ul class="nav navbar-nav navbar-right">
@foreach($menus as $menu)
<li class="menu-item menu-item-type-custom menu-item-object-custom"><a class="anchor" href="#section{!!$menu['link']!!}">{!!$menu['label']!!}</a></li>
@endforeach
</ul>
</div>
<textarea id="content" cols="50" rows="10"></textarea>
<input type="submit" value="Send">
</form>
<script src="vendor/components/jquery/jquery.min.js"></script>
<script src="vendor/ckeditor/ckeditor/ckeditor.js"></script>
<script>
$(function(){
CKEDITOR.inline('editor', {
"allowedContent": true,
"autoParagraph": false,
"basicEntities": false,
"entities": false,
"entities_additional": "",
"entities_greek": false,
"entities_latin": false,
"entities_processNumerical": false,
"htmlEncodeOutput": false,
"langEntries": "en",
"extraAllowedContent":"*{*}",
})
$('#contentF').submit(function(event) {
event.preventDefault();
var data = CKEDITOR.instances.editor.getData();
jQuery('#content').val(data);
});
});
</script>
</body>
</html>