Source code highlighting

  • Author
    Posts
  • #691105

    engraver
    Member

    When I use construction like
    [sourcecode language="..."]
    ...
    [/sourcecode]

    switching from HTML view to Visual and back adds tags < br / > to every code line. Also when [sourcecode] pair is wrote in HTML, in Visual input window it transforms text style to preformatted. Can it be solved simply?

    #691306

    supportbot
    Member

    You did not specify a blog address or reason for posting when you created this topic.

    This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.

    If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.

    This is an automated message.

    #691308

    engraver
    Member

    Oh, yeas, my blog address http://engraver.wordpress.com

    #691413

    macmanx
    Staff

    We’ll look into that. For now, I recommend entering your source code stuff last in the HTML editor tab, then publish before switching back to the Visual tab.

    #691414

    engraver
    Member

    Ok, thank you.

    #691548

    fabiomarini
    Member

    Hello, I’m having a similar problem…

    I’m using [sourcecode lang="xml"] in the HTML editor. When I switch to the Visual editor, the XML has disappeared (only the [sourcecode] tags are left in a grey box). If I switch back to the HTML editor, the XML is lost.

    Any ideas when this will be fixed?

    Thanks,
    Fabio

    #691549

    macmanx
    Staff

    We don’t really have an ETA yet. The problem appears to be with TinyMCE, which is the third-party tool that we use for our visual editor, and we unfortunately don’t have much control over that when it comes to how it “fixes” source code.

The topic ‘Source code highlighting’ is closed to new replies.