tags:

views:

418

answers:

1

Hi,

I am aware of quite a few different JavaScript based online text editors for WYSISYG html editing, however I am trying to find something similar for ERB Ruby templates. Essentially it would be just like the other editors, however it would not garble or encode the <%= foo.to_s %> type code blocks.

Is there anything out there which will be capable of this? I am willing to try and modify and existing JS editor if there is nothing already, so any suggestions as to which one is the nicest to work with would be much appreciated.

Thanks Amar

+1  A: 

You can use the ProtectedSource configuration option in CKeditor for this purpose:

FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ;
Edwin V.
Thanks, that does what I need it to :-)Sorry for the late reply, I really shouldn't ask a question before I go on holiday.
amarsuperstar