You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

  1. wicko
  2. JCE Editor
  3. Wednesday, 04 December 2019
How can you add a code option to your editor to allow you to add blocks of code that are visible to the reader? Like you have here in this forum editor.

So I can display the code like this


<img src=“/images/myimage.jpg”/>


regards

David
Accepted Answer Pending Moderation
ok I have managed to do this with RokCandy. Not as easy as I would have liked.

After installing RokCandy you get the option to add RokCandy script via a button at the bottom of your browser.

You need to use html entity names for brackets.

So to display code to look like this

<img src=“/images/myimage.jpg”/>

you need to edit between the rokcandy square brakets and change the greater or less than brackets to their entity equivelant.
  1. more than a month ago
  2. JCE Editor
  3. # 1
Accepted Answer Pending Moderation
Please try this JCE plugin - https://github.com/widgetfactory/jce-editor-codesample - which you can download here - https://github.com/widgetfactory/jce-editor-codesample/releases/tag/1.0.3

This will allow you to insert various types of code into the editor, which will be highlighted and styled using the Prism library - https://prismjs.com/

https://cdn.joomlacontenteditor.net/tmp/102023-adding-code-markup-to-jce-editor.gif

You will probably need to install this library so your code can be styled in the front-end. A plugin is available for this too - https://github.com/widgetfactory/wf-prism
Just because you're not paranoid doesn't mean everybody isn't out to get you.
  1. more than a month ago
  2. JCE Editor
  3. # 2
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!