You could add custom quick tags (for the text editor) easily as follows
function wpse182089_add_float_quicktags() {
if (wp_script_is('quicktags')){ ?>
<script type="text/javascript">
QTags.addButton( 'floatr', 'float right', '<span style="float: right">', '</span>', '', '', 41 );
QTags.addButton( 'floatl', 'float left', '<span style="float: left">', '</span>', '', '', 42 );
</script>
<?php }
}
add_action( 'admin_print_footer_scripts', 'wpse182089_add_float_quicktags' );
You could change the span to div if you want to.
Related Posts:
- TinyMCE: adding CSS to format dropdown
- Forcing reload of editor-style.css
- How do i use fontawesome icons in TinyMce editor?
- How to add a class to ul tags created by the WordPress editor Tinymce?
- How can I insert HTML attributes with an existing TinyMCE button?
- WordPress stripping out BR tags, need assistance
- Different css rules for TinyMCE and Gutenberg while using add_editor_style()
- Custom styles dropdown in TinyMCE editor – not working with headings
- jQuery UI styles conflicting with TinyMCE dialog
- Show class from css in format dropdown
- How to add class to an html output element in tinyMCE paragraph drop down menu
- TinyMCE on frontend style not working
- Add WordPress Core CSS into editor-style.css
- Enqueue MCE Editor CSS in admin page
- How to insert spaces/tabs in text using HTML/CSS
- How to make the HTML link activated by clicking on the
- ?
- How would you make two s overlap?
- How can I insert vertical blank space into an html document?
- Align text to the bottom of a div
- How to make a
- display in a horizontal row
- CSS3 Scale Animation Keyframes
- JavaFX css themes
- Border Position
- Bootstrap align navbar items to the right
- Responsive Canvas in Bootstrap column?
- How to get multiple images to auto resize and stay centered within a div
- How do you avoid caching during development?
- How to specify a class added to my gallery
- Get parent category class in post_class()
- TinyMCE custom stylesheets for different post types
- Assign title-specific class to list items in menu based on WP pages
- WordPress – https : Css and Js files are not working (load on http instead of https)
- some things in child theme css not overriding parent
- Is it possible to create a full width row in WordPress’s editor window? [closed]
- How do I find (index) file in order to change style on CSS?
- Enqueue style for Password Reset page
- How to change header & footer to full width? [closed]
- Styleswitcher or themeswitcher to allow user to switch back to standard view from mobile device
- Best way to install Bulma (CSS Framework) with WordPress and Genesis
- Looking for methods to Check if File Exist
- How to change the style.css?ver=5.4.1 in WordPress?
- why enqueued styles in header.php shows in footer?
- How to create a custom CSS class for a specific page template?
- Add fields in customization tab to change background colours of certain classes
- Responsive Author Style in BBpress?
- Get a blank line after div by simply leaving an empty line in the editor
- How to stop my themes CSS changing the WordPress interface/?
- CSS not applying in admin
- loading a custom stylesheet in a function
- Load jQuery only on home page
- Keeping CSS model open after form submission
- Sidebar button click redirect when user is not logged in instead displays it
- How do I use inline styling with WordPress?
- WordPress address URL and bloginfo
- Add class to navigation link of page
- Is there a way to add new div class via a theme’s Additional CSS interface?
- Keep comments but turn off commenting
- How to remove Author and Category from a single portfolio page? [closed]
- Custom styles in Tiny MCE with an external CSS file
- Long post titles don’t move to next line
- How to not load stylesheet and how to load a second stylesheet on a page
- Change the search icon in twenty fourteen
- styling isnot working in wordpress theme
- Plugins not showing up for custom template
- Using True Type Fonts (ttf) [closed]
- Horizontal drop down category with hover effect working
- WordPress Sudden Loss of All CSS And Tons of JQuery Errors
- Trying to hide HENTRY (Author Meta Data) from a Post ID
- Can’t find a tag to style
- Custom CSS on mobile
- Removing Image Links from Custom Post Type
- Add inline CSS to login page with wp_add_inline_style
- Theme: Twentynineteen // How to exclude cookie-control triangle and star svg from being overwridden by theme css “svg { fill: currentColor; }”
- Cannot add a class to metabox
- CSS does not Update
- Need help removing block of white space between footer widgets and footer [closed]
- Change image using only CSS [closed]
- theme RTL make big white space in mobile mode and you need to scroll to see the site
- Why child theme stylesheet takes long time to update?
- Navigation menu disappears when I hover the mouse [closed]
- I want to change change the arrangement of the grid of posts displayed by the theme on the Search page (read the description for better understanding)
- Align divs in a basic WordPress site
- Can’t center post thumbnail with bootstrap [closed]
- Force include a stylesheet from parent theme
- How can I override an existing custom CSS rule for a specific page
- Site name not showing in browser bar, only url
- Style tag on wp_footer
- Outputting the blogposts or the_content()
- Apply Classes to post text inside editor
- Use of CSS classes in editor-blocks.css file
- Twenty Twelve theme: remove margins
- Parent style messing up with Bootstrap [closed]
- Problems when writing a post
- WordPress CSS not working properly
- Add Custom CSS Class in Child Theme [closed]
- can i custom rendered content from API?
- How to include Elementor CSS in custom php file [closed]
- How to add CSS to WordPress
- How to add arbitrary custom CSS to a WordPress Block Theme using Site Editor?
- Wrap post titles containing slashes on narrow viewports