New Landing How can we help? Themeforest Theme Support Dante defined styles in the editor

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #64766
    walter
    Member
    Post count: 105

    hi there,
    where can I define my own styles to choose from in the editor, like the standard styles impact-text, impact-text-large and so on?
    best regards

    #64831
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Open up shortcodes.php and go to line 40 and find this:

    function sf_custom_mce_styles( $init ) {
            $init['theme_advanced_buttons2_add_before'] = 'styleselect';
            //First, we define the styles we want to add in format 'Style Name' => 'css classes'
            $classes = array(
                __('Impact Text', 'swift-framework-admin')     => 'impact-text',
                __('Impact Text Large', 'swift-framework-admin')     => 'impact-text-large',
            );

    Just add another line in for e.g:

    function sf_custom_mce_styles( $init ) {
            $init['theme_advanced_buttons2_add_before'] = 'styleselect';
            //First, we define the styles we want to add in format 'Style Name' => 'css classes'
            $classes = array(
                __('Impact Text', 'swift-framework-admin')     => 'impact-text',
                __('Impact Text Large', 'swift-framework-admin')     => 'impact-text-large',
                __('My Custom Text', 'swift-framework-admin')     => 'my-custom-text',
            );

    Then you can add the css for .my-custom-text in your custom css.

    – Kyle

    #65428
    walter
    Member
    Post count: 105

    hi kyle

    thanks a lot for your answer!!

    #65504
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register