Search

If you’re having trouble with GitHub, I think it is possible to edit and commit files in the GitHub interface directly.

WMD Editor updated to version 1.0.2 on 24th of May 2010

Still need to remove that trailling comma, it is an illegal character according to my Komodo IDE…

But then again, it is an over zealous app!

WMD Editor updated to version 1.0.3 on 24th of May 2010

Doug, I’m trying to get the updates from GitHub, but the version number is still at 1.0.1 with none of the alterations discussed…

Am I doing something wrong? I can manually do it for now, just thought I’d give you a heads up…

No, GitHub is not up to date. The latest version must be downloaded from the Symphony Extensions section.

I’m having trouble updating GitHub. I’m getting to the point where I might just trash the entire repository and create a new one.

Right, I got tired of trying to get GitHub to work and getting nothing but nonsensical error messages in return so I cheated and deleted the repository and added it again.

You can find it here: http://github.com/dougoftheabaci/Symphony-WMD-Editor

It should be the same URL but I’m letting everyone know just in case. The version on GitHub is now the same as the version on Symphony.

Sooper! I did it manually in the end.

I know this extension is to mimic the editor in Symphony Forum, but is there any chance that it could be made to add buttons for headings also? I can understand why they aren’t used in the forum, but a Symphony install might want to apply headings into textareas (like me)…

Just a thought.

Headings are the third button in the third group. The thick blue line over the thin black lines (on the forum as well as on my extension).

To be honest, the one thing I think this extension is really mission is tables. Unfortunately, I don’t think Markdown does tables.

Markdown Extra does tables.

Is that currently available in the Markdown extension?

There’s Smartypants too, although I don’t know what it does yet, not read up on it…

As for the headings… Doh!

Is that currently available in the Markdown extension?

In the latest version (1.11) there is the Markdown Extra option. If I remember right Markdown Extra was always available but sometimes not named accordingly.

(Edited.)

Right, so I’ve taken my modified version of the WMD Editor extension and grabbed the Experimental branch of the Markdown extension and installed them both in a local version of the Symphony 3.0.0 Beta.

My extension is accepted and installs just fine, but does not appear to add the necessary CSS and JS file to the header.

My extension.driver.php file looks like this:

<?php

    class Extension_WMD_Editor implements iExtension {
        public function about() {
            return (object)array(
                'name'          => 'WMD Editor',
                'version'       => '1.1.0',
                'release-date'  => '2010-06-14',
                'author'        => (object)array(
                    'name'          => 'Doug Stewart',
                    'website'       => 'http://designbyadmiral.com/',
                    'email'         => 'doug@designbyadmiral.com'
                ),
                'description'   => 'Adds a WMD Editor to every textarea field on every entry page.',
                'type'          => array(
                    'Field'
                ),
            );
        }

        protected static $addedPublishHeaders = false;

        public function addPublishHeaders($page) {
            if ($page and !self::$addedPublishHeaders) {
                $page->insertNodeIntoHead($page->createStylesheetElement(URL . '/extensions/wmdeditor/assets/wmdeditor.css'));
                $page->insertNodeIntoHead($page->createScriptElement(URL . '/extensions/wmdeditor/assets/jquery.wmd.min.js'));
                $page->insertNodeIntoHead($page->createScriptElement(URL . '/extensions/wmdeditor/assets/jquery.wmd.function.js'));

                self::$addedPublishHeaders = true;
            }
        }
    }

    return 'Extension_WMD_Editor';

The odd thing is I’ve seen a different extension do exactly this and it works just fine. Since PHP isn’t exactly my strength I was hoping someone might know what it is I’m doing wrong.

This is the only file I’ve yet changed in my extension.

This is a really useful extension. I’ve run into a slight issue though on my install of 2.07 – the WMD editor doesn’t show initially on the back-end until I click the ‘save changes’ button then it shows. Has anyone else run into this issue? I am running it alongside the ‘Static Section’ and ‘Character Counter Text Input’ extensions so I’m not sure if this has something to do with it.

Sounds a bit like a JavaScript error. Are there any JS errors in Firebugs or similar console?

There is an error from admin.js (line 46)

string is undefined: string = string.replace(‘{$’ + index + ‘}’, value);

This is an old bug in 2.0.7. You can either apply the patch or re-download 2.0.7 or update to 2.0.8RC3.

Hmm ok I just pulled 2.07 from Github so I thought it would be pretty up-to-date. I’ll try 2.08, thanks for the tip

Hmm ok I just pulled 2.07 from Github

Probably the tag means “2.0.7, first try”. :-)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details