• Bob

    (@prasunsen)


    Hello,

    When using a regular JS call for loading tinyMCE what settings do we need to add in order to have your tools shown in the editor?

    Here is an example call that does not load it:

    settings = {	
    	    tinymce: {
    	        wpautop  : true,
    	        theme    : 'modern',
    	        skin     : 'lightgray',
    	        language : 'en',
    	        formats  : {
    	            alignleft  : [
    	                { selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: { textAlign: 'left' } },
    	                { selector: 'img,table,dl.wp-caption', classes: 'alignleft' }
    	            ],
    	            aligncenter: [
    	                { selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: { textAlign: 'center' } },
    	                { selector: 'img,table,dl.wp-caption', classes: 'aligncenter' }
    	            ],
    	            alignright : [
    	                { selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: { textAlign: 'right' } },
    	                { selector: 'img,table,dl.wp-caption', classes: 'alignright' }
    	            ],
    	            strikethrough: { inline: 'del' }
    	        },
    	        relative_urls       : false,
    	        remove_script_host  : false,
    	        convert_urls        : false,
    	        browser_spellcheck  : true,
    	        fix_list_elements   : true,
    	        entities            : '38,amp,60,lt,62,gt',
    	        entity_encoding     : 'raw',
    	        keep_styles         : false,
    	        paste_webkit_styles : 'font-weight font-style color',
    	        preview_styles      : 'font-family font-size font-weight font-style text-decoration text-transform',
    	        tabfocus_elements   : ':prev,:next',
    	        plugins    : 'charmap,hr,media,paste,tabfocus,textcolor,fullscreen,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,wpview',
    	        resize     : 'vertical',
    	        menubar    : false,
    	        indent     : false,
    	        toolbar1   : 'bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,wp_more,spellchecker,fullscreen,wp_adv',
    	        toolbar2   : 'formatselect,underline,alignjustify,forecolor,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help',
    	        toolbar3   : '',
    	        toolbar4   : '',
    	        body_class : 'id post-type-post post-status-publish post-format-standard',
    	        wpeditimage_disable_captions: false,
    	        wpeditimage_html5_captions  : true
    	
    	    },
    	    quicktags   : true,
    	    mediaButtons: true
    	
    	}
    	wp.editor.initialize(textareaID, settings);
  • The topic ‘How to include it in TinyMCE’ is closed to new replies.