I just quickly tried Markitup with the jQuery file shipped with jQuery update (jQuery 1.1.2) and Markitup seemed to work fine. That should make a Drupal 5 port fairly trivial.

Btw, I've been playing with a skin that could be shipped with this module: http://perifer.se/labs/markitup/

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mlsamuelson’s picture

fajerstarter,

I'll be focusing on getting the D6 version of the module solid, but then would be happy to turn my attention to a D5 port (which would mean I could actually use it in some of my own sites :) ). Thanks for letting me know the results of your testing.

I like the skin you've done and would be happy to consider it for inclusion. It has the proper universalness that one would want from such a skin which has the potential to be used in many different sites with many different designs. And it's attractive, too.

jaydub’s picture

Status: Active » Needs review
FileSize
3.87 KB
115 bytes

As it turns out long ago I had a semi-working version of the original
jTagEditor that Markitup was based on but I never was able to
complete it and the developer of what is now Markitup never released
any follow up code to jTagEditor...

So what that means is that I can help out a bit perhaps in hacking
out additional features to the Drupal module of markitup.

As a start, attached are a quick and dirty (but working) port of the
code in CVS to Drupal 5

The files say .patch but they aren't patch files. You just can only upload
files with certain extensions on drupal.org.

Liam McDermott’s picture

Status: Needs review » Needs work

Hmmm, had a go at getting this working. Seems some of the filenames have changed in the latest markitup! though:

<style type="text/css" media="all">@import ">snip</markitup/markitup/skins/simple/markitup-skin-style.css";</style>
<style type="text/css" media="all">@import ">snip</markitup/markitup/sets/default/markitup-set-style.css";</style>
<style type="text/css" media="all">@import ">snip</markitup/markitup.css";</style>

These are now:

<style type="text/css" media="all">@import ">snip</markitup/markitup/skins/simple/style.css";</style>
<style type="text/css" media="all">@import ">snip</markitup/markitup/sets/default/style.css";</style>

And:

<style type="text/css" media="all">@import ">snip</markitup/markitup.css";</style>

Doesn't seem to exist anymore! :S

I fiddled and fumed with the filenames a bit and got it working, after a fashion. :)

mlsamuelson’s picture

The drupal_get_css function doesn't like stylesheets with similar names, and the code comments for that function even tell a person to prefix each stylesheet with the module's name to avoid collisions.

With markItUp we have 3 stylesheets:
1. for the module itself - markitup.css
2. for the currently active set - markitup/sets/[setname]/markitup-set-style.css
3. for the currently active skin - markitup/skins/[skinname]/markitup-skin-style.css

Sets and skins for markItUp! come with style.css as the name on each file. That causes a collision in names betweeen css files. To circumvent this, when a new skin or style is added, one should make a copy of that style.css and prepend markitup-set- or markitup-style- to the css filename. This practice also affords us the opportunity to tweak that skin or set style to integrate with Drupal better, while also keeping the original style.css available for reference.

This is all in the README.txt, and for the skins and sets that come with the module, the work is already done.

Thats the backstory. The real issue here is getting markItUp to work with Drupal 5... Liam, does the above info help you clear up your difficulties?

I also wanted to let everyone know that I don't plan on investing much time in the Drupal 5 port until the Drupal 6 version is ready for beta. I hope to get there soon enough, though!

mlsamuelson

Liam McDermott’s picture

Ah, I see what you've done there. I just grabbed jaydub's files and a copy of markitup! so didn't even see the readme. Normally third-party code is restricted from Drupal's CVS, so I wasn't expecting there to be a version in the tarball! :D

You might want to add something about the reason for including third-party code in the README (it's a valid reason to my mind), or on the project page, better do this than incur the wrath of a CVS admin. :)

Checking this module out from CVS, then overwriting the .module and .info files with the ones provided by Jaydub worked very well. One minor gripe: using the default Garland theme, bullet points are still visible under the editor's buttons. Should be easy to get rid of these with a background: CSS declaration.

Liam McDermott’s picture

Status: Needs work » Reviewed & tested by the community

This is ready for a five branch commit IMO. Although, it's up to you mlsamuelson whether you do this now or later of course. :)

anders.fajerson’s picture

Status: Reviewed & tested by the community » Needs work

I haven't tested this yet, but I agree with mlsamuelson that it's probably best to wait for the D6 branch to mature a bit.

The info file needs to specify jQuery update as a dependency (if it is) and "package = other" should be removed.

Liam McDermott’s picture

Status: Needs work » Needs review
FileSize
4.02 KB
4.02 KB

Here's a patch (it's an actual patch this time) for five compatibility. I hope to keep it reasonably concurrent with whatever's in CVS until mlsamuelson is happy to start work on a five branch.

If it needs a re-roll at any point, update this issue. The patch should be applied from the markitup directory (and only changes markitup.module at the moment).

It fixes two problems with the code in #2 (both user_access calls in places Drupal 5 can't handle them). Will update if any more are found. :)

Liam McDermott’s picture

FileSize
4.36 KB

Update to patch above, removing Javascript for the Drupal 6 teaser. Causes problems with five.

jaydub’s picture

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

Any idea on whether or not jQuery 1.2.x is really required for
Markitup? Did you notice anything amiss or are you using
1.2.x?

Liam McDermott’s picture

If I remember correctly, Jaydub, it didn't work with the older version of JQuery. Can't remember what happened for sure, think the editor might not have appeared and generated a Javascript error.

waldmeister’s picture

believe me....after this editor is hardened, Drupal 7 will be out.

I don't think we should concentrate on this...

just my 2 cent of Spam

Garrett Albright’s picture

For the record, I personally have no interest in working on a D5 version.