This won’t work on production server with no domain assigned yet and a default subfolder like http://www.example.com/~client. The CSS will be included from www.example.com/ instead of www.example.com/~client/.
I’ve seen this in many extensions, the simple solution to this is not to include the files (js, css or whatever) from the “root /” plus system folder, but to include the site_url before the system folder. That way, the site_url setting in your CP will be taken into account.
One problem I had though was that the preview of markitup was not showing the text properly e.g. with no formatting, saving the entry into the database was fine and textile plugin displayed everything nicely.
I do note on the Markitup page that the preview doesn’t currently work. You need to specify a preview parser path in each set.js file - and I hadn’t even toyed with that yet. It’s the second line down:
previewParserPath: '', // path to your Textile parser
I did also recommend just turning off the Preview. Note that I THINK the preview works for XHTML. You may only have to specify the path to the Textile plugin here…I’m not sure. If you experiment and find something out about it, I’d love to hear it.
Also, if anyone knows how to fix making multiple-line lists with one click (like you can in the Textile Editor Helper (that’s a different extension) I’d love to incorporate that - but it may just be a shortcoming of Markitup right now).
ADD: I will fix that System folder path issue, too. I know exactly what you mean. The way most exteensions are written that include files, they wouldn’t even work with a masked control panel. Thanks for pointing it out.
Awesome, many thanks for this, am testing it out on a new EE-site. Cheers!
edit-add: works like a charm, this makes Markdown even easier to use for end users.
One tip: if you want to disable a button (say H1 and H2 are already are taken in your template), the easiest way is to set the display to none in the style.css file inside your set folder.
For example: disabling the preview button…
Change:
.markItUp .preview a { background-image:url(images/preview.png); }
to
.markItUp .preview a { display: none; }
This way you don’t have to mess around in the JS file.
Cried victory too soon I’m afraid.
Markdown won’t render links and images properly.
For example:
[Your text to link here...](http://www.apple.be "Apple website")
renders in HTML as:
<p><a href="a href=" title="http://www.apple.be">http://www.apple.be</a> "dsadadasdas">Your text to link here...</a></p>
In a non Markitup field set to formatting to Markdown I get the same error, which leads me to believe the Markdown plugin is doing something wrong… I’m baffled, any suggestions?
If you are getting the same error, I would assume it is due to the Markdown plugin itself. As I don’t use Markdown, I can’t speak to this. Any Markdown users know about this?
If you are getting the same error, I would assume it is due to the Markdown plugin itself. As I don’t use Markdown, I can’t speak to this. Any Markdown users know about this?
On a positive note, I tested the Textile version on the same site and that one works flawlessly. I posted a request for help with the Markdown plugin in the plugin forum as well.
If you are getting the same error, I would assume it is due to the Markdown plugin itself. As I don’t use Markdown, I can’t speak to this. Any Markdown users know about this?
Disabling Automatically turn URLs and email addresses into links? in CP Home › Admin › Weblog Administration › Weblog Management › Edit Weblog solves the Markdown problem. That one is sorted then
For those still having trouble getting this to work - I was having the same problem and realized it was because I’m masking access to the control panel using /admin.php
It’s throwing off the path somehow. Try accessing your CP using the actual system folder like:
http://www.domain.com/system/
Hope that helps someone. If any figures out how to enable the preview please share!
P.S. This is one of the the most useful extensions out there. Great work!!!
Ok here’s how to set up the preview with markdown (should be similar for textile, others):
I created a file called ‘preview.php’ and placed it in the markitup root folder(system/extesions/markitup/preview.php). I also got a copy of markdown.php, and also put it in the markitup root.
Contents of preview.php:
<?php
include_once "markdown.php"; $my_text = $_POST['data']; //'data' is the default post variable markitup sends the data in. $my_html = Markdown($my_text); echo($my_html);
?>
Then in your ‘set’ file (system/extesions/markitup/sets/markdown/set.js) in the first few lines of code, add the previewParserPath and previewAutorefresh settings:
Wow, nice work on that; thanks for sharing your findings on the preview.
I’m a little surprised at the trouble with the masked CP - I almost always use a masked CP, so I generally try to make sure things work that way. If I ever get time to revisit it, I’ll see what’s up.
Oh, ha, I just reread an earlier post where I mention that I’ll update the System folder issue. This thing DOES have version checking built-in, so you should know when a new version is out if you have that feature enabled.
Hi there-
I’m very thankful that there are really good programmers in the world like you all. I’m, unfortunately, not one of them. I’ve installed the markitup files with the textile set and in the publish or edit modes the textile markitup shows up in the fields I’ve set them up with…which is great!
But when I go to use it the output I get is not good. what happens is if I type in a header style (h1, for example) it perpetuates throughout the whole posting. paragraph tags never appear and only the first styling shows up (with the exception of inline items like <strong> or <em> - they all show up fine).
Am I doing something wrong to get these effects? I know e-man said that he got textile to work flawlessly, but I’m not having the same luck. Any help would be appreciated!
You have a the field formatting on your custom field set to textile? That is, after having installed the textile plugin, which is entirely different than the textile set for Markitup.
You installed the “tweaked” Textile plugin that I included with the extension files?
Wait a sec - you use textile much? Are you sure you have an empty line after your h1?! And between your paragraphs?
I’m trying to get this extension to work on a production server within a folder root. I’ve been successful in getting it to run on a normal live site (www.livinghopeineugene.com), but this site - with the same installation procedures it just doesn’t work.
I’m more of a designer than a developer, but I believe that what I’ve read above suggests that there are problems when attempting to install on a production server within a folder. Does anyone have any advice on how to get this up and running in such a scenario…or am I even barking up the right tree?
I have been really liking using Textile for quick post entries. It makes it just SO much simpler.
Okay, I found that when entering links like so renders just fine:
http://somesite.com
But the following causes a small error:
"Link Text":http://somesite.com
What I mean is, for instance, on other parts of my site (and also one of my favorites, Boyink!), links would render as:
http://www.boyink.com/splaat?URL=http://somesite.com
-OR-
http://organizedfellow.com/?URL=http://somesite.com
Mine do too, except when parsed like:
"Link Text":http://somesite.com
http://somesite.com renders as http://somesite.com and not http://organizedfellow.com/?URL=http://somesite.com