can’t use span or icon tags on when editing visual composer element

Actually this is what i did on the js_composer/assets/js/backend/composer-view.js file, I changed this block: render: function () { var $shortcode_template_el = $( ‘#vc_shortcode-template-‘ + this.model.get( ‘shortcode’ ) ); if ( $shortcode_template_el.is( ‘script’ ) ) { this.html2element( _.template( $shortcode_template_el.html(), this.model.toJSON(), vc.templateOptions.default ) ); } To: render: function () { var $shortcode_template_el = $( ‘#vc_shortcode-template-‘ + this.model.get( … Read more

TinyMCE Multiple Custom Classes Selections

Ok, I found the correct format for this TinyMCE issue which also retain some of the original Style Format selections. Enjoy! function my_wpeditor_buttons( $buttons, $editor_id ) { if ( ‘content’ != $editor_id ) { return $buttons; } array_unshift( $buttons, ‘styleselect’ ); return $buttons; } add_filter( ‘mce_buttons_2’, ‘my_wpeditor_buttons’, 10, 2 ); function my_wpeditor_formats_options( $settings ) { … Read more

How to use value from modal tinymce windowManager?

If I read your question correctly, this is more related to Javascript programming than WordPress. To get the selected option value or text of a HTML select tag, use: var e = document.getElementById(“programming-language-id”); var value = e.options[e.selectedIndex].value; //your code doesn’t set option value var text = e.options[e.selectedIndex].text; //this will get the selected option text

Add WordPress Core CSS into editor-style.css

To add styles that affect TinyMCE you need to do the following: add_action( ‘admin_init’, ‘editor_styles’ ); function editor_styles() { add_editor_style( get_stylesheet_directory_uri() . ‘editor-style.css’ ); } Basically it will load a editor-style.css file located in the root of your child theme.

Sanitize AROUND shortcode

Try to use this instead: editor.focus(); var selected_text = editor.selection.getContent(); shortcode=”[checklist-box title=”” + e.data.title + ‘”]’ + selected_text + ‘[/checklist-box]’; editor.selection.setContent(shortcode); editor.setContent(editor.getContent()); Basically, I’m first forcing editor focus and then use setContent instead to change the content. In my tests there were still some glitches on the editor but the source was ok, so I … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)