function extend_tinymce( $values ) {
$elements="pre[id|class|title|rel]";
if ( isset( $values['extended_valid_elements'] ) ) {
$values['extended_valid_elements'] .= ',' . $elements;
} else {
$values['extended_valid_elements'] = $elements;
}
return $values;
}
add_filter('tiny_mce_before_init', 'extend_tinymce');
The above snippet is what I use for example, of course you can extend this beyond id, class, title, rel, to things such as height, width, style, name, etc…
Related Posts:
- How to determine if a post was last edited in the Visual Editor
- How to use “Add link” pop up for a WordPress widget
- Remove hidden formatting when user paste text from MS Word into TinyMCE
- strip only specific tags (like ), but keep other tags (like )
- Where can I find the code how wordpress parses a post?
- Change padding to text indent in “Increase indent” TinyMCE
- Is there a WordPress equivalent to MediaWiki templates
- Remove whitespace at the end of posts?
- Remove double space after a period
- How to add a custom field after wp post
- Strange problems when I try to insert HTML\XML code snippet in my posts
- Remove permalink from images when inserting into post
- WordPress’ visual editor messing up my (nested) lists (and other things as well)
- Format the Layout of Images In The Edit Post Textarea?
- Apostrophe in a possessive appears as an open-single-smart-quote instead of a closed one
- How to get post body look same as my visual editor?
- Can’t update WordPress Page if post_content is Empty
- Right align a youtube video
- Keyboard shortcut for headings on safari
- How to allow some visitors to edit inline specific post
- When I click edit on a post, all the content disappear. Does anyone know how to fix this?
- Change Posts per page count
- Use category base slug in posts’ permalink
- Customizing HTML Editor Quicktags button to open a dialog for choosing insert options
- Sends out email to admin
- Can I force a metabox to be in one column?
- Get title of post without using the_title();
- Post publish only hook?
- Restrict access to post if it is currently being edited
- Find most recent authors
- How to add a custom button to the tinyMCE toolbar?
- Query only Posts from Both of Two Category?
- How to add one time a new page?
- wp_update_term is always launched after wp_insert_term
- Enable commenting on front-end preview page for pending posts
- why does HTML Tag not working in Post and Page
- How to place HTML below the title of the (custom) post overview
- A way to detect which page a post is on
- Posts are being redirected to xampp home page
- Checking if a post with certain meta value exists
- AJAX filter posts by year
- Animated gif for a thumbs
- Can I lock a post in position, so it always appears on the homepage?
- I am unable to publish/update post
- Custom post preview without saving
- How do I correctly set up a WP-Query to only show upcoming event-posts?
- filter RSS feed in URL
- What hook do you use to update a post?
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- sql select for post_title and a term name
- Count number of posts of current month
- Removing Extra Caption tag around image on post of WordPress
- How to get a post’s details by shortcode?
- Edit multiple custom post types while saving a new or edited post
- Moving the blog page
- Is it possible to lock all new and existing WordPress posts to one specific author?
- How to style archive post titles… but only those posts who have comments?
- Site URL is not redirecting correctly
- How to check if there are posts with the same tag
- How to display multiple images from the post on the homepage
- Can i have more than one form for front end posting in one template [closed]
- How do I allow certain users to make a certain type of post?
- How To Download WordPress Audio Attachments
- How to make blog posts have their own urls?
- How to add content above footer in posts from specific category
- Show posts from two specific category in WP_Query
- How to pull latest posts from a specific category
- How to view a post from the wordpress admin screen
- Is it possible to change the default WP post table’s data source?
- How to create a button to filter posts (list) by meta value
- Blog images not showing on homepage
- How to make certain posts not appear on the main page, but instead only a newly created category(in the menu section)
- Not able to post data through wp-admin
- AJAX load more posts not using correct category and repeating the same few posts
- Multiple Pages – Seperate blogs
- Post by Email – Shortcode for Language? [closed]
- Difficulty in creating and handling a complex post type
- Admin is showing all posts on page 1
- Embed button for post screen
- Display only current page -> posts tags in page
- 3rd Party Login in wordpress
- How to mix pages and sub-categories in a url
- Show a Category Specific Info Box
- Overwrite URL on blog posts
- post content includes and seo vs. duplicate content
- Posts don’t appear on the Blog page
- Display the first post’s comments of category in comments.php template
- WordPress 3.2 – Problem with WYSIWYG editors in a custom post type?
- 301 Redirecting posts without %postid% (just %post_name%) in permalink to ones with %post_name%_%postid%
- On the post list, how do you show different text to the main content?
- Showing Unpublished Posts to Logged-out Users?
- I am creating a front end dashboard where I need to show all the posts by the current user. So, I need to show posts in publish
- Display draft posts on single pages [duplicate]
- Need All the posts with id, title and date [closed]
- List posts related to category on a div [closed]
- query_posts different amount of posts per page [duplicate]
- How to get only post=’product’
- Show Next/Previous without Link
- Hindi content automatically converting to unreadable language?
- I can’t edit my posts