Home>Support>Missing Style Formats in SiteOrigin Editor

Missing Style Formats in SiteOrigin Editor

Hi,

I just started a new project and did a new install of WordPress and the Site Origin plugins and I’m only able to select Paragraph in the format dropdown. Heading1, Heading2, etc are all missing. I also usually use a plugin that allows me to add custom formats to the dropdown and those are also missing. They show up in the regular WordPress tinymce editor, but not the SiteOrigin one. I didn’t have this issue about two months ago so I’m curious if this is a recent problem or if it’s possible I’m missing something.

Thanks!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 2 months ago dscatton

    Hi,

    It looks like today’s update fixed the main formatting dropdown tab, so I can select the default options, Heading1, Heading2, etc. The dropdown below that one, where you can have custom formats, is now opening up and showing a long list of blank options.

    I’m using this plugin to create custom styles for the Formats dropdown: https://wordpress.org/plugins/just-tinymce-styles/

    If anyone is using another plugin that seems to be working or if there’s another way to get the custom styles to work with the latest update, please let me know.

    Thanks!

    • 7 years, 1 month ago Alex S
      Hi, I Work Here

      Hi Dscatton,

      That’s happening due to the plugin giving the editor json encoded data which is currently being mishandled. I’m unsure if this is avoidable or not (with the new Editor API), but I think it should be. I’m going to bring this up with the development team.

  2. 7 years, 1 month ago dscatton

    Hi,

    I just noticed another thing. The editor doesn’t seem to be using the theme’s editor-style.css stylesheet anymore. It’s using the stylesheet located in the wp-includes/js/tinymce/skins/wordpress/ folder. Is there a way to specify which stylesheet the editor should be using?

    Thanks!

    • 7 years, 1 month ago Alex S
      Hi, I Work Here

      Hi Dscatton,

      This is unintentional I’ve logged this as a bug – sorry about this!

  3. 7 years, 1 month ago dscatton

    Hi Alex,

    Thanks for your replies. No worries about the bugs, hopefully the development team can figure them out.

    In the meantime, regarding the tinymce formats, I’ll just look around for some other plugins that do the same thing and see if I can find one that’s working with the new API.

  4. 7 years, 1 month ago dscatton

    Hi Alex,

    I just removed the json encoding completely from the style formats and got them to show up correctly. I’ll include what I did below in case it’s useful to anyone.

    The way the custom style formats were being added looked something like this, with the variable $style_formats being an array of formats (see this post for more information: https://torquemag.io/2016/09/add-custom-styles-wordpress-editor-manually-via-plugin/):

    $init_array['style_formats'] = json_encode( $style_formats ); 

    I just removed the json_encode function from this and it worked:

    $init_array['style_formats'] = $style_formats; 

    It’s not clear to me why the custom formats were working in the normal wordpress editor and not the siteorigin editor but it’s at least working for me for now.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More