Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter Chuckie

    (@ajtruckle)

    Update:

    I changed to a plug in CodeColorer:

    https://kpumuk.info/projects/wordpress-plugins/codecolorer/#faq

    If I use the syntax outside a table it is fine. But in a table cell it is not:

    https://blog.publictalksoftware.co.uk/2017/10/10/changes-to-the-midweek-editor-from-january-2018/

    Is this issue with your plugin or codecolorer?

    Hi! I don’t see an example of a CodeColorer snippet in a table cell on that page. Did you remove it or am I missing something?

    Thread Starter Chuckie

    (@ajtruckle)

    Look at it now.

    1. Everytime I update my post the code is reformatting and I am losing new lines. This could be a markdown plug I am using. I will try to disable tomorrow to test.

    2. The code snippet is the same in the table and in the post. One works and one doesn’t.

    Are you using a plugin to insert tables? Tablepress maybe? I have never tested it…

    Thank you for reporting. I see couple issues with highlighting, which are XML specific (closing tag has a different color), line highlighting for solarized-dark (too bright yellow), and this issue with a table. Will check all of those.

    Anything else I am missing?

    Thread Starter Chuckie

    (@ajtruckle)

    I think that was it. And yes it is in tablepress

    Alright, I have released CodeColorer 0.9.12 with support for TablePress. Could you try it?

    Thread Starter Chuckie

    (@ajtruckle)

    Thanks for looking so quickly. ?? Things much better!

    Two questions:

    Firstly, I tried to set the code block to use the full width in the cell so that it did not bleed. I tried using settings. The notes refer to percent suffix but it insisted on me just putting in whole integers and no suffix. That an issue? In the end I reduced the value as 300 which looks ok to me but is there a better/ safer way?

    Secondly, I notice that the code in the table now has a lot of br codes which should not be there. When I get back from my first job I will try putting the code in again. But in your tests was it ok? Should I be able to get that to work properly?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi everybody!

    Good to see that there’s already a good discussion going on here!

    If you guys find that anything needs to be changed in TablePress, please let me know.

    Regarding those linebreaks: These might be coming from TablePress. To remove them, please try using this modified Shortcode on that page:

    [table id=123 convert_line_breaks=false /]
    

    (with the correct table ID).

    Regards,
    Tobias

    Thread Starter Chuckie

    (@ajtruckle)

    Thanks for your help and we are making progress friends.

    I have added the convert_line_breaks call. In addition, I had to deactivate my WP-Markdown plugin because everytime I updated my native post the formatting was changing. Maybe there is a way to handle that but it is outside the scope of this conversation.

    These are my findings:

    On my PC it looks good:

    https://www.dropbox.com/s/w3pium73waxzcpk/IMG_0656_PC.JPG?dl=0

    But on my iPad:

    https://www.dropbox.com/s/6r9gdjdj4jpcsx9/IMG_0654_IPad.JPG?dl=0

    And on my iPhone:

    https://www.dropbox.com/s/uejjlj3dlgemguh/IMG_0655_IPhone.PNG?dl=0

    I see two problems:

    1. Why is the colouring of the code inside the table not the same? It is on the PC but not on the mobile devices.

    2. Even though I have specifically used width=”100%” in the code , it has pushed the width out. I except I have to compromise. I am not a web guru so I don’t know what is excepted behaviour across devices. Thoughts?

    The only other issue so far is on the preview page where the post is listed at the top. It looks like this:

    https://www.dropbox.com/s/qim5nbufqaofxw7/Preview.jpg?dl=0

    Bit messy. ??

    Finally, having removed the code image from the post, I can’t work out how to have a gap between the text and the code.

    • This reply was modified 7 years, 4 months ago by Chuckie.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    unfortunately, I don’t know the Code plugin well enough to be able to help with that, sorry.

    As for the preview page: That now is is a theme thing. Your there apparently isn’t showing the full page content there, but only an automatically created excerpt (i.e. short version) of the content, and this never has full styling.

    Regards,
    Tobias

    Thread Starter Chuckie

    (@ajtruckle)

    Thanks Tobias. I await comments from Dmytro … ?? Knock this on the head!

    Thread Starter Chuckie

    (@ajtruckle)

    Tobias, I do have a problem related to TablePress. If I use convert_line_breaks=false then it strips out ALL of my places where I want blank lines through the whole post.

    But if I remove that flag then the code will start to show the br tags again. ??

    I need to be able to show new lines not not that the br tags in the code block.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    that’s indeed the dilemma here. For not having the <br /> tags, adding the Shortcode parameter is the only way.

    But for adding the new lines, you now have an extra manual way: Just add a <br /> tag in the desired places.

    (As you can see, we might be reaching a point where using a table for layout purposes is no longer a good thing.)

    Regards,
    Tobias

    Thread Starter Chuckie

    (@ajtruckle)

    Great! I did that Tobias. I have removed the rows from the table and added them directly to the post and now all is good on both the PC and the iPad. I assume the iPhone too. ??

    Fantastic! I await for Dmytro to offer any comments before this is closed.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Displaying code’ is closed to new replies.