{"action":"created","issue":{"url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/1913","repository_url":"https://api.github.com/repos/ThemeFuse/Unyson","labels_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/1913/labels{/name}","comments_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/1913/comments","events_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/1913/events","html_url":"https://github.com/ThemeFuse/Unyson/issues/1913","id":172395208,"number":1913,"title":"TinyMCE editor problems","user":{"login":"WPJobs","id":12991525,"avatar_url":"https://avatars.githubusercontent.com/u/12991525?v=3","gravatar_id":"","url":"https://api.github.com/users/WPJobs","html_url":"https://github.com/WPJobs","followers_url":"https://api.github.com/users/WPJobs/followers","following_url":"https://api.github.com/users/WPJobs/following{/other_user}","gists_url":"https://api.github.com/users/WPJobs/gists{/gist_id}","starred_url":"https://api.github.com/users/WPJobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WPJobs/subscriptions","organizations_url":"https://api.github.com/users/WPJobs/orgs","repos_url":"https://api.github.com/users/WPJobs/repos","events_url":"https://api.github.com/users/WPJobs/events{/privacy}","received_events_url":"https://api.github.com/users/WPJobs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"andreiglingeanu","id":2979628,"avatar_url":"https://avatars.githubusercontent.com/u/2979628?v=3","gravatar_id":"","url":"https://api.github.com/users/andreiglingeanu","html_url":"https://github.com/andreiglingeanu","followers_url":"https://api.github.com/users/andreiglingeanu/followers","following_url":"https://api.github.com/users/andreiglingeanu/following{/other_user}","gists_url":"https://api.github.com/users/andreiglingeanu/gists{/gist_id}","starred_url":"https://api.github.com/users/andreiglingeanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreiglingeanu/subscriptions","organizations_url":"https://api.github.com/users/andreiglingeanu/orgs","repos_url":"https://api.github.com/users/andreiglingeanu/repos","events_url":"https://api.github.com/users/andreiglingeanu/events{/privacy}","received_events_url":"https://api.github.com/users/andreiglingeanu/received_events","type":"User","site_admin":false},"assignees":[{"login":"andreiglingeanu","id":2979628,"avatar_url":"https://avatars.githubusercontent.com/u/2979628?v=3","gravatar_id":"","url":"https://api.github.com/users/andreiglingeanu","html_url":"https://github.com/andreiglingeanu","followers_url":"https://api.github.com/users/andreiglingeanu/followers","following_url":"https://api.github.com/users/andreiglingeanu/following{/other_user}","gists_url":"https://api.github.com/users/andreiglingeanu/gists{/gist_id}","starred_url":"https://api.github.com/users/andreiglingeanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreiglingeanu/subscriptions","organizations_url":"https://api.github.com/users/andreiglingeanu/orgs","repos_url":"https://api.github.com/users/andreiglingeanu/repos","events_url":"https://api.github.com/users/andreiglingeanu/events{/privacy}","received_events_url":"https://api.github.com/users/andreiglingeanu/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2016-08-22T08:30:55Z","updated_at":"2016-08-30T13:41:21Z","closed_at":null,"body":"Hi guys!\r\n\r\nIt seems, i can't add custom styles for Uyson TinyMCE editor. For example, this code totally not working with Unyson Text Editor +breaks  Visual Page Builder button (but it works for WPTinyMCE default editor):\r\n\r\n```\r\nadd_filter( 'tiny_mce_before_init', 'add_tinymce_styles' );  \r\n\r\nfunction add_tinymce_styles( $init_array ) {\r\n\t\r\n\t$style_formats = array(\r\n\t\t'title' => esc_html__('Custom styles', 'mytheme'),\r\n\t\t'items' => array(\r\n\t\t\t'title' => esc_html__('UPPERCASE TEXT', 'mytheme'),\r\n\t\t\t'inline' => 'span',\r\n\t\t\t'styles' => array( 'text-transform' => 'uppercase' )\r\n\t\t) \r\n\t);\r\n\t\r\n\t// Insert the array, JSON ENCODED, into 'style_formats'\t\t\r\n\t$init_array['style_formats'] = json_encode( $style_formats );\r\n  $init_array['fontsize_formats'] = '10px 12px 14px 16px 18px 20px 22px 24px 26px 28px 30px 32px 34px 36px 38px 40px'; \t\t\t\r\n\treturn $init_array; \r\n}\r\n```\r\n\r\nis it a bug or feature xD thank you!"},"comment":{"url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/comments/243441968","html_url":"https://github.com/ThemeFuse/Unyson/issues/1913#issuecomment-243441968","issue_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/1913","id":243441968,"user":{"login":"yura-x","id":11721548,"avatar_url":"https://avatars.githubusercontent.com/u/11721548?v=3","gravatar_id":"","url":"https://api.github.com/users/yura-x","html_url":"https://github.com/yura-x","followers_url":"https://api.github.com/users/yura-x/followers","following_url":"https://api.github.com/users/yura-x/following{/other_user}","gists_url":"https://api.github.com/users/yura-x/gists{/gist_id}","starred_url":"https://api.github.com/users/yura-x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yura-x/subscriptions","organizations_url":"https://api.github.com/users/yura-x/orgs","repos_url":"https://api.github.com/users/yura-x/repos","events_url":"https://api.github.com/users/yura-x/events{/privacy}","received_events_url":"https://api.github.com/users/yura-x/received_events","type":"User","site_admin":false},"created_at":"2016-08-30T13:41:21Z","updated_at":"2016-08-30T13:41:21Z","body":"Hello! I'm using code snippet from the Codex;\r\nIt's slightly modified:\r\n```\r\n//adding custom styles to TinyMCE\r\n// Callback function to insert 'styleselect' into the $buttons array\r\nif ( !function_exists( '_filter_mce_theme_format_insert_button' ) ) :\r\n\tfunction _filter_mce_theme_format_insert_button( $buttons ) {\r\n\t\tarray_unshift( $buttons, 'styleselect' );\r\n\t\treturn $buttons;\r\n\t}\r\nendif; //_filter_mce_theme_format_insert_button\r\n// Register our callback to the appropriate filter\r\nadd_filter( 'mce_buttons_2', '_filter_mce_theme_format_insert_button' );\r\n// Callback function to filter the MCE settings\r\nif ( !function_exists( '_filter_mce_theme_format_add_styles' ) ) :\r\n\tfunction _filter_mce_theme_format_add_styles( $init_array ) {\r\n\t\t// Define the style_formats array\r\n\t\t$style_formats = array(\r\n\t\t\t// Each array child is a format with it's own settings\r\n\t\t\tarray(\r\n\t\t\t\t'title' => __('Excerpt'),\r\n\t\t\t\t'block' => 'p',\r\n\t\t\t\t'classes' => 'entry-excerpt',\r\n\t\t\t\t'wrapper' => false,\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'title' => 'Paragraph with dropcap',\r\n\t\t\t\t'block' => 'p',\r\n\t\t\t\t'classes' => 'big-first-letter',\r\n\t\t\t\t'wrapper' => false,\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'title' => 'Main theme color',\r\n\t\t\t\t'inline' => 'span',\r\n\t\t\t\t'classes' => 'highlight',\r\n\t\t\t\t'wrapper' => false,\r\n\t\t\t),\r\n\r\n\t\t);\r\n\t\t// Insert the array, JSON ENCODED, into 'style_formats'\r\n\t\t$init_array['style_formats'] = json_encode( $style_formats );\r\n\r\n\t\treturn $init_array;\r\n\r\n\t}\r\nendif; //_filter_mce_theme_format_add_styles\r\n// Attach callback to 'tiny_mce_before_init'\r\nadd_filter( 'tiny_mce_before_init', '_filter_mce_theme_format_add_styles' );\r\n```"}}
{"actor":{"display_login":"yura-x"}}