📄 insertimagefromcustomgallery.cs
字号:
namespace CommunityServer.FreeTextBoxWrapper
{
using CommunityServer.Components;
using FreeTextBoxControls;
using System;
using System.IO;
using System.Web;
public class InsertImageFromCustomGallery : ToolbarButton
{
public InsertImageFromCustomGallery(string imageGalleryPath) : base("Insert Image From Gallery", "insertimagefromgallery")
{
base.CommandIdentifier = "insertimagefromcustomgallery";
base.ScriptBlock = "this.ftb.imageGalleryPath=\"" + imageGalleryPath.Replace("//", "/") + "\";";
if (!CSContext.Current.User.IsAnonymous)
{
string text1 = imageGalleryPath + "/" + CSContext.Current.User.Username;
if (Directory.Exists(HttpContext.Current.Server.MapPath(text1.Replace("//", "/"))))
{
base.ScriptBlock = "this.ftb.imageGalleryPath=\"" + text1.Replace("//", "/") + "\";";
}
}
base.ScriptBlock = base.ScriptBlock + "var url=this.ftb.imageGalleryUrl.replace(/\\{0\\}/g,this.ftb.imageGalleryPath) + \"&ftb=\" + this.ftb.id; var gallery=window.open(url,'gallery','width=700,height=600,toolbars=0,resizable=1');gallery.focus();";
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -