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. navigatum
  2. JCE Editor
  3. Monday, 04 February 2019
OK so seeing as you guys pointed me in exactly the right direction last time I figured I'd have a go at some of other things I have banged my head against unsuccessfully a few items as they are also in a very similar space, may be JCE function or plug in for JCE even or may be out of scope and I need to look elsewhere etc.

So, the first one is something along the lines of a read-only inline editor. The idea being that people (and we are not programmers so don't use programming tools) will post snippets of code to do certain things in linux shell or windows shell etc. but there will often be variables that need to change when you run the commands. At the moment we copy/paste into notepad, amend variables then run in server.

My idea to improve on this would be along the lines of those inline editors out there for Joomla if we could (without going into edit mode but maybe clicking a different button if needed) edit the variables in the code sample on the page as you see it then copy that amended command out to be used and of course those changes should not be saved to the article as they are one off for where ever it is being used etc. Does that make sense?

Here is a shot of one of the code samples I am talking about, the arrow pointing to some variables that need to change every time you use the code somewhere (I'd love to figure out syntax highlighting and adding scrollbars instead of wrapping maybe, just running on limited time as side project so those are lower on the list..)

Program_Manager_2019-02-04_12-51-08.png

As always thanks for any help or tips you can provide, if I can do this in JCE or it might be future feature awesome, if I have to add some other thing thats fine I'll go figure that out but obviously in respect to JCE we won't talk about other editors in their own right I do not wish to change anything about how JCE is setup in site for normal use.
Attachments (1)
Accepted Answer Pending Moderation
Here is a shot of one of the code samples I am talking about, the arrow pointing to some variables that need to change every time you use the code somewhere (I'd love to figure out syntax highlighting and adding scrollbars instead of wrapping maybe, just running on limited time as side project so those are lower on the list..)


How are you formatting these code samples? Are you using the <pre> or <code> tags?
Just because you're not paranoid doesn't mean everybody isn't out to get you.
  1. 2 weeks ago
  2. JCE Editor
  3. # 1
Accepted Answer Pending Moderation
Was originally using <code> but I've had some time recently to add the CSS classes for syntax highlighting on <pre> so encouraging users to move in that direction. That screenshot was code though.

I can happily go either way though if it makes something work.
  1. 6 days ago
  2. JCE Editor
  3. # 2
Accepted Answer Pending Moderation
You can use the contenteditable attribute on the <pre> tag to make it editable for the visitor, but without the edit being saved, eg:


<pre class="bash" contenteditable="true">
Some code here...
</pre>


You can use the Custom Styles widget to create a Pre style that includes the contenteditable attribute, which can be accessed from the Styles list in the editor toolbar. See - https://www.joomlacontenteditor.net/support/tutorials/editor/creating-custom-styles

Here is a screenshot of an example setup. For this example, I will assume there is a "bash" class that styles the pre content.

https://cdn.joomlacontenteditor.net/tmp/98118-inline-read-only-editing-in-the-front-end.jpg
Just because you're not paranoid doesn't mean everybody isn't out to get you.
  1. 6 days ago
  2. JCE Editor
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.