tinymce 편집기를 성공적으로 구현하고 데이터베이스에 내용을 저장했습니다. 저장 후 동일한 편집기에서 내용을 편집 할 수 있습니다. 하지만 출력 (스크롤 막대가없는 편집 모드 아님) 만 표시하고 싶습니다. 나는 google에서 찾았지만 어떤 적절한 대답도하지 않았다. 아무도이 일을하는 법이 없습니까? 내가 편집 모드에 대해 다음 코드를 사용했습니다 :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'
]
});
편집을 위해 저장 한 데이터를 주석으로 표시하고 싶습니까? –
편집 모드가 아닌 형식화 된 데이터 만 보려는 경우 (보기 페이지 용) –