S
S
shurr2014-07-21 12:27:00
PHP
shurr, 2014-07-21 12:27:00

How to insert tags in tinymce?

Don't ask why)
We need <?php and ?> tags to be inserted into tinymce
Man, googling, etc. didn't help
. Tags are cut automatically when added and become commented out
<!--?php xxxxxxx; ?-->
. Is it possible? Yes-no-how
What did you try, init

tinyMCE.init({
    // General options
    mode : "textareas",
    theme : "advanced",
    plugins : "nonbreaking,paste",

    // Theme options
    theme_advanced_buttons1 : "styleselect, copy, bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,sub,sup,|,charmap,|,removeformat,nonbreaking,pagebreak,|,pastetext,pasteword,|,link,unlink,anchor,|,code,|,undo,redo",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_resizing : true,
    content_css : "/css/word.css",
        verify_html : false,
        valid_elements: "*[*]",
        protect: [
        /\<\/?(if|endif)\>/g, // Protect <if> & </endif>
        /\<xsl\:[^>]+\>/g, // Protect <xsl:...>
        /<\?php.*?\?>/g // Protect php code
    ]

   });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Entelis, 2014-07-21
@shurr

www.tinymce.com/wiki.php/Configuration:protect

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question