我已成功實施tinymce編輯器,並將內容保存到數據庫中。保存後,我可以在同一個編輯器中編輯內容。但我只想顯示輸出(不是編輯模式,沒有滾動條)。我在谷歌搜索,但沒有任何正確的答案。有沒有人沒有如何做到這一點?我已將以下代碼用於編輯模式:如何使用tinymce(非編輯模式)顯示輸出
tinymce.init({
selector: 'textarea',
height: 500,
theme: 'modern',
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: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
toolbar2: 'print preview media | forecolor backcolor emoticons | codesample',
image_advtab: true,
templates: [
{ title: 'Test template 1', content: 'Test 1' },
{ title: 'Test template 2', content: 'Test 2' }
],
content_css: [
'//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
'//www.tinymce.com/css/codepen.min.css'
]
});
你想在tinymce中顯示保存的數據進行編輯? –
我只想顯示格式化數據(查看頁面),而不是編輯模式 –