We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42625
    • 9 Posts
    Hi !

    I would like to create TinyMCE's html template.
    With MODx Revolution 2.2.6-pl, TinyMCE 4.3.3-pl seems to allows html5 tags. Here is an extract of file /assets/components/tinymce/xconfig.js :
    var tinymce_valid_elements = ''+'a[accesskey|charset.....'......+'article[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress'
    	+'|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style'
    	+'|title],'+......+'h2[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick'
    	+'|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove'
    	+'|onmouseout|onmouseover|onmouseup|style|title],'+......

    In system config, I add ",template" at the end of tiny.custom_plugins.
    Then, I set "custom_buttons3 : template".
    Finally, I set tiny.template_list : "simpleSection:assets/templates/simpleSection.html:test section"
    simpleSection.html looks like this :
    <h2>Title</h2><p>Text</p>

    Until now, everything works good, I can use it in TinyMCE editor. However when I try to use a more complex template, it does not work anymore...

    I have 2 problems in particular :
    - if I add a class into the title element for example, the text between the tags disappears
    - if a use html5 tags (<article> for example), they are replaced by <p>

    Does anyone know where the problem is?

    Thank you in advance
    • Cuz TinyMCE doesn't care for html5.

      Can't comment about the title class.

      CKEditor might suit you better, regardless.

        Frogabog- MODX Websites in Portland Oregon
        "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
        Having server issues? These guys have MODX Hosting perfected - SkyToaster
        • 42625
        • 9 Posts
        Hi Frogabod, thank you for your response.

        I try CKEditor and read the doc, this seems to be that I was looking for but I can't add customized templates.
        The last version for MODx Revolution is ckeditor-1.1.0-rc1?

        I follow this thread http://forums.modx.com/thread/81345/ckeditor-wysiwyg-editor-for-modx-revolution---support-thread and I can't find ckeditor.custom_template.
        Where is this config?