Hmm…
Have you try this? <p style=”text-align: center;”>Test Word</p>
When you click center using the button, you should see the above code.
Does this solve your issue?
Sorry if I can’t help much >.<
The code works, but not for my shortcodes…
When i´ll press for example text-align center button for a simple text and my shortcode it will not works… It will looks like this:
In editor:
<p style=”text-align: center;”>Text without shortcode
[one_third]Column Shortcode[/one_third]</p>
On page:
<p style=”text-align: center;”>Text without shortcode</p>
<div class=”one_third”>Column Shortcode</div>
you will possibly need to repeat the text-align stuff within the shortcode;
example:
<p style="text-align: center;">Text without shortcode</p>
[one_third]<p style="text-align: center;">Column Shortcode</p>[/one_third]
or use css (added to style.css of your theme) to align the texts.
what plugin are you using for the column shortcode?
or is it part of your theme? which theme?
It doesnt work even if i repeat the text align within the shortcode.
I´m not using a plugin, its my own column shortcode but im 100% sure that its was coded well.
add_shortcode('one_third', 'one_third');
function one_third($atts, $content = null ) {
return '<div class="one_third">'.do_shortcode($content).' </div>';
}
(function() {
tinymce.create('tinymce.plugins.one_third', {
init : function(ed, url) {
ed.addButton('one_third', {
title : 'Column 1/3',
image : url+'/MCE-icons/ico_1-3.png',
onclick : function() {
ed.selection.setContent('[one_third]...[/one_third]');
}
});
},
createControl : function(n, cm) {
return null;
},
});
tinymce.PluginManager.add('one_third', tinymce.plugins.one_third);
})();
Hmm…
tinymce.PluginManager.add(‘one_third’, tinymce.plugins.one_third);
Did you have plugin before? The above line….maybe!
Nope i didnt. However it works well, the shortcode is working but text-align inside the shortcode isn´t working.