We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33138
    • 28 Posts
    still not work sad
    In manager page I choose the IE menu item "viewsource",below is parts of codes:

    tinyMCE.init({
    theme : "advanced",
    mode : "exact",
    width : "100%",
    height : "400",
    relative_urls : false,
    document_base_url : "http://localhost:81/",
    remove_script_host : true,
    language : "en",
    elements : "ta,tvblogContent",
    valid_elements : tinymce_valid_elements,
    extended_valid_elements : tinymce_extended_valid_elements,
    invalid_elements : tinymce_invalid_elements,
    entity_encoding : "named",
    cleanup: true,
    apply_source_formatting : true,
    remove_linebreaks : false,
    convert_fonts_to_spans : "true",
    template_templates : [
    { title : "test", src : "/assets/templates/yjfeng/test.htm", description : "test " } ],
    file_browser_callback : "myFileBrowser",
    external_link_list_url : "/assets/plugins/tinymce3201/tinymce.linklist.php",
    theme_advanced_blockformats : "p,h1,h2,h3,h4,h5,h6,div,blockquote,code,pre,address",
    plugins : "style,advimage,advlink,searchreplace,print,contextmenu,paste,fullscreen,nonbreaking,xhtmlxtras,visualchars,media",
    theme_advanced_buttons0 : "",
    theme_advanced_buttons1 : "undo,redo,selectall,separator,pastetext,pasteword,separator,search,replace,separator,nonbreaking,hr,charmap,separator,image,link,unlink,anchor,media,separator,cleanup,removeformat,separator,fullscreen,print,code,help",
    theme_advanced_buttons2 : "bold,italic,underline,strikethrough,sub,sup,separator,blockquote,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect,separator,styleprops",
    theme_advanced_buttons3 : "",
    theme_advanced_buttons4 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_path_location : "bottom",
    theme_advanced_disable : "",
    theme_advanced_resizing : false,
    theme_advanced_resize_horizontal : false,
    plugin_insertdate_dateFormat : "%Y-%m-%d",
    plugin_insertdate_timeFormat : "%H:%M:%S",
    onchange_callback : "myCustomOnChangeHandler",
    button_tile_map : false

    });
    I found there havn’t "template" item in param plugins and theme_advanced_buttons1 ,but in tinymce config page and interface page,I had add this.

    Web Plugins:
    style,advimage,advlink,searchreplace,print,contextmenu,paste,fullscreen,nonbreaking,xhtmlxtras,visualchars,media,template

    Web Buttons1:
    undo,redo,selectall,separator,pastetext,pasteword,separator,search,replace,separator,nonbreaking,hr,charmap,separator,image,link,unlink,anchor,media,separator,cleanup,removeformat,separator,fullscreen,print,code,help,separator,template

    what’s wrong?
      • 26931
      • 2,314 Posts
      to "tinymce.functions.php" which you find in /assets/plugins/tinymce212/ (or tinymce3241 for Evo 1.02) you add that block of code around line 202:

      $tinymceInit .= "		  template_templates : [
      			{ title : \"Images - single\", src : \"/assets/templates/images-row-1.html\", description : \"Add single image + caption \" },
      			{ title : \"Images - single - aligned left\", src : \"/assets/templates/images-row-1-left.html\", description : \"Add single image, aligned left + caption \" }
      		]".",\n";

      whereas "images-row-1.html" & "images-row-1-left.html" would be your template files in the assets/templates folder
      under Tools > Configuration > Interface & features e.g. button row 2 you just add "template" to the list of available buttons
        • 33138
        • 28 Posts
        Quote from: sharkbait at Dec 24, 2009, 03:03 AM

        to "tinymce.functions.php" which you find in /assets/plugins/tinymce212/ (or tinymce3241 for Evo 1.02) you add that block of code around line 202:

        $tinymceInit .= "		  template_templates : [
        			{ title : \"Images - single\", src : \"/assets/templates/images-row-1.html\", description : \"Add single image + caption \" },
        			{ title : \"Images - single - aligned left\", src : \"/assets/templates/images-row-1-left.html\", description : \"Add single image, aligned left + caption \" }
        		]".",\n";

        whereas "images-row-1.html" & "images-row-1-left.html" would be your template files in the assets/templates folder
        under Tools > Configuration > Interface & features e.g. button row 2 you just add "template" to the list of available buttons
        thank you for your suggestion,but 2 point you said I have done.
        I have modify the tinymce.functions.php,and add code like below:

        $tinymceInit .= " template_templates : [
        { title : \"test\", src : \"/assets/templates/yjfeng/test.htm\", description : \"test \" } ]".",\n";

        and add template to interface page. sad
          • 33138
          • 28 Posts
          Bingo!

          Security->Manager Users->admin->user->TinyMCE Settings

          I found all of TinyMCE Settings field is blank,so fill them.and successful!

          Thank you sharkbait!! smiley
            • 26931
            • 2,314 Posts
            great news grin just struggled myself to get it working in an MODx Evo 1.02 install ... had to go to Plugin Configuration "Web Theme" - Custom + "Interface & Features" -> "Theme: Custom"
              • 33138
              • 28 Posts
              new question about this:

              if template just only include a comment.for example:<!--splitter-->,the code can’t be inserted.

              how should i do?
                • 26931
                • 2,314 Posts
                if template just only include a comment.for example:<!--splitter-->,the code can’t be inserted.
                did you check the html-view of your ressource?
                  • 33138
                  • 28 Posts
                  nothing commnet be insert in html view source embarrassed
                    • 26931
                    • 2,314 Posts
                    i t works for me using the template from chunk method http://modxcms.com/forums/index.php/topic,41005.0.html ...i’ll check the other later
                      • 33138
                      • 28 Posts