• Resolved lskitto

    (@lskitto)


    Hi what’s the class to add to TinyMCE as it appears to not be working on the frontend of my ForumEngine theme…

    Here’s a snippet of the code holding all the buttons (classes) for the frontend editor as far as I know.

    function editor_settings($args = array()){
    	$buttons = apply_filters( 'fe_editor_buttons' , 'bold,|,italic,|,underline,|,bullist,|,link,unlink,|,feimage,fecode' );
    	return array(
    		'quicktags' 	=> false,
    		'media_buttons' => false,
    		'tabindex' 		=> 5,
    		'textarea_name' => 'post_content',
    		'tinymce' 		=> array(
    			'height'                => 150,
    			'autoresize_min_height' => 150,
    			'force_p_newlines'      => false,
    			'statusbar'             => false,
    			'force_br_newlines'     => false,
    			'forced_root_block'     => '',
    			'toolbar1'              => $buttons,
    			'toolbar2'              => '',
    			'toolbar3'              => '',
    			'setup'                 => 'function(ed) {
    				ed.on("keyup", function(e) {
    					if ( typeof hasChange == "undefined" ) {
    						hasChange = true;
    					}

    https://www.ads-software.com/plugins/better-font-awesome/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mickey Kay

    (@mcguive7)

    Hi there,

    I think you may have the wrong plugin – this doesn’t look like any code I’ve created ??

    Thread Starter lskitto

    (@lskitto)

    Sorry that code was a snippet of ForumEngine (Theme) frontend TinyMCE editor.
    I would like to know how to add your plugin to said TinyMCE editor…

    Plugin Author Mickey Kay

    (@mcguive7)

    Do you mean you would like to add the Better Font Awesome set to your theme? If you just want it on your site, simply install the plugin and it should work right out of the box.

    Thread Starter lskitto

    (@lskitto)

    I have installed it… It only shows when I create a post via my Admin Panel though, not my theme’s built in frontend editor?
    Check out yourself if you’d like https://www.craft101.info/

    Thread Starter lskitto

    (@lskitto)

    *Button Name or Class… I don’t know the proper name ??

    Thread Starter lskitto

    (@lskitto)

    It shows fine when I access it via Admin Panel: https://snag.gy/EfpgA.jpg
    But not via the frontend (ForumEngine Theme): https://snag.gy/eMVow.jpg

    Plugin Author Mickey Kay

    (@mcguive7)

    Hi there,

    Hmmm, great question. The plugin is designed to only enqueue the icon dropdown and associated scripts on the admin side. This is done to save on load time and unnecessary HTTP requests. The situation you’re in is the fringe case, I’d say, and the plugin is optimized for the majority case.

    That said, you could accomplish this by doing a bit of custom work on your own. If you dig into the code you’ll see there are a few scripts and styles that are enqueued only on the admin side by default. You could fairly easily hook into the main BFA Library class and manually enqueue these on the front-end as well.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘TinyMCE Class’ is closed to new replies.