Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 54 total)
  • Author
    Posts
  • in reply to: Cloning Max 2 #46326
    JackkyJackky
    Participant

    Just noticed the same

    in reply to: Pattern attribute sanitization may break regex #43953
    JackkyJackky
    Participant

    Yes, but regex must render "as is" inside the pattern attribute

    in reply to: Pattern attribute sanitization may break regex #43745
    JackkyJackky
    Participant

    Ok, forum collapse entities also they are inside backticks... Here a pastebin, where converted entities are shown.

    in reply to: Leading zero before decimal point breaks comparision #42786
    JackkyJackky
    Participant

    Should notice: it's the latest version of MetaBox it self (5.7.4) and Conditional Logic plugin (1.6.19)

    JackkyJackky
    Participant

    +1.
    My temporary solution is to use fake field with type "hidden", like this

    [
        'id'   => 'preview_hack',
        'type' => 'hidden',
        'std'  => '1',
    ]
    in reply to: Inner Blocks not working inside clonable entity #30340
    JackkyJackky
    Participant

    But how it is organized in the native clonable sequense, like columns, for example? Is there a way to solve this?

    in reply to: Inner Blocks not working inside clonable entity #30332
    JackkyJackky
    Participant

    Trying to insert 2 different <InnerBloks /> tags causes the same weird result

    JackkyJackky
    Participant

    I'm totally upvoting for this feature too

    in reply to: Strange wysiwyg behavior inside group #27622
    JackkyJackky
    Participant

    I think you should make some filters for default settings of tinyMCE. Like as for me: I'm using in most cases very "tinyfied" tinyMCE editor and for cases like this I'm writing some simple helper functions, like 'mb_tinymce_defaults( $extend = false )', that is returns an array of defaults, merged with $extend array if it set

    in reply to: Configuring WYSIWYG Buttons not working #27515
    JackkyJackky
    Participant

    Hi! I have made a temporary solution for this purpose: https://support.metabox.io/topic/strange-wysiwyg-behavior-inside-group/#post-27514

    in reply to: Strange wysiwyg behavior inside group #27514
    JackkyJackky
    Participant

    Hi again!

    Guys, I'm very-very (really a lot) upset about so log time to find a solution for this. About a year passed, but you didn't make a fix of this issue. I'm really wondering why, because it feels, like you have very low priority to modify and update mb-blocks extension, despite the fact that, in theory, it should be one of the main extension in your bundle stack. I'm really willing you will change your mind about making mb-blocks the most modern and powerful solution of easy-block-building-api's, because such expectations from the product prompted me to buy lifetime developer bundle. Please do not disappoint me and my fellow developers.

    As I need ability to customize tinymce editor a lot, yesterday I decide to dive into this problem, trying to figure out where the problem is. I have spend several hours, and finally made a new field, based on default 'wysiwyg' field with some custom improvements and changes. The result works perfect for me and solving all my problems and tasks about that. I really hope that you will review my solution of the problem and fix it in the plugin itself.
    NOTE: The code is bad, not refactored and not tested for whole cases, but it works

    Here my solution:
    You should enqueue modified wysiwyg.js script to the admin area, like as separate file either an inline code. NOTE: the 'rwmb' script dependency handle is required
    Here's the js code: https://pastebin.com/kJkCazm5

    Next you should register a new extended rwmb field type, that based on default wysiwyg.php class. Just paste the code below into your functions.php theme file, or include it in some other way:
    https://pastebin.com/D5R7y0zq

    Now you are able to create a new type of field - 'jackky-tinymce', below is my test example (sorry for some weird russian words :)):

    
    [
        'id'                      => 'text',
        'type'                        => 'jackky-tinymce',
        'name'                        => 'Jackky TinyMCE',
        'settings'                    => [ // NOTE: I replaced the 'options' key with the 'settings' key, that contains 2 child keys: 'tinymce', that contains an array of tinymce settings, and 'quicktags' if you need to modify the the textmode tag buttons
            'tinymce'                 => [
                    'media_buttons'           => false,
                    'drag_drop_upload'        => false,
                    'content_css'         => get_template_directory_uri() . '/assets/css/tinymce.min.css', // you can load your custom css file to style the tinymce content like on frontend
                    'toolbar1'                => 'styleselect,bold,italic,bullist,numlist,link,unlink,fullscreen', // set different tinymce settings as usual, like a toolbars buttons
                    'toolbar2'                => 'alignleft,aligncenter,alignright,undo,redo',
                    'style_formats'               => [ // define any nested settings as arrays, like 'style_formats' example
                        [
                            'title'       => 'Имитация strong',
                            'inline'  => 'span',
                            'classes' => 'strong'
                        ],
                        [
                            'title'       => 'Имитация italic',
                            'inline'  => 'span',
                            'classes' => 'em'
                        ],
                        [
                            'title'       => 'Тонкий',
                            'inline'  => 'span',
                            'classes' => 'b300'
                        ],
                        [
                            'title'       => 'Полу-жирный',
                            'inline'  => 'span',
                            'classes' => 'b500'
                        ],
                        [
                            'title'       => 'Экстра-жирный',
                            'inline'  => 'span',
                            'classes' => 'b900'
                        ],
                        [
                            'title'       => 'Имитация h1',
                            'block'       => 'div',
                            'classes' => 'h1'
                        ],
                        [
                            'title'       => 'Имитация h2',
                            'block'       => 'div',
                            'classes' => 'h2'
                        ],
                        [
                            'title'       => 'Имитация h3',
                            'block'       => 'div',
                            'classes' => 'h3'
                        ],
                    ],
            ],
            'quicktags'                   => [
                    'buttons'             => 'strong,em,u,link,ul,ol,li'
            ]
        ],
    ]
    

    The result of all of this stuff

    With a 'side' context of metabox:
    side

    With a standart context:
    std

    Also you should add some css to your admin, if you make this field clonable:

    
    .rwmb-jackky-tinymce-clone
    {
        padding-top: 20px;
    }
    

    Thats all. Feel free to use my solution.

    JackkyJackky
    Participant

    Hi! I think you no need this. I'm acieving the same (working custom js on backend, like on frontend), by calling my libs.js and main.js files (custom ones) within a 'enqueue_block_editor_assets' action. And in main.js I have the stucture like this:

    
    ( function( $ )
    {
    
        window.initScripts = function()
        {
            // HERE ALL CONCATENATED CUSTOM JS 
        }
        
        if ( $('#editor').length )
        {
            $( document ).on( 'mb_blocks_preview', initScripts ) //call scope on 'mb_blocks_preview' event in gutenberg
        }
        else
        {
            $( initScripts ) // frontend call e.g. $(document).ready()
        }
        
    })(jQuery)
    

    This solution works excellent with any custom js. For example I'm using Swiper in all my projects too and it works perfectly on frontend either in the backend and without the need to make any 'special' js-file for gutenberg previews.

    in reply to: How to create a block that supports inner blocks? #27465
    JackkyJackky
    Participant

    And my vote for this too

    in reply to: Apply custom props programmatically #27464
    JackkyJackky
    Participant

    Oh...( Really? No any hacky way to do this? There is no public filters etc. on block save\update? Seriously? Need this a lot. Also MetaBox is positioning itself as a great framework-like tool for programmers, not a wysiwyg-like solution for no-code experience. And I (I think, I'm not alone in this thought) expect to have all the necessary filters\hooks for my development with this solution. Otherwise, one day, unfortunately, I will have to stop using the MetaBox and switch to using native block-building practicies or some advanced solutions. Because things like this is really important.

    in reply to: Can't dequeue fontawsome css on frontend #27104
    JackkyJackky
    Participant

    Thank you! Updating helps!

Viewing 15 posts - 1 through 15 (of 54 total)