Comments senzoi started the conversationOctober 10, 2019 at 11:23amHello,i try to configure tinymce for the front end submission form.i try the code saw in an other article but don't work fine: $elements['description'] = wp_editor('','stec-builder-element-content-textarea-style', array( 'textarea_name' => 'description' ));Could you help me please?senzoi repliedOctober 10, 2019 at 11:24ami want to use it for Description textarea. 877Zhivko repliedOctober 14, 2019 at 10:36amTry with output buffer: add_filter('stec_builder_front_elements', function($elements) { ob_start(); wp_editor('', 'stec-builder-element-content-textarea-style', array('textarea_name' => 'description')); $editor = ob_get_clean(); $elements['description'] = array( $editor ); return $elements;}); Stachethemes Developersenzoi repliedOctober 16, 2019 at 6:07pmHi Zhivko,thank you for your answer, but now i see only visual text and a white windows withou any buttons? 877Zhivko repliedOctober 18, 2019 at 8:30amTry the wp editor js api instead.Example: add_filter('stec_builder_front_elements', function($elements) { $elements['description'] = array( '<div class="stec-wp-editor-container"></div>' // editor placeholder ); return $elements;}); add_action('stec_after_html', function() { // Load editor api js wp_enqueue_editor(); ?> <script type="text/javascript"> (function ($) { $.stecExtend(function (m) { m.$instance.on('click', '.stec-event-create-form', function () { if (!$(this).hasClass('active')) { var editorContainer = m.glob.options.id + ' .stec-wp-editor-container'; wp.editor.initialize(editorContainer); } }); }); })(window.jQuery); </script> <?php}); Stachethemes Developer Sign in to reply ...
Hello,
i try to configure tinymce for the front end submission form.
i try the code saw in an other article but don't work fine:
Could you help me please?
i want to use it for Description textarea.
Try with output buffer:
Stachethemes Developer
Hi Zhivko,
thank you for your answer, but now i see only visual text and a white windows withou any buttons?
Try the wp editor js api instead.
Example:
Stachethemes Developer