Hello.
I need to add custom styles in the post / page editor via the ‘formats’ dropdown.
There is already a formats dropdown and all of the ways I tried to add to it just create a second ‘formats’ dropdown with the same options as the first.
Is it possible to add to the array somewhere and manually add my styles?
Hi,
In order to make some formats dropdown you need to go in
\wp-content\themes\Newspaper\includes\td_config.php
https://www.screencast.com/t/LCmimmAa
Example https://www.screencast.com/t/4hPf2dzS
https://www.screencast.com/t/tVuLeB6MV
Hope this will help you.
Thank you.
Hi,
Please read our documentation about child theme, here you’ll find the files you can set in the child and how to set them ->https://forum.tagdiv.com/the-child-theme-support-tutorial/
Also you can set the css directly in Newspaper>Theme panel>Custom code>Custom css, in this way you’ll not lose the css after update.
Thank you.
Hi Calin, I follow up on this topic as I want to achieve the same result as 3ftDeep but I have problems to make it work.
I understand child theme and custom css no problem. But I have problem to make the custom format appear on the Format Menu.
Can you confirm it’s possible to basically add only this :
td_api_tinymce_formats::add('td_text_highlight_test22',
array(
'parent_id' => 'td_text_highlight',
'title' => 'Test22',
'classes' => 'test22',
'inline' => 'span'
));
In this file : Newspaper-Child\includes\td_config.php (where td_config.php only has the code above ?)