Forum

Thread tagged as: Redactor

Redactor not previewing properly

I think there may be some CSS conflicting in the Perch admin with the Redactor plugin. Changing text to italics works when outputting on the website, but not in the actual editor. You can see it changing in the "source code" option in Redactor, it just doesn't style the text. The bullets/numbers in lists also do not show up.

Is this just happening for me or can it be replicated?

Perch: 2.8.8
Production mode: Production (100)
Installed apps: content (2.8.8), assets (2.8.8), categories (2.8.8), perch_blog (4.6), perch_forms (1.8.3)
DB driver: PDO
DB tables: perch2_blog_authors, perch2_blog_comments, perch2_blog_index, perch2_blog_posts, perch2_blog_posts_to_tags, perch2_blog_sections, perch2_blog_tags, perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_forms, perch2_forms_responses, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 1
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_forms'
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup, redactor
H1: bd1e175c6b2a0907a900462563ab755f
L1: 198a7f996e9deb0ed4ff62b6d2ac87c7
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.8: done
latest_version: 2.8.8
on_sale_version: 2.8.8
perch_blog_update: 5.0
perch_blog_post_url: /blog/post.php?s={postSlug}
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: cti_local
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: digital@blackdiamond.co.uk
PERCH_EMAIL_FROM_NAME: Black Diamond Digital
PERCH_LOGINPATH: /admin
PERCH_PATH: /Users/alex/Sites/communicatetoinspire/webroot/admin
PERCH_CORE: /Users/alex/Sites/communicatetoinspire/webroot/admin/core
PERCH_RESFILEPATH: /Users/alex/Sites/communicatetoinspire/webroot/admin/resources
PERCH_RESPATH: /admin/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /Users/alex/Sites/communicatetoinspire/webroot/admin/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
HOSTING SETTINGS

PHP: 5.6.7
Zend: 2.6.0
OS: Darwin
SAPI: apache2handler
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $
MySQL server: 5.5.42
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, intl, json, ldap, mbstring, session, standard, mysqlnd, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysql, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, apache2handler, imap, gettext, mcrypt, yaz, pgsql, pdo_pgsql
GD: Yes
ImageMagick: No
PHP max upload size: 32M
PHP max form post size: 32M
PHP memory limit: 128M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
HTTP_HOST: communicatetoinspire:8
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36
HTTP_REFERER: https://communicatetoinspire:8/admin/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: cmsa=1; PHPSESSID=fa0e223fb00d7ffd588f0f1292caccd5
PATH: /usr/bin:/bin:/usr/sbin:/sbin
SERVER_SOFTWARE: Apache
SERVER_NAME: communicatetoinspire
SERVER_ADDR: ::1
SERVER_PORT: 8
REMOTE_ADDR: ::1
DOCUMENT_ROOT: /Users/alex/Sites/communicatetoinspire/webroot
SERVER_ADMIN: you@example.com
SCRIPT_FILENAME: /Users/alex/Sites/communicatetoinspire/webroot/admin/core/settings/diagnostics/index.php
REMOTE_PORT: 55081
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /admin/core/settings/diagnostics/?extended
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
PHP_SELF: /admin/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1436530359.48
REQUEST_TIME: 1436530359
argc: 1
Digital Team

Digital Team 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I can reproduce that - we'll see if we can get a fix for it.

Any traction on this? Gotta be a quick fix. :)

I'm sure you'll implement your fix differently, but for reference, this is how I've quickly fixed it for now.

At the top of perch/addons/plugins/editors/redactor/redactor/redactor.css:

/* Quick fix for CSS bug */
.redactor-editor em {
  font-style: italic ;
}

.redactor-editor ul {
  list-style-type: disc;
} 

.redactor-editor ol {
  list-style: decimal;
} 
Drew McLellan

Drew McLellan 2638 points
Perch Support

Thanks - we have this logged, it's just on a list of a great many 'quick' fixes.

I've put my CSS Redactor modifications in a separate CSS file (see https://docs.grabaperch.com/docs/customizing-perch/ui-customizations/). That way, it won't get overwritten when Redactor is updated.

Good to know Clive, thanks!