• banesto

    (@banesto)


    Everything is perfect if I use only html view. If I decide to go back to design view, tinyMCE apparently changes

     tag so that i have:
    
    <pre class="php">
    
    insted of
    
    <pre name="code" class="php">
    
    which results in code highlight not being activated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • thomasgericke

    (@thomasgericke)

    I have exactely the same problem and could not find a solution yet.

    Please, anyone may post a solution…

    thomasgericke

    (@thomasgericke)

    … but it seems, the “striping” isn’t done by tinyMCE, because I alsready deactivated *AND* deleted it. Behaviour is still the same.

    <PRE NAME="code" CLASS="php">

    results in:

    <PRE CLASS="php">

    Sad thing…

    thomasgericke

    (@thomasgericke)

    One more thing:

    It works, if you enter the <PRE NAME... thing in HTML editing mode, hit ‘Save Draft’ and preview your post. That totally works!

    But once you switch to Visual editing mode, the NAME="code" part disappears immediately.

    Solution needed…

    Thread Starter banesto

    (@banesto)

    and, if you have wp-print installed – it kinda breaks whole concept, because, if i have in [pre] html, wp-print module executes it instead of showing the code.

    Thread Starter banesto

    (@banesto)

    possible solution would have been an ability to put something like [code=php]
    in visual editor and plugin would parse it as necessary.

    You can use extended_valid_elements in tinyMCE init and include pre[name] in the element list you can also add number of attribute in it like name, language etc.

    tinyMCE.init({
    // General options
    mode : “textareas”,
    theme : “advanced”,
    extended_valid_elements : “pre[name|language]”
    });

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Google Syntax Highlighter for WordPress] tinyMCE strips {name=’code’} part when going to de’ is closed to new replies.