Copied to clipboard

Flag this post as spam?

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


  • pyogesh 15 posts 35 karma points
    Oct 09, 2010 @ 20:34
    pyogesh
    0

    How to add javascript file in richtexteditor

    I have javascript file in script folder, I want that apply to richtexteditor.

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Oct 09, 2010 @ 20:45
    Sebastiaan Janssen
    0

    Do you want it so you can change the rich text editor? Or do you want the editor of your site to be able to add a javascript file through the RTE?

  • pyogesh 15 posts 35 karma points
    Oct 09, 2010 @ 21:01
    pyogesh
    0

    Thanks Sebastiaan for your quick replay

    I have sparyeffect javascript file in my website.so I want to add this javascript file in that richtexteditor.

     

  • Johan Roug 97 posts 153 karma points
    Oct 09, 2010 @ 22:02
    Johan Roug
    0

    So should the javascript target your content on the frontend only on that richtexteditor on a specific page, or should it work on all pages that use the richtexteditor?

    Or should it be a link, so people can download that javascriptfile.

    I'm still not sure what you want to do :)

  • pyogesh 15 posts 35 karma points
    Oct 10, 2010 @ 05:26
    pyogesh
    0

    Thanks Johan for your reply.

    The sparyeffect javascript file i am using only on that single web page.It is like scroll down when click on link.

    When we click on link content will be visible to us.so i want to chanage content through richtext editor.

  • Johan Roug 97 posts 153 karma points
    Oct 10, 2010 @ 08:59
    Johan Roug
    0

    is the link also in the richtexteditor?

    If you have many pages, but only this one should use the effect, I would simply add a class to the style menu in the richtexteditor, Then the editor can choose what part of the text should have the class. Then I would write some lines of jquery, to target that class.

     

    You could also make a macroContainer and add it to the documenttype, you are using for your page. On the macropicker I would add:

    linktext field

    multiline field

    Write some xslt that would use this macro. In the xslt put a clas on the multilinefield and linktext field, and target those fields with jquery

     

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Oct 10, 2010 @ 09:00
    Sebastiaan Janssen
    0

    Sounds like you don't need to put the javascript in your rich text editor, but somewhere in your template/masterpage for that page.. That should do the trick, right?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies