Plugin Author
kobmat
(@kobmat)
Hi! This editor was designed for administrator area of wordpress only. But i will look into adding the functions to the frontend of TinyMCE Advanced.
So kind of you. I am too much limited in developping. I can only do some makeshift job but faced here really difficulties…
Thanks a ot
Plugin Author
kobmat
(@kobmat)
I have looked at TinyMCE Advanced and the buttons for this plugin is on the editor. It would really help if you can let me know what plugin you are using to bring the WYSIWYG editor to the front-end of you website.
I use Anspress plugin to include a system of questions and answer, quite like stackoverflow. In question or answer form are frontend editors.
I tried to add ‘mathTex’ button in the following class function which defines the elements of the editor:
public function editor_buttons( $buttons, $editor_id )
{
if(is_anspress())
return array( 'bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'link', 'unlink', 'blockquote', 'pre', 'mathTex');
return $buttons;
}
however it does not worked.
Plugin Author
kobmat
(@kobmat)
I think adding mathTex to that code will not work. you may want to look into editor_plugin.js.php on this plugin.
There is no editor_plugin.js.php in Anspress. It looks like it’s using wordpress editor:
`private function editor_field($field = array())
{
if(isset($field[‘label’]))
$this->label();
if($field[‘settings’][‘tinymce’] !== false){
$field[‘settings’][‘tinymce’] = array(
‘content_css’ => ap_get_theme_url(‘css/editor.css’),
‘wp_autoresize_on’ => true
);
}
/**
* FILTER: ap_pre_editor_settings
* Can be used to mody wp_editor settings
* @var array
* @since 2.0.1
*/
$settings = apply_filters(‘ap_pre_editor_settings’, $field[‘settings’] );
$this->output .= ‘<div class=”ap-form-fields-in”>’;
// Turn on the output buffer
ob_start();
echo ‘<div class=”ap-editor”>’;
wp_editor( $field[‘value’], $field[‘name’], $settings );
echo ‘</div>’;
$this->output .= ob_get_clean();
$this->error_messages();
if(!$this->field[‘show_desc_tip’])
$this->desc();
$this->output .= ‘</div>’;
}’