Question By
Solved

How to add <code> format to text in Chatter

Solved
iambuxer

Feb 22nd, 2018 05:40 PM

Hi.

How can we add the < code> format to text we type in posts?

Example:

https://i.imgur.com/Jg1w5Vu.png

And can we have a button for it in the editor? https://i.imgur.com/vnGVr3M.png

Thanks.

mark

Feb 27th, 2018 07:05 AM

If I am not wrong, then this is TinyMCE, and more buttons/plugins can be added using JS. Haven't played with it for a while, but take a look at their documentation.

iambuxer

Feb 27th, 2018 12:53 PM

@mark oh sorry I didn't mean to add it myself because I don't have the product but I meant to type here in this forum.

There are posts I need to type code in my replies but I don't know how to do it. I've seen you doing it as well.

How do you do it? < code> isn't working for me

iambuxer

Feb 27th, 2018 12:59 PM

This is what I mean look. You did the text red and code:

How to do the text red and code?

mark

Feb 28th, 2018 08:03 AM

Ahhh.

Well, I just write the markdown for writing code:

Example from above:

... and run `php application/artisan migrate --force --seed`. or...

Also, you can do block codes like this: prntscr.com/iksn64z

mark

Feb 28th, 2018 08:03 AM

Best Answer

Wrong link: https://prnt.sc/iksn64

iambuxer

Feb 28th, 2018 10:25 AM

<?php echo "Test"; ?>
/* comment */
<!-- comment -->

That's awesome, thanks Mark!