Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134430

xiroxas on "Copying Shortcodes and Loss of "Class" Attribute"

$
0
0

So I've been working on rolling some shortcodes into one of my themes recently, and have run into this issue.

I type out the shortcode in the Visual Editor. No problem.

[shortcode att1="value1" class="some-class"]

I select it, copy it, and paste it on to another line.

[shortcode att1="value1"]

BOOM! The attribute "class" is gone from sight, but the other attributes are still there.

Is there something going on here behind the scenes when I paste it? Because if I then paste it into a plain-text editor, it copies the shortcode, including all attributes like it should.

What's up with this? TinyMCE Bug, or am I missing something here?

This happens even on a fresh install of WordPress 3.5.1 with the default theme and no plugins activated, and on multiple different servers, accessed using multiple browsers.

I know this can be avoided by using a different attribute name, but I'm curious as to why it does this. Can't seem to find anything on it.


Viewing all articles
Browse latest Browse all 134430

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>