Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add text-shadow button to tinymce
    primarykey
    data
    text
    <p>I'm using tinymce 3.5.6 and I want to add a button then will work like Bold or Underline buttons, but will add text-shadow to the selected text.</p> <p>First of all I added "textshadow" to the line</p> <pre><code>theme_advanced_buttons1 </code></pre> <p>and added all this lines:</p> <pre><code>'formats' : { 'textshadow' : { 'inline' : 'span', 'styles' : { 'text-shadow' : '0px 1px 5px rgba(0,0,0,0.4)' } } }, 'setup' : function (ed) { ed.addButton('textshadow', { 'title' : 'Text shadow', 'image' : 'js/tiny_mce/themes/advanced/img/textshadow.png', 'onclick' : function () { ed.formatter.apply('textshadow'); return false; } }); }, </code></pre> <p>This is works, but not function like Bold or Underline buttons. When I select text and click on the text-shadow button, it's adding a shadow to the selected text, but it's not remove the shadow on second click. Also when I selected text with text-shadow it's not selecting (mark as on) the text-shadow button.</p> <p>What I need to do to make the taxt-shadow button work exactly like Bold or Underline buttons?</p> <p>Demo: <a href="http://jsfiddle.net/8wGYC/1/" rel="nofollow">http://jsfiddle.net/8wGYC/1/</a> (the first button is the text-shadow with the flash icon)</p> <p><strong>EDIT:</strong> Other solution, to make extra dropdown menu with 3 options to different shadows. But I want it to work just like the Format dropdown menu (mark on the one is selected, second click will cancel the shadow) I dont want it to be part from Styles or Format dropdown menus. I want it to be in separate dropdown menu. I don't know how to do this... any ideas?</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload