Login | Sign up | Toll-Free: 1-800-752-0455
 
 

Forum

 

7 posts by 3 authors in: Forums > CMS Builder
Last Post: October 16, 2017

Up to one of the next things I am moving from WP to cmsb.... Code Snippets I am pretty sure that the TinyMCE has 'Code Syntax' capability but how can I enable this for a field .. or have the field set as 'Language' with Text that then is shown properly.

Thanks
Larry

---
<? Larry >
Coding since 1973

Hi,

Are you referring to this TinyMCE Code Sample plugin?
https://www.tinymce.com/docs/plugins/codesample/

---------------------------------------------------
Cheers,
Damon Edis
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Probably ... outside I use the one by Alex Gorbatchev, I would go and make whatever changes are required but as with settings in the top of plugin files they are lost on the next update.

Larry

---
<? Larry >
Coding since 1973

Hi Larry, 

Can you give more details on what you're trying to do?  We made an "Insert Programming Code" button for the forum.  We're still running TinyMCE 3 for the forum.  So we need to upgrade to TinyMCE 4 at some point and have a look what code snippet options there are.  Is what you're looking for a plugin for TinyMCE 4 that allows you to display programming code in a formatted way? 

Dave Edis - Senior Developer
interactivetools.com

Heya,

All that I want to do is drop code snippets into the editor and have the display with formating, my wp section https://jenolan.org/wp/code-snippets/

Larry

---
<? Larry >
Coding since 1973

Hi Larry, 

Yea, I just tried it.  That's pretty much what it does.  It uses this library: http://prismjs.com/

I just added "codesample" to the plugins and toolbar config lines as per the instructions here: https://www.tinymce.com/docs/plugins/codesample/ and it worked right away.  Just save your wysiwyg.php as wysiwyg_custom.php to prevent it from getting overwritten when you upgrade.

Hope that helps!  We'll probably switch to this plugin when we update the forum WYSIWYG.

Dave Edis - Senior Developer
interactivetools.com

G'day, done and dusted.....

Also for forum you need a 'mark as read' to clear the new post indicator ;-)

---
<? Larry >
Coding since 1973