Hi,
The formats are defined in td_config.php – http://screencast.com/t/8O4PV29W you can find more information here – http://www.tinymce.com/wiki.php/Configuration:style_formats if you want to add new style formats.
Thanks!
Hi,
the api documentation is here https://forum.tagdiv.com/the-theme-api/ but we don’t yet have a tutorial for tiny mce.
Put your code inplace of “add the api code inside this function” – this code is a plugin
plugin_url = plugins_url('', __FILE__); // path used for elements like images, css, etc which are available on end user
$this->plugin_path = dirname(__FILE__); // used for internal (server side) files
add_action('td_global_after', array($this, 'hook_td_global_after')); // hook used to add or modify items via Api
}
function hook_td_global_after() {
//add the api code inside this function
}
}
new td_api_plugin();
-
This reply was modified 11 years by
Radu.
Hi,
I have the same question as momo, but I can’t get any help from the links you’ve posted above.
I’ve found the file “td-config.php” och added some new styles to it. The styles shows correctly in the Format-menu and it ads the correct CSS to the content, but the CSS don’t affect the content that it’s applied to.
On the “the Theme API”-page you linked to above it says: “The classes are defined inside ..\[theme_name]\includes\td_wp_booster_functions.php”. Do you mean the CSS-classes or what classes?
Excuse my lack of knowledge!
Thankful for help!
I’ve added the following code:
In td_config:
// columns text
td_api_tinymce_formats::add('td_text_columns',
array(
'title' => 'Text columns'
));
td_api_tinymce_formats::add('td_text_columns_0',
array(
'parent_id' => 'td_text_columns',
'title' => 'two columns',
'block' => 'div',
'classes' => 'td_text_columns_two_cols',
'wrapper' => true,
));
td_api_tinymce_formats::add('td_text_columns_1',
array(
'parent_id' => 'td_text_columns',
'title' => 'three columns',
'block' => 'div',
'classes' => 'td_text_columns_three_cols',
'wrapper' => true,
));
In style.css:
.td_text_columns_three_cols {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
-webkit-column-gap: 40px;
-moz-column-gap: 40px;
column-gap: 40px;
-webkit-column-rule-style: solid;
-moz-column-rule-style: solid;
column-rule-style: solid;
-webkit-column-rule-width: 1px;
-moz-column-rule-width: 1px;
column-rule-width: 1px;
-webkit-column-rule-color: #e9e9e9;
-moz-column-rule-color: #e9e9e9;
column-rule-color: #e9e9e9;
margin-bottom: 26px;
}
Hello Isak Engström,
Unfortunately, this requests involve some additional customizations and imply custom work. We cannot provide this type oo services because the time does not afford us, sorry! Please consider hiring a freelancer/developer that help you in this regard, if you are not aware of the steps which are needed to take in this regard, sorry!
Thanks for the message!
