Front-end image upload from TinyME [closed]
A simple solution may be to download the Members Plugin and then give the subscriber permission to upload_files
A simple solution may be to download the Members Plugin and then give the subscriber permission to upload_files
Greedy and Ungreedy modifier: preg_replace( ‘/<p>(.+)<\/p>/Uuis’, ‘$1’, $content ); Tested with this script: <?php $c = array(); $c[] = ‘<p>text</p>’; $c[] = ‘<p><div>text</div></p>’; $c[] = ‘<p><div><div>text</div></div></p>’; foreach ( $c as $content ) { $e = preg_replace( ‘/<p>(.+)<\/p>/Uuis’, ‘$1’, $content ); var_dump( $e ); } Also try remove_filter( ‘the_content’, ‘wpautop’ );
First, I believe your css should use only one colon: .mce_mybutton:before { content: ‘\f459’; } Now, in order to get the css to the proper place. First, we add an action to admin_print_styles; then we check to see if we are editing a post or page; then we enqueue our stylesheet. We run the check … Read more
I wish I was able to explain exactly WHY this works, but from the help of another wordpress.stackexcchange question I was able to find the solution. Adding tinyMCE.triggerSave(); directly after the .submit function forces the content to update. This was taken directly from another thread’s answer: “tinyMCE textarea is initially unseen by the used serialize … Read more
I recommend just enabling the built-in media button by setting: ‘media_buttons’ => true It will place the button above the toolbar but it’s a very simple solution.
Seems that the problem is with the virtual site config – the docroot in the fastcgi config. In my example I’m using nginx webserver and PHP7. It has to look like this: location / { try_files $uri $uri/ /index.php?q=$request_uri; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME … Read more
Looking at the contents of class-wp-editor.php, it looks like tiny_mce_before only triggers if you are not using the Teeny version of the editor: /* * For people who really REALLY know what they’re doing with TinyMCE * You can modify $mceInit to add, remove, change elements of the config * before tinyMCE.init. Setting “valid_elements”, “invalid_elements” … Read more
What you have is working perfectly in a clean WordPress installation, using Twenty Seventeen, so it means the problem is the way in which you are minifying your JS or anything else within this specific WordPress installation. Do the usual thing, deactivate all plugins and check again, if the problem is gone activate one by … Read more
There is an action ‘media_buttons’ where these buttons are inserted. Some plugins are using that action to add more buttons, dropdown lists or links. If they had to use the TinyMCE toolbar, they had less room and more restrictions regarding style and JavaScript access. In short: the current placement is better for plugins. Moving the … Read more
You can add an editor-style.css stylesheet in your theme which mimics the look-and-feel of your blog. Here are some tips on how to do that (you’ll need to touch functions.php too): http://www.deluxeblogtips.com/2010/05/editor-style-wordpress-30.html The first two styles in that example are the important ones; usually what I do is just copy over and rename my style.css … Read more