Jump to content
LukasHH

Tinymce Editor Is Different In Product Page And Cms Page

Recommended Posts

i would modify our tinymce with a selection button "my button". the button add html code as pattern text for the products. but the function from the tinymce editor is different for a product edit site and the cms edit site.

when i edit a product, the is the editor without my button. when i edit a cms site, the show the editor my button.

the other modifications are ok, this is only the button.

but why?

 

this is a screenshot

post-1143674-0-38598000-1454114292_thumb.jpg

 

 

this is my botton in the tinymce.inc.js

	  	setup: function(editor) {
			editor.addButton('mybutton', {
		  		type: 'menubutton',
		  		text: 'My button',
		  		icon: false,
		  		menu: [{
        			text: 'CMS DIV',
        			onclick: function() {
          				editor.insertContent('<div class="cms_info"><h1>Überschrift</h1><p>Hier der Text</p></div>');
        			}
      			}, {
        			text: 'CMS col-6',
        			onclick: function() {
          				editor.insertContent('<div class="row"><div class="col-sm-6"><p>Hier der Text</p></div></div>');
        			}
      			}, {
        			text: 'Waschsymbole',
        			onclick: function() {
          				editor.insertContent('<div class="cms_wash"><p><span>Waschsymbole:</span><br />Hier die Bilder einfügen</p></div>');
        			}
      			}]
    		});
  		},	

Share this post


Link to post
Share on other sites

The editor without the button is exclusively for the products (BO). For categories so the button is displayed.

I do not know where to look, why the button does not appear on all products.

 

this is the generated HTML Code in the BO

 

*Edit Product*

<div role="group" id="mceu_47" class="mce-container mce-flow-layout-item mce-last mce-btn-group">
   <div id="mceu_47-body"></div>
</div>

*Edit Category*

<div role="group" id="mceu_48" class="mce-container mce-flow-layout-item mce-last mce-btn-group">
   <div id="mceu_48-body">
      <div aria-haspopup="true" role="button" id="mceu_21" class="mce-widget mce-btn mce-menubtn mce-listbox mce-first mce-last mce-btn-has-text" tabindex="-1" aria-labelledby="mceu_21">
         <button id="mceu_21-open" role="presentation" type="button" tabindex="-1">
            <span class="mce-txt">Vorlagen</span>
            <i class="mce-caret"></i>
         </button>
      </div>
   </div>
</div>

The code for the button is not created. Is this due to a controller or any of tinymce? Here is the <textarea> declared incorrectly?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More