Custom quicktags not working after Wordpress 6.0 wp 5.8.x/5.9.x: working -- wp 6.0: not working Buttons are not showing here: https://imgur.com/a/T05o0WX Console error: Uncaught ReferenceError: QTags is not defined I am using this code. function my_quicktags() { if ( wp_script_is( 'quicktags' ) ) { ?> <script type="text/javascript"> QTags.addButton( 'eg_php', 'PHP', '<pre><code class=\"language-php\">', '</code></pre>', 'p', 'PHP Code', 200 ); QTags.addButton( 'eg_css', 'CSS', '<pre><code class=\"language-css\">', '</code></pre>', 'q', 'CSS Code', 201 ); QTags.addButton( 'eg_html', 'HTML', '<pre><code class=\"language-html\">', '</code></pre>', 'r', 'HTML Code', 202 ); …
I am looking for adding custom quicktag buttons, that would allow me to display a intermediary dialog before inserting the code. Situation Clicking a quicktag button opens a dialog or thickbox modal window. Opened dialog displays some options on the class, etc and an Insert button. Clicking "Insert" button inserts the code. Background To add an quicktags button, we would use edButtons[ edButtonsLength+ ] = new edButton( 'ed_mybutton' , 'Insert button', '<div class="class-name">', '</div>' ); //// edHTML += '<input type="button" …
I need to insert some text in the body of the article, that turns into a "side-tag" by wrapping it inside some div tags with custom classes. I've created a custom button in tinymce that pops up a new window with a text field. You write the text and when you hit OK it adds the beginning and endig div tags and inserts it into the wp editor where your cursor was. Here is the code: (function () { tinymce.PluginManager.add('custom_mce_button2', …
I only want to display a subset of the buttons on the html editor button bar. What is the proper way to remove some of the quicktags? For intance I don't want it to offer "proofread".
I am trying to make a callback function that returns on click of a quick tag wordpress button dinamical generated variables inside the tags. Something like QTags.addButton( 'eg_wrap', 'WRAP ARROWND', '<div class="moudle-area">', '<p>[Tweet "I just completed Module '+module_nr+' of the '+course+' Course"]</p></div>', 'WRAP ARROWND', 'WRAP ARROWND', 1 ); Current Example function callback_wrap() { var course = getSelectedText("_lesson_course"); var module_info = jQuery("#title").val(); var module_nr = module_info.match( /\d+/g ); }); QTags.addButton('eg_wrap', 'WRAP ARROWND', callback_wrap); Problem when I select text how can I …
Is it possible to add a quicktag button to the Wordpress add post editor which when clicked will automatically assign a custom field to a post? Sometimes I have 50 scheduled posts, 30 of which have to be marked with a custom field called "featured_on_homepage" used to indeed make the post featured in a specific place on the blog's front page. If I could have a button to do it, I would go through the 30+ posts much more easily.
I added an quicktag for my wordpress editor: function generico_quicktags() { if ( wp_script_is( 'quicktags' ) ) { ?> <script type="text/javascript"> QTags.addButton( 'pov_generico', 'POV (Genérico)', '[pov-generico]', '[/pov-generico]' ); QTags.addButton( 'pov_generico', 'p', '<p class="fala generico">', '</p>', '', 'Fala (Personagem Genérico)', 10 ); </script> <?php } } add_action( 'admin_print_footer_scripts', 'generico_quicktags' ); But the button only show in Wordpress editor, not in bbpress's reply form. Is there a way to make the quicktag show there too?
I wish to remove the quick-tag buttons in the text (html) editor in TinyMCE but not the html editor itself nor the tabs for choosing between the editors. When I use $settings = array('quicktags' => false); wp_editor($input, 'editor_name', $settings); Wordpress removes the entire text editor and the Visual / Text tabs for choosing between the editors (as stated in the codex). I have tried $settings = array('quicktags' => array()); But all buttons remain. Looking through the source code I cannot …
I want to put a couple of quicktags/buttons on a textarea which is outputted by a plugin called user submitted posts. I have given this textarea an unique id and read this on the Quicktags documentation: Run quicktags(settings) to initialize it, where settings is an object containing up to 3 properties: settings = { id : 'my_id', the HTML ID of the textarea, required buttons: '' Comma separated list of the names of the default buttons to show. Optional. Current …
I've added quicktags to a plain ol' textarea field which sits inside a metabox on a custom post type page. I can see the link button on the toolbar, along with the rest of the buttons, but when clicked, the link button does nothing. Using WP 3.6. All the other buttons work except the link button, and there's no errors in the firebug console. Have also tried with chrome. function my_admin_print_footer_scripts() { ?> <script type="text/javascript">/* <![CDATA[ */ var id = …
I use a plugin on my blog that allows the user to click on an image to enlarge it in a pop-up window. My plugin of choice for this task is the FancyBox for WordPress plugin. Most of the time the plugin works as expected. However, I have discovered that it doesn't function on images found on the front page of my blog if the image is part of a post which contains the <!--more--> quicktag. For posts without the …
reading the quicktags.dev.js i see in the comments * Run quicktags(settings) to initialize it, where settings is an object containing up to 3 properties: * settings = { * id : 'my_id', the HTML ID of the textarea, required * buttons: '' Comma separated list of the names of the default buttons to show. Optional. * Current list of default button names: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close'; * } * * The settings can also be a string quicktags_id. * * quicktags_id string The …
Is it possible to automatically add the <!--nextpage--> quicktag after X number of paragraphs? My client isn't exactly tech savvy so I'm trying to find a way to help them break up their enormous pages without them having to come back to me time and time again asking how to do it.
I always use HTML editor when writing an entry in my wordpress blog, I'm not sure why I can't bring myself to like the TinyMCE editor. After a while, I started to think about creating my own quicktags for HTML editor to make writing easier in the future. thanks to this article, I now (kinda) understand how to make my own quicktags. but after re-reading the article a couple of times, I still couldn't find a way to make a …
I can't work out how to add the WP quicktag button back into the editor, I have customized the editor as below: function gimko_format_tiny_mce($in) { $in['remove_linebreaks']=false; $in['convert_newlines_to_brs']=false; $in['keep_styles']=true; $in['tabfocus_elements']='major-publishing-actions'; $in['paste_remove_styles']=false; $in['paste_remove_spans']=false; $in['paste_strip_class_attributes']='none'; $in['paste_text_use_dialog']=true; $in['plugins']='inlinepopups,tabfocus,paste,media,fullscreen,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,wpfullscreen'; $in['apply_source_formatting']=false; $in['theme_advanced_buttons1']='formatselect,forecolor,|,bold,italic,underline,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,justifyfull,|,link,unlink,|,wp_fullscreen,wp_adv'; $in['theme_advanced_buttons2']='pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo'; $in['theme_advanced_buttons3']=''; $in['theme_advanced_buttons4']=''; $in['valid_children'] = '+div[p]'; return $in; } What do I need to add in to get it back showing?
I want to add quicktags that do more than just add markup. For instance, I would like to add a quicktag to run a function do apply a js regex on the page content. How can I add a quicktag that executes a function? To give a specific example, I would like to add a button that removes all markup tags in the entire post text. This is analogous to the predefined quicktags for finding unmatched tags, or "proofread", etc.
I use the Editor Quicktag Buttons to store special things like this example below is used to store the DIV's to make Columns on my theme. I need help, I want to modify the snippet below so that it will insert the HTML onto multiple lines, so instead of adding <div class="one-half first">1st</div>n/<div class="one-half">2nd</div>n\<div class="clear-line"></div> To the textarea as one Line, I would like to insert it as 3 lines like this... <div class="one-half first">1st</div> <div class="one-half">2nd</div> <div class="clear-line"></div> Here …
With WP 3.2, WordPress maybe has a new function to add Link-Quicktags to the editor. But I found an function to set defaults for the link-button: Take a look at wplink.js Line 278. setDefaultValues : function() { // Set URL and description to defaults. // Leave the new tab setting as-is. inputs.url.val( 'http://' ); inputs.title.val( '' ); // Update save prompt. inputs.submit.val( wpLinkL10n.save ); }, How is it possible to set the values for a custom value? Is this possible …
I'm hacking around with a blog using Cordobo Green Park and I've noticed when I specify a custom title, instead of it beginning with a » symbol (as it does for the standard "» Read more: [POSTTITLE]") the custom message is simply shown without any prepended character. It's a shame, because the » character would be nice to include for visual consistency. In ./themes/cordobo/index.php (lines 28-30) there's this piece of code which I think handles the tag: <div class="entry"> <?php …