Forum

Thread tagged as: Blog, TinyMCE, Field-Types

TinyMCE - HTMLEndoding

I'm using TinyMCE to edit my blog posts with, however it is HTMLEndocing all of the markup, displaying all of the HTML on the front-end and incorrectly embedding YouTube clips.

Does anyone know how to fix this?

Thanks in advance.

Robin Waite

Robin Waite 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can we see:

  • Your template
  • Your Diagnostics Report

The form when you created a new thread asks for these so we can help you without needing to ask for them.

<article class="h-entry">
    <h1>
        <perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" />
    </h1>
    <p class="meta">
        <time class="dt-published" datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Meta information" />">
            <perch:blog id="postDateTime" type="date" time="true" format="%d %B %Y" /> 
        </time>
        <perch:if exists="authorGivenName">
            by <span class="p-author h-card"><perch:blog id="authorGivenName" type="hidden" /> <perch:blog id="authorFamilyName" type="hidden" /></span>
        </perch:if>    
        <perch:categories id="categories" set="blog" label="Categories" display-as="checkboxes">
            <a href="/blog/category/<perch:category id="catSlug" type="slug" />" class="p-category">
                <perch:category id="catTitle" type="text" />
            </a>
        </perch:categories>

    </p>
    <perch:if exists="image">
        <div>
            <img src="<perch:blog id="image" type="image" width="320" height="240" crop="true" label="Image" order="4" />" alt="<perch:blog id="postTitle" />" />
        </div>
    </perch:if>
    <div class="description e-content">
        <perch:blog id="postDescHTML" type="textarea" label="Post" order="2" editor="tinymce" size="xxl autowidth" required="true" />
    </div>
</article>

<perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" order="3" suppress="true" size="s" />
<perch:blog id="image" type="image" width="50" height="50" crop="true" suppress="true" />
Perch Runway: 2.8.5, PHP: 5.4.42, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.5), assets (2.8.5), categories (2.8.5), perch_blog (4.6), perch_mailchimp (2.0.1), collection_1 (2.8.5)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_mailchimp', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/sites/o/onlinebusinessstartup.co.uk/public_html/perch
PERCH_CORE: /var/sites/o/onlinebusinessstartup.co.uk/public_html/perch/core
PERCH_RESFILEPATH: /var/sites/o/onlinebusinessstartup.co.uk/public_html/perch/resources
Image manipulation: GD
PHP limits: Max upload 100M, Max POST 100M, Memory: 128M, Total max file upload: 100M
Resource folder writeable: Yes
DOCUMENT_ROOT: /var/sites/w/www.onlinebusinessstartup.co.uk/public_html
HTTP_HOST: www.onlinebusinessstartup.co.uk
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Drew McLellan

Drew McLellan 2638 points
Perch Support

You need to set html="true" on the tag - as TinyMCE is outputting HTML.

You can find this and more in the documentation on installing editors: https://docs.grabaperch.com/docs/customizing-perch/installing-editors/

Great, thank you Drew, worked immediately.