YAFLogo

logan
  • logan
  • 100% (Exalted)
  • YAF Leader Topic Starter
14 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
14 years ago
Thanks. I'll take a look.

Committed to SVN.