So Im using the
tiny_mce_before_init filter to added a few classes to the
wp_editor and am getting unexpected results. I havent used this before, but from what Im reading and what my peers tell me I should be able to apply classes to elements in the editor directly, and not creating a wrapper element.
So I have this:
$new_styles = array( array( 'title' => __( 'Custom Styles', 'title' ), array( 'title' => __('Table Header','kjd'), 'classes' => 'table-header', 'wrapper' => true ), array( 'title' => __('Table Subheader','kjd'), 'classes' => 'table-subheader', 'wrapper' => true )....
From what I understand, both
'block' are optional and the
'wrapper'=>true argument will apply the class to the selected element, and not wrap it in whatever. But no matter which options I apply (like
'block' => 'td' ) work. Anyway, Im told that this funcationality changed in WP 3.9
My goal is to apply some classes to table cells so that when my client copies and pastes in a table, they can style it appropriately. They would click a cell and apply the style to said cell.