Hi.
Is possible used in BUEditor for better clarity syntax highlighting? If yes, how?
Thanks.

CommentFileSizeAuthor
#7 screen2.png65.93 KBdjs_core
#5 screen.png64.03 KBdjs_core

Comments

ufku’s picture

Status: Active » Closed (won't fix)

Unfortunately, not possible.

djs_core’s picture

Status: Closed (won't fix) » Active

Ok. Thanks for the info ;) I have one more question:
Is there any way to add a texarea parameter -> wrap = "off" (to turn off the automatic line break) ?

ufku’s picture

Status: Closed (won't fix) » Active

you may try white-space property of CSS
#TEXTAREA-ID {
white-space: nowrap;
}

djs_core’s picture

StatusFileSize
new64.03 KB

So it does not work :( (see attachment)

ufku’s picture

then try overflow: scroll;

djs_core’s picture

StatusFileSize
new65.93 KB

Nothing :(

ufku’s picture

sorry, can't help.

djs_core’s picture

Version: 6.x-1.3 » 6.x-1.x-dev

I found this syntax highlighter: http://marijn.haverbeke.nl/codemirror/
Here is XML/HTML example: http://marijn.haverbeke.nl/codemirror/htmltest.html

Would be possible to implement this syntax highlighter into BuEditor ?

ufku’s picture

Status: Active » Closed (won't fix)

Those are nice syntax highlighters but integrating them into BUE requires a rewrite of all editor methods. It might be done by implementing a integration layer. The result could look nice but be slower for no doubt.

ufku’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Closed (won't fix) » Fixed
shinery’s picture

Hi, I installed the Syntax Highlighter files according to the instructions in http://ufku.com/drupal/bueditor/contributions/html-syntax-highlighter but it does not work.

1. The files bue.highlight.js and bue.highlight.css were uploaded to the /.../bueditor/library/ folder.
2. The Button Code was added in the BUEditor "Buttons" as following :

js:
E.highlight(E.highlightOn ? false : 'html');
E.stayClicked(E.highlightOn).focus();

But when I pressed the button, it says:"TypeError: Object [object Object] has no method 'highlight'" in Chrome5.0.375.86 , and it says:"TypeError: E.highlight is not a function" in Firefox 3.6.6.

Is there anything wrong for the installation? Thank you very much!

shinery’s picture

Component: Miscellaneous » User interface
Status: Fixed » Active
ufku’s picture

The files in library folder are not automatically included. And also you should not put any custom library files there. Upload them anywhere web accessible and define the paths in editor settings.

shinery’s picture

Thank you ufku.
I have uploaded the bue.highlight.css file and the bue.highlight.js file to /sites/all/libraries/bueditor/. But how can I define the custom paths in Editor specific library files? I mean how to write the paths line. Should it be like:
/sites/all/libraries/bueditor/bue.highlight.js or like %sites%all/libraries/bueditor/bue.highlight.js?

ufku’s picture

Status: Active » Fixed

Specify paths relative to your drupal root like sites/all/libraries/bueditor/bue.highlight.js
You can shorten the paths by using tokens. Please read the field description for available tokens.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

doublejosh’s picture

Love this!
All work fine except I can't figure out how to turn it on initially with the code provided?

ufku’s picture

The second one is a template button. Its title must start with tpl:
Ex: tpl:Turn on highlighting initially

When the content of a template button is javascript, it is executed on editor load. When it is HTML the content is inserted in editor layout at the button position.

doublejosh’s picture

Thanks! So easy.
Just hadn't noticed the use of the "tpl" namespace within the UI.