Copied to clipboard

Flag this post as spam?

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


  • Paul Taylor 13 posts 100 karma points
    May 01, 2023 @ 15:39
    Paul Taylor
    0

    Using Umbraco.TinyMCE and Umbraco.MediaPicker3 in a custom form

    I have a requirement to allow members (with no back office access) to post blog entries in an Umbraco 11 site.

    I have created a custom form to do this following this example. It works fine when using a simple Text Area as the main content editor. However, I would like to use the Umbraco.TinyMCE editor in its place.

    Similarly, I would like to use the Umbraco.MediaPicker3 editor to allow the member to select an image for the post.

    How do I do that?

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    May 02, 2023 @ 10:56
    Huw Reddick
    0

    using tinymce in the front end is simple enough, however I don't think you will be able to use the Umbraco.MediaPicker3 in the front end

  • Paul Taylor 13 posts 100 karma points
    May 02, 2023 @ 14:08
    Paul Taylor
    0

    Thanks for the reply, Huw.

    Can you give me an overview of how to incorporate TinyMCE in my form, please? Is it possible to use the Umbraco property editor in the front end, or do I have to add a separate TinyMCE implementation to achieve this?

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    May 03, 2023 @ 13:07
    Huw Reddick
    100

    Hi,

    You can include the umbraco supplied tinymce implementation by just adding

    <script src="/umbraco/lib/tinymce/tinymce.min.js" referrerpolicy="origin" type="text/javascript"></script>
    

    to your page template, you will then need to add some javascript to bind it to your target, see the tinymce docs.

  • Paul Taylor 13 posts 100 karma points
    May 04, 2023 @ 09:14
    Paul Taylor
    0

    Thanks Huw. I got TinyMCE working.

    For the media picker, I think I can probably do what I need by uploading a file, the using the MediaService and ContentService to add it to the page. I'll give that a go.

Please Sign in or register to post replies

Write your reply to:

Draft