Add editor: CodePress

tylor - June 24, 2008 - 19:21
Project:Wysiwyg
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Description

I hacked together a working piece of code for the CodePress editor using a stub found here. It's major features are HMTL, PHP, CSS, and JS syntax highlighting, autocomplete, line numbering, and code snippets.

I would like to integrate this with Wysiwyg and since this is new code I was wondering what the best approach would be. Should I create a new project or would you be open to having it reside within this project?

I've attached my working code for people to take a look. Basically install, enable, discover a text area (eg. go to node/add/page), then set the syntax at admin/settings/codepress. Code snippets are triggered by typing something like 'img' and hitting tab.

Hopefully this can find a good home as I think it is a great editor for savvy users.

AttachmentSize
codepress.zip70.53 KB

#1

tylor - June 24, 2008 - 19:22

#2

sun - June 24, 2008 - 23:33
Title:CodePress plugin» CodePress editor

Wysiwyg Editor module still needs some abstraction to support multiple editors. However, when that is implemented, supporting CodePress would be interesting.

Additionally, I want you to point to the first paragraph in http://cvs.drupal.org/viewvc.py/drupal/contributions/sandbox/jjeff/codep... -- the code of CodePress itself is LGPL and thus, incompatible with d.o's CVS policies. It cannot be committed to drupal.org. (however, the editor integration code can)

#3

tylor - June 25, 2008 - 18:51
Status:active» postponed

Thanks for the quick response sun, I will be on the lookout for updates to Wysiwyg Editor. I noticed the LGPL license as well and will consider it carefully.

#4

sun - September 4, 2008 - 16:41
Category:support request» feature request

#5

tylor - December 18, 2008 - 12:21
Status:postponed» needs review

Took some time tonight and put together integration for CodePress — everything seems to be working great. Both integration files wrapped up in a zip: /editors/codepress.inc and /editors/js/codepress_editor.js

Hoping it all works well!

AttachmentSize
codepress.zip 3.04 KB

#6

sun - December 18, 2008 - 15:18

I'd like to test it, but http://codepress.org/ seems to be down (at least for me)...

#7

tylor - December 18, 2008 - 20:21

Ya I noticed that too, maybe not a good sign for the Codepress project...

The code is still hosted at SourceForge (I linked to this in the module for the download): http://sourceforge.net/project/platformdownload.php?group_id=186981

#8

tylor - December 18, 2008 - 20:42

Was also looking at some other syntax highlighted editors that seem more active:

#9

tylor - December 18, 2008 - 21:45
Version:5.x-1.x-dev» 6.x-1.x-dev

#10

sun - December 18, 2008 - 23:32

Oh well. This editor is pretty lame. Anyway, rewrote it from scratch.

However, one needs to comment out the following two lines at the bottom of codepress.js:

if(window.attachEvent) window.attachEvent('onload',CodePress.run);
else window.addEventListener('DOMContentLoaded',CodePress.run,false);

AttachmentSize
wysiwyg-HEAD.codepress.patch 5.09 KB

#11

sun - December 18, 2008 - 23:33

And yes, there are also other options (to be dealt with in separate issues)...

http://marijn.haverbeke.nl/codemirror/
http://los.php5.cz/simple-codearea/
http://www.cdolivet.net/index.php?page=editArea

#12

sun - January 22, 2009 - 12:37
Title:CodePress editor» Add CodePress editor support
Status:needs review» postponed

To get this feature in, someone needs to convince the authors/maintainers of CodePress to remove the offending lines I mentioned in #10. This means, someone has to step up and create an issue in their tracker or communicate with them in other ways.

Marking as postponed until that happened.

#13

sun - March 29, 2009 - 07:29
Title:Add CodePress editor support» Add editor: CodePress
 
 

Drupal is a registered trademark of Dries Buytaert.