1
我有一個在線網頁編輯器,其中我使用了Tinymce。Tinymce新行和轉義錯誤
我有極端的問題,因爲當我按回車鍵,而不是<br>
,它插入/r/n
特殊字符。
此外,每當我插入一個鏈接或圖像路徑或對象的甚至高度或寬度,則顯示如下:
鏈接:<a href="\"../page/swami-sant-dass-ji\"">Read More</a>
圖片:<img src="\"../n/assets/images/swamiji.jpg\"">
這是搞亂與我的網站。此外,stripslashes
功能不解決這個問題,它沒有任何影響
幫助感激!
編輯
我的TinyMCE的初始值設定爲:
tinymce.init({
selector:'textarea#texteditor1',
height: 500,
theme: 'modern',
force_br_newlines : true,
force_p_newlines : false,
forced_root_block : '',
plugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code fullscreen',
'insertdatetime media nonbreaking save table contextmenu directionality',
'emoticons template paste textcolor colorpicker textpattern imagetools codesample toc'
],
toolbar1: 'code | undo redo | styleselect | bold italic | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image codesample | preview',
image_advtab: true,
table_default_attributes: {
class: 'table table-bordered table-striped',
id:'datatable-table-page'
},
entity_encoding: "raw",
content_css: [
'//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
'//www.tinymce.com/css/codepen.min.css'
]
});