Powered by EverLive.net
Welcome, Guest
Username: Password: Remember me
Script Code Highlighter Topics
  • Page:
  • 1
  • 2

TOPIC: Plain text, no syntax color

Plain text, no syntax color 6 years 9 months ago #196

  • Siceo
  • Siceo's Avatar
  • Offline
  • New Member
  • Posts: 4
  • Karma: 0
The problem is not about the button. I do not need the button, though the button works with RokPad too.

I've added the code manually this is why I use RokPad to edit everything in code view. Please see screenshot: take.ms/YX3Jo . As you see the syntax is correct but the plugin doesn't have coloring syntax in front-end.
The administrator has disabled public write access.

Plain text, no syntax color 6 years 3 months ago #251

  • agguro
  • agguro's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Hello, the problem lies in the fact that the plugin/module for syntax highlighting and tiny MCE doesn't work when a CRLF code is detected. When I use </ br> instead of CRLF for a new line, the highlighting works, if I omit to change the linebreak or new line to </ br> the highlighting doesn't work (joomla 3.6). Also & doesn't show up as & not even with & (in a comment for asm programs).
Linenumbering works but isn't quit wel shown when the linenumbers exceeds 3 digits (aka 100 and further) but that must be a template issue (protostar).
The administrator has disabled public write access.

Plain text, no syntax color 6 years 3 months ago #252

  • agguro
  • agguro's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
Perhaps I found a solution for joomla 3.6. I've replaced one line in edit.php (directory /components/com_scriptcodehighlighter/views/scriptcodehighlighter/tmpl/edit.php) line 73.
I've changed it this way:
// return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2');
return (str + '').replace((\r\n|\n\r|\r|\n)/g, '$1' + '<br />+ '$2');
and now it works when I press enter after each line. I will try it again with the previous (original) return operation but for the moment I'm a happy guy :)
The administrator has disabled public write access.

Plain text, no syntax color 6 years 3 months ago #253

  • agguro
  • agguro's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
my last update:
changed:
return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2');
to:
return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + '<br />' + '$2');

I still need to press enter behind each line when I copy paste code in tinyMC but the code highlighting works.
The administrator has disabled public write access.

Plain text, no syntax color 6 years 3 months ago #254

  • sweta
  • sweta's Avatar
  • Offline
  • Administrator
  • Posts: 111
  • Thank you received: 6
  • Karma: 0
Thanks for that update. i was busy with some other projects and as this was working for some users and i was not able to replicate the issue so I was helpless. I now understand it and will try to improve upon it. thanks.
agguro wrote:
my last update:
changed:
return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2');
to:
return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + '<br />' + '$2');

I still need to press enter behind each line when I copy paste code in tinyMC but the code highlighting works.
Joomla Extensions Directory Listings

extensions.joomla.org/profile/profile/details/176905
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.106 seconds
Powered by Kunena Forum