Search

A new extension, "Editor for Symphony" is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

This is another markdown editor, this time using the beautiful "Editor" Markdown editor (Github) by Hsiaoming Yang at lab.lepture.com.

It is in experimental phase now, but it works (only in one textarea per entry at this time)

Current Issues

  • Unable to get it to work with multiple text area instances
  • The preview button does not work.
  • The fullscreen button does not work yet.
  • Need to activate add undo and redo buttons.
  • Don't have buttons for headers yet.

Since I am absolutely horrific with Javascript. Please fork this extension, and send me pull requests. This is a really cool editor and think it would be useful to the community.

very cool!! will make editing content a lot easier for markdown noobs

@bzerangue Just last night I was looking at "Editor" and thinking it would be great for Symphony :)

If we can make the image plugin from "Editor" take values from other sections it would be a dream.
I'm thinking something like:

  • you have an images section with title, file upload and a reflection field to output the whole markdown image syntax, maybe with some jit magic
  • when you click on image in "Editor" it shows you a list of available images with thumbnails and title and when you select one it puts the reflection field output in the content

Right now I'm using subsection manager and the client must copy/paste the value.
Maybe smarter people than me can work on this

Thanks for the extension

OK, folks, I am having the darnedest time getting "Editor" to show up in multiple text area instances.

Here's the jQuery that works to apply "Editor" to one textarea...

jQuery(document).ready(function() {
    var editor = new Editor({element: jQuery.find('textarea[class*=markdown]')[0]});
    editor.render();
});

This code is selecting the first <textarea> with a class that includes markdown in it. I was told it would be best to setup an jQuery.each loop to get it to apply to all textareas that include markdown in it. Unfortunately, I've miserably failed in getting it to work. Any tips on how I can get this work?

Here is one of my feeble attempts (I'm warning you, it's bad)...

jQuery(document).ready(function() {
    var editor = new Editor({element: jQuery.find('textarea[class*=markdown]')});

    $.each(editor, function(index, value){
        var editors = $(this)[index];
        editors.render();
    )};
});

I know this is wrong... but would love some assistance so I can get this thing to work.

Thanks again for y'alls help.

It might not be your code Brian. Sometimes jQuery plugins just aren't coded to work with more than one instance per page.

That being said, try this

(function($) {
    $(document).ready(function () {
        $('textarea[class*=markdown]').each(function () {
            var textarea = $(this),
                editor = new Editor({
                    element: textarea
                });

            editor.render();
        });
    });
}(window.jQuery));

@designermonkey. Thanks for the input, unfortunately, that didn't seem to work, either.

@bzerangue sent you a pullrequest

@iwyg - Thank you so very much!!!! That worked perfectly. I have pulled your pull request and also updated the extension.

Current Issues

  • Unable to get it to work with multiple text area instances
  • The preview button does not work.
  • The fullscreen button does not work for Safari.
  • Need to activate add undo and redo buttons.
  • Don't have buttons for headers yet.

Editor for Symphony updated to version 0.2 on 16th of September 2013

@bzerangue you're welcome. There's a typo on the error exception message (my bad), you may want't to fix this as well :)

@iwyg - fixed typo. Thanks.

coolio

I guess that little "eye" icon is supposed to work as preview? Seems not to work (on chrome at least)

It doesn't work. If you pull down the latest, I've hidden that option on the toolbar.

I really dig this Brian! I was wondering if you think it would be possible to link a title field into this editor, the way it shows on the sample site. Just think that might be cool. Also, do you know why the Full Screen functionality doesn't work in Safari?

I was wondering if you think it would be possible to link a title field into this editor, the way it shows on the sample site. Just think that might be cool. Also, do you know why the Full Screen functionality doesn't work in Safari?

Unfortunately, my Javascript skills are very minimum. I have no idea why the fullscreen doesn't work with Safari. I have listed that as one of the existing problems. Also, don't know how to link a title field. Sorry.

I mainly took the editor developed by Lepture and made it into an extension.

This is pretty awesome. I prefer the look and feel of this over the Markdown Editor extension. Until the preview function is working, I've been using the Preview Textarea extension.

One thing though: Is anyone else having issues using this field as a drop target from Subsection Manager?

Without this extension installed, or with the Markdown Editor extension, I can drop entries fine. But with this plugin, the textarea will not allow a drop from Subsection Manager.

Yes, this extension does not allow me to drop an item from the Subsection manager into the text.

A pity, because it looks great!

For anyone still looking for preview/fullscreen functionality, you can check out my pull request / fork:

https://github.com/symphonists/editorforsymphony/pull/13

Fullscreen not working was due to the script using a previous draft of the fullscreen API spec. Preview wasn't working due to being dependent on the inclusion of Marked. Both of those issues have been fixed, along with a bunch of other tweaks.

I'm currently working on a live side-by-side preview while in fullscreen mode. No ETA, but it's coming along nicely.

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