Recent Topics

[HACK 2.4.2] Testing WMD: The Wysiwym Markdown Editor

Started by on Jun 01, 2008 – Contents updated: Jun 01, 2008

Jun 01, 2008 04:36    

Want a simple editor for your Comments?

It doesn't come much easier than this....
[URL=http://wow-factor.com/index.php/testing-wmd-the-wysiwym-markdown-editor]WMD: The WYSIWYM Markdown Editor[/URL]
Two simple links to JS and you have a toolbar and a live preview of your post.
Check out the [url=http://wmd-editor.com/demo]WMD Demo[/url]

If your happy with it and sign up at WMD then this is what I did to the core files. ( Note: my installation was the Basic version )

1. for live comment preview
_item_comment_form.inc.php

Find ( at the bottom of the file )

PHP

echo '</div>';
    $Form->end_fieldset();
    ?>

and change to

PHP

echo '<div class="wmd-preview"></div></div>';
    $Form->end_fieldset();
    ?>

2. JS link.
_html_footer.inc.php

Find ( at the bottom of the file )

PHP

<!-- End of skin_wrapper -->
</div>
</body>
</html>

and change to

PHP

<!-- End of skin_wrapper -->
</div>
<script type="text/javascript" src="http://box5.wmd-editor.com/1725/wmd.js"></script>
</body>
</html>

Jun 01, 2008 05:10

Ok, the problem is that Markdown doesn't seem to be recognised in the Comments section.

Can this be achieved, as it is in the Write screen?

It also requires that Auto Br be off.

Jun 01, 2008 07:27

You appear to have got it working?

¥

Jun 01, 2008 08:21

Auto br and Auto p is the big problem.!!

Jun 01, 2008 08:29

You can easily disable autobr in conf/_formatting.php ;)

¥

Jun 01, 2008 10:36

OK, if Auto P and Auto Br are dissabled it seems to work fine.


Form is loading...

Secure CMS – This forum is powered by b2evolution CMS, a complete engine for your website.