This is a wiki bug, perhaps I’m wrong but I think it is.

This is a wiki bug, perhaps I’m wrong but I think it is.

When you copy paste a script to post it with the tag it is shown correctly.

However when you copy it from the browser all line breaks and multi spaces disappear and you get a looooong line of code, which works but make impossible the editing.

Note: I'm trying this with a mobile phone (Firefox and chrome) perhaps it works in a computer.

Pierre Hébert, searching on the internet you can find some dokuwiki plugins for code text.

I made a quick search and found https://www.dokuwiki.org/plugin:syntaxhighlighter3 in case you don't want to spend time searching.

https://www.dokuwiki.org/plugin:syntaxhighlighter3
]]>
« (Previous Post)

12 Commentsto This is a wiki bug, perhaps I’m wrong but I think it is.

  1. Anonymous says:

    < ![CDATA[

    I don’t know if something changed but it seems lately the scrolling in the wiki from my phone is choppy. Somehow now I can scroll the right side separately, and this seems to be the cause.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Another thing: I can’t select text by keyboard in edit mode.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    I didn’t brought any update to the wiki but there is a new release available, I will apply it, maybe this will fix things. I never tried from a mobile so I can’t tell.


    Thanks TrianguloY for the link, you are right, I don’t wish to spend too much time googling 😉

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Ok, it works ‘fine’


    I can in that chunk of code copy/paste line breaks and multi spaces.


    It’s true the highlight is a bit…blocky. But highlight is not really necessary I think.


    I also saw that this plugin need a different tag, so it is not automatically applied to already written pages. (We will need to update them)



    After a bit more searching I found this two plugins (theoretically the 3 is newer, but perhaps you prefer the 2 because it is more documented) which uses the tag. You can test them.



    https://www.dokuwiki.org/plugin:code2


    https://www.dokuwiki.org/plugin:code3

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Great. I think that an explicit tag is a better approach however because not everybody wants or needs highlighting.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    I get doubled line breaks when I copy a script from sxh. Better than no line breaks, but not perfect…

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Hmm, with chrome I also get double line breaks.


    But with Firefox it works perfect (yay! Firefox! )

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Maybe we can add a “copy to clipboard” button.

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Tried with opera, working fine.


    It seems like it’s a chrome problem

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Don’t expect me to have a look at the plugin code, I am not a fan of web technologies…

    ]]>

  11. Anonymous says:

    < ![CDATA[

    I think in the config you can enable it. Let me check…



    …nop. Or at least it doesn’t say anything.


    But the code3 (link abobe) has it, perhaps it’s better…

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *