Jump to content

Editor Pluggability


mat206

Recommended Posts

This is a rehash of a previous request but there was never any type of response to this idea in particular. I want to show you a different path for the editor for those who actually don't want WYSIWYG. Let's call this the STD editor on steroids.

And to be clear.. this is not CKEditor but this is also a very early prototype using codemirror under the hood.

I bring this up because it's actually quite easy to plug the editor into ip.content for article editing. In fact, it's not terribly hard to replace the attachment "Add to Post" with a custom javascript solution as well. This example works fine with insertion of attachments.

It isn't so easy to do the same for the whole editor.

Features:

  • HTML-based article editing
  • Original article preservation - no translation between bbcode and html
  • Default html syntax highlighting
  • Inline syntax highlighting for code, php, xml, html, sql (just by typing the bbcode tag for each it kicks into a different highlighting mode)
  • Support for embedding attachments using the native "Add to Post" link

It's not perfect yet, but I think for some people this type of editor would work perfectly with some additional html whitelisting. I just think you should consider making the editor a choice for the community administrator.. not necessarily this editor, but alternatives in general.

post-53000-0-85727600-1360299159_thumb.p

post-53000-0-42003700-1360299174_thumb.p

Link to comment
Share on other sites

Here is the editor at work:


http://dev.gamedev.net/index.php?/page/articles.html?do=add&category=


Here is an article we formatted with it.. very quickly I might add:

http://dev.gamedev.net/index.php?/page/articles.html/_/articles/adding-realistic-rivers-to-random-terrain-r17

Another with autobreaks and a test where I used the attachment "Add to Post" button to add images.. html and bbcode are mixed.

http://dev.gamedev.net/index.php?/page/articles.html/_/articles/autobreak-r21

Link to comment
Share on other sites

From a coding standpoint they actually could abstract some of this functionality reasonably well..
The heart of it all looks like the /admin/sources/classes/editor/composite.php, which would just need to become a base class that can be overridden by some child class that would provide alternate editor functionality.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...