YAFLogo

logan
  • logan
  • 100% (Exalted)
  • YAF Leader Topic Starter
13 years ago
Trying to insert smilie 👍 inserts

[img]/YetAnotherForum.NET/Images/Emoticons/msp_thumbup.gif[/img]

renders empty image in preview and post.UserPostedImage

protected override void RegisterSmilieyScript()
        {
            ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "insertsmiley",
                "function insertsmiley(code,img) {\n" +
                "	tinyMCE.execCommand('mceInsertContent',false,'[img]' + img + '[/img]');\n" +
                "}\n", true);
        }

Changed to:

protected override void RegisterSmilieyScript()
        {
            ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "insertsmiley",
                "function insertsmiley(code,img) {\n" +
                "	tinyMCE.execCommand('mceInsertContent',false,'' + code + '');\n" +
                "}\n", true);
        }



Works but not exactly sure if i am missing something.:?:
test
Sponsor

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
13 years ago
Thanks. I'll take a look.

Committed to SVN.
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button