Text presentation problem in php with tinymce editor

Asked

Viewed 671 times

2

I have a manager with the HTML editor tinymce, but every time I enter information in the database, when I present it on the page through PHP the text appears without paragraphs and with some tags I don’t know why this happens.

SS

As you can see in the image these appear tags which by itself also appear on the page when I call PHP content visualization.

  • I used this component, but I found a much better and easier to implement. look if you like: http://www.sceditor.com/

  • I’ll look into the suggestion.

  • Okay, I’m sure you’ll like it more.

1 answer

1

Well personal however I managed to solve I noticed that I had an editor configuration problem compared to the fonts I had added I ended up solving with the following code I leave to if someone goes through the same problem.

<script type="text/javascript">
tinymce.init({
    selector: "textarea.editme",
    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"
    ],
    toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
    toolbar2: "print preview media | forecolor backcolor emoticons",
    image_advtab: true,
    templates: [
        {title: 'Test template 1', content: 'Test 1'},
        {title: 'Test template 2', content: 'Test 2'}
    ]
});
</script>

This will enable all functions of the editor // NOTE AND FOR VERSION 4 OF THE EDITOR

Browser other questions tagged

You are not signed in. Login or sign up in order to post.