Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

dubcznic on "WP_EDITOR on Frontend in bootstrap modal doesnt work properly"

$
0
0

im stacked on one problem. in my plugin, i open a bootstrap modal and inside it i want to display the defaul WP editor, called by the function wp_editor(). What i get is the textarea with buttons and the button ADD MEDIA, like it displays in admin section. but i cant put focus on the textarea, and its giving me JS error in console when clicking the ADD MEDIA button, or trying to put focus. it acts like an input with "disabled" attribute. When i display the editor with the same code but NOT IN MODAL, its works well.

the code i use is:

$settings = array(
    'textarea_rows' => 20,
);
wp_editor('<p>Some more content</p>', 'textareasaaaaaaa', $settings);

and the HTML structure of bootstrap modal (not iframe):

<div style="display: none">
    <div id="designizer_ajax_dialog_confirm_delete" class="modal fade dialogWindowWrapper">
        <div class="modal-header">
        </div>
        <div class="modal-body">
        ...

i made a video here for better inside view: http://screencast.com/t/Lyc3ANzqu
here you can see that it works when not in modal: http://screencast.com/t/yA2CvLFTAM

Do you have an idea how to make it works? maybe some DOM problem with initialization? Thanks for any info.

// i use bootstrap modal for its multi-modal open, which allows me to have 3 modal open f.e.


Viewing all articles
Browse latest Browse all 8245

Trending Articles