Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anders Brohäll 295 posts 561 karma points c-trib
    Oct 31, 2014 @ 15:31
    Anders Brohäll
    0

    Rich-text/markdown editor in Macro

    I'm in need of formattable text added as a parameter within a macro. When creating a macro i can choose textMultiline as the datatype. However, the textarea available when adding the macro within a rich-text editor (tiny) is way to small to be able to edit markup in. Also, i would need a rich-text or markdown editor of some sort to let editors be able to format the text without knowing HTML.

    What would be the best way to solve this problem`? Is it even possible - when using macros?

    I need it to work in both v6 and v7.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 31, 2014 @ 15:42
    Jan Skovgaard
    100

    Hi Anders

    I think you might be in luck! Rune from Umbraco HQ made the Simple Markdown package, which can be found here http://our.umbraco.org/projects/backoffice-extensions/simple-markdown

    If you know a bit of AngularJS and make a fork / copy the package content you should be able to tweak it so you can declare it as a macro parameter in the manifest, which is illustrated in the angular workbook here https://github.com/umbraco/AngularWorkbook/blob/master/Exercises/Exercise10.md

    Don't know about any minor WYSIWYG editors though but hope the above helps a bit? :)

    /Jan

  • Anders Brohäll 295 posts 561 karma points c-trib
    Oct 31, 2014 @ 16:11
    Anders Brohäll
    0

    Got it! Thank you Jan!

  • Anders Brohäll 295 posts 561 karma points c-trib
    Nov 03, 2014 @ 10:52
    Anders Brohäll
    0

    Oh, that solution, of course, only applies to v7. Any ideas on how to get the same effect on v6?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 03, 2014 @ 12:33
    Jan Skovgaard
    0

    Hi Anders

    Hmm, upgrade to 7? ;-)...Naaah, just kidding!

    Well...all I know is that it's more work and probably also more difficult to achieve the same in versions before 7.

    I know Richard Soeteman once made a blogpost about it on an old version 4 installation and it seems this documentation http://our.umbraco.org/documentation/Extending-Umbraco/Macro-Parameter-Editors/ is based on his blogpost.

    Not sure if the displayed code is using the new or the old API. But hope it can give you an idea.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft