KindEditor如何设置不过滤HTML代码

KindEditor如何设置不过滤HTML代码

KindEditor如何设置不过滤HTML代码

資料來源:http://www.lingchenliang.com/?mod=wap&act=View&id=100

步驟01.找 kindeditor_class.php

步驟02.修改load_kindeditor()函數 – 只增加『filterMode : false,』

	public function load_kindeditor()
	{
		?>
		<script type="text/javascript">
		//<![CDATA[
			var editor;
			var options = {
				filterMode : false,
				cssPath : ['<?php echo $this->plugin_path; ?>plugins/code/prettify.css','<?php echo $this->plugin_path; ?>style.css'],
				uploadJson : '<?php echo $this->plugin_path ?>php/upload_json.php',
				fileManagerJson : '<?php echo $this->plugin_path ?>php/file_manager_json.php',
				items : [
				'source', '|', 'undo', 'redo', '|', 'template', 'cut', 'copy', 'paste',
				'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
				'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
				'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'map', 'baidumap','fullscreen', '/',
				'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
				'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage','flash', 'media', 'table', 'hr', 'emoticons', 'code', 'anchor', 'blockquote', 'wpmore',
				'link', 'unlink'
				],
				afterChange : function() {
					jQuery('#wp-word-count .word-count').html(this.count('text'));
				}
			};
			KindEditor.ready(function(K) {
					editor = K.create('#content',options);
			});
		//]]>
		</script>
		<?php
	}

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *