WordPress.org

Ready to get started?Download WordPress

Forums

Betta Boxes CMS
Inline Font-Size Styles on Betta Box Content (8 posts)

  1. DaneMorgan
    Member
    Posted 2 years ago #

    Another issue with the Betta Boxes WYSSIWYG editor is that it is inserting inline font-size styles and there is no provision in the tool row to alter font size.

    Not a problem for me, because I can hit the HTML editor and adjust it, but many of my clients could never do that.

    Is there anywhere I can at least set a dafault to something larger than 11px?

    http://wordpress.org/extend/plugins/betta-boxes-cms/

  2. DaneMorgan
    Member
    Posted 2 years ago #

    PS. I added the buttons by hacking the code in the plugin, but if there were an options page we could provide the buttons we need without having to redo them when the plugin was updated.

  3. shauno
    Member
    Plugin Author

    Posted 2 years ago #

    Hey Dane

    An options page is a good idea. I'm on holiday at the moment, so I'm not going to get to it right away though :)

    [ Signature moderated. ]

  4. shauno
    Member
    Plugin Author

    Posted 2 years ago #

    Hey Dane
    Check out version 1.1. I've added an option to select the default WP editor when choosing the HTML custom field type.
    Hope that helps your situation.

    [ Signature moderated. ]

  5. DaneMorgan
    Member
    Posted 2 years ago #

    Beautiful. Went to check the changelog when I saw the update. Now I can plug the MCE for whatever buttons I want and they are universal with the main editor.

    One small gotcha. In my dashboard, the labels from the Betta Boxes Edit page are not showing up above the WP editor fields...

  6. DaneMorgan
    Member
    Posted 2 years ago #

    Adding Labels was easy enough (though i think they should be added through the functions arguments, and submitted feedback to that effect..

    I altered the code starting at line 26

    if($extra['use_wp_editor'] && version_compare(get_bloginfo('version'), '3.3', '>=')) { //wp_editor() is only available from WP 3.3
    			wp_editor($value, 'scfui_'.$field['slug'], array('textarea_name'=>'scfui['.$field['slug'].']', ));
    		}else{

    like this:

    if($extra['use_wp_editor'] && version_compare(get_bloginfo('version'), '3.3', '>=')) { //wp_editor() is only available from WP 3.3
    			echo '<p>';
    			echo '<label>'.$field['label'].'</label>';
    			wp_editor($value, 'scfui'.$field['slug'], array('textarea_name'=>'scfui_['.$field['slug'].']' ));
    			echo '</p>';
    		}else{

    [Please post code snippets between backticks or use the code button.]

    Note that I altered the wp_editor() $editor_id argument to remove the underscore because the specs specifically state that only lowercase letters may be used in this argument. (might want to add a note to that effect on the editor screen as well.

  7. shauno
    Member
    Plugin Author

    Posted 2 years ago #

    Whoops! Little oversight from me :) I have added the label in v1.1.1.

    I noticed in the documentation that you shouldn't have anything other than lower-case letters. I just had used the format scfui_[slug] for all the other field types. And using the underscore didn't seem to break it. Damn programmer OCD wanting everything to be consistent...
    I have removed it now too. But obviously your slug needs to comply then with lower-case letters only too to be 100% compliant with what the codex says.

    You also shouldn't re-order meta boxes with the wp_editor() in them according to the codex. I am hoping people read the docs, before I need to start writing a novel explaining everything on the editing screens :D

  8. DaneMorgan
    Member
    Posted 2 years ago #

    Well, remember 90% of the people who will use this plugin have probably never even loaded the codex. ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic