http://codemirror.net/
If i apply the code mirror plugin to the body area, bueditor does not work any longer, error if any botton clicked.

NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLTextAreaElement.setSelectionRange

Codemirror adds an verlay like you syntax highlight for bueditor does.
Maybe there is a quick fix that you know of. If not just close. Thx for your help.

Comments

ufku’s picture

Codemirror hides the actual textarea and provides an invisible field for text input. Not sure how to make it compatibe with BUEditor.

marcoka’s picture

istn that what your highlighting plugin for bueditor does too?
meaning this: http://ufku.com/drupal/bueditor/contributions/html-syntax-highlighter

ufku’s picture

No. BUE highlighter does not hide the textarea. It just displays a colored text layer under it. With an adjustment in the opacity it feels like writing colored text in the textarea.

marcoka’s picture

in general bueditor must identify the textarea where the code is added (for example if i click on BOLD). Does it identify the textarea by css id? so changing the id? that maybe a way to make bueditor working again if codemirror is activated? what do you think?

ufku’s picture

The textarea is stored as a javascript object which in this case is not relevant. The textarea must be focusable for the buttons to work otherwise the click event of the buttons must be changed to do some other stuff like acting on code mirror UI.

marcoka’s picture

i think your system of highlighting is a better solution. i will try to make some custom highlighter for additional stuff like "{{" in blue or | in red. Like markdown highlight and simple stuff.

marcoka’s picture

Status: Active » Closed (fixed)