| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3447 人关注过本帖
标题:在线文本编辑器
只看楼主 加入收藏
pcrr100530
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2007-7-6
收藏
 问题点数:0 回复次数:10 
在线文本编辑器
本人想要制作一个简单的在线编辑器,功能如下图所示。不知哪位好心人可以帮忙。
搜索更多相关主题的帖子: 文本编辑 在线 编辑器 功能 
2008-05-14 09:10
hebingbing
Rank: 6Rank: 6
来 自:黄土高坡
等 级:贵宾
威 望:27
帖 子:3417
专家分:371
注 册:2007-10-22
收藏
得分:0 
自己做啊?
一般到网上找一个用就成了,要是自己做的话估计也不是一件小工程……
呵呵……
2008-05-14 10:31
microsystems
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-7-14
收藏
得分:0 
fckedit~
2008-05-14 14:40
青格儿
Rank: 4
等 级:贵宾
威 望:11
帖 子:698
专家分:20
注 册:2007-7-31
收藏
得分:0 
文本编辑器?是个控件吧?
没用过,帮顶一下,请高手指点一下
2008-05-15 16:07
hebingbing
Rank: 6Rank: 6
来 自:黄土高坡
等 级:贵宾
威 望:27
帖 子:3417
专家分:371
注 册:2007-10-22
收藏
得分:0 
我一般都用FCKeditor这个编辑器……
很好用的,添加到工具栏中之后就和控件差不多了……
呵呵……
2008-05-15 16:52
cjh0616
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-8-5
收藏
得分:0 
WQedit在线编辑器
这个编辑器是如何获取值的啊。。。。高手帮帮忙
2008-09-04 09:01
kevintang
Rank: 4
等 级:业余侠客
威 望:9
帖 子:799
专家分:236
注 册:2008-2-14
收藏
得分:0 
后台直接点 控件名.value
2008-09-04 09:09
kevintang
Rank: 4
等 级:业余侠客
威 望:9
帖 子:799
专家分:236
注 册:2008-2-14
收藏
得分:0 
前台 页面 ASPX

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="addnews.aspx.cs" Inherits="admin_news_addnews"  ValidateRequest="false"%>
<%@ Register TagPrefix="fckeditorv2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.

<HTML>
    <HEAD>
        <title></title>
        <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
        <meta content="C#" name="CODE_LANGUAGE">
        <meta content="JavaScript" name="vs_defaultClientScript">
        <meta content="http://schemas. name="vs_targetSchema">
        <link href="../../admin/style.css" rel="stylesheet" type="text/css" />
        <style type="text/css">
.ziti4 { BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px; FONT-WEIGHT: normal; FONT-SIZE: 12px; BORDER-LEFT: #999999 1px; COLOR: #1f456b; LINE-HEIGHT: normal; BORDER-BOTTOM: #999999 1px solid; FONT-STYLE: normal; BACKGROUND-COLOR: #7cbed3; FONT-VARIANT: normal }
.bian1 { BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px; BORDER-LEFT: #999999 1px; BORDER-BOTTOM: #999999 1px solid; BACKGROUND-COLOR: #efefef }
.STYLE4 { BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px; FONT-WEIGHT: normal; FONT-SIZE: 13px; BORDER-LEFT: #999999 1px; COLOR: #1f456b; LINE-HEIGHT: normal; BORDER-BOTTOM: #999999 1px solid; FONT-STYLE: normal; BACKGROUND-COLOR: #7cbed3; FONT-VARIANT: normal }
        
        .ziti4 {
    font-size: 12px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
    color: #1F456B;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: none;
    border-top-color: #999999;
    border-right-color: #999999;
    border-bottom-color: #999999;
    border-left-color: #999999;
    background-color: #7CBED3;
}
.bian1 {
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: none;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-color: #999999;
    border-right-color: #999999;
    border-bottom-color: #999999;
    border-left-color: #999999;
    background-color: #EFEFEF;</style>
        <script>
            function CheckAll()
            {
                if(window.document.all.drpclass.selectedIndex == 0)
                {
                   alert("请选择要发布新闻的类型!");
                   return false;
                }
                if(window.document.all.txtheadline.value =="")
                {
                   alert("请输入文章标题!");
                   return false;
                }
                 if(window.document.all.txtTime.value =="")
                {
                   alert("请输入文章发表时间!");
                   return false;
                }
            }
        </script>
    </HEAD>
    <body MS_POSITIONING="GridLayout">
        <form id="Form1" method="post" runat="server">
            <table width="800" cellpadding="0" cellspacing="1" border="0" style="z-index: 100; left: 0px; position: absolute; top: 0px">
                <tr height="30">
                    <td colSpan="2" class="ziti4">&nbsp;&nbsp;◆您现在的位置:新闻管理&gt;&gt;添加文章
                        </td>
                </tr>
                <tr height="25">
                    <td class="ziti4" align="right" width="100">所属类型:</td>
                    <td width="700" class="bian1"><asp:dropdownlist id="drpclass" CssClass="ziti3" runat="server">
                        <asp:ListItem Selected="True" Value="0">---请选择---</asp:ListItem>
                        <asp:ListItem Value="1">新闻</asp:ListItem>
                        <asp:ListItem Value="2">案例</asp:ListItem>
                    </asp:dropdownlist></td>
                </tr>
                <tr height="25">
                    <td class="ziti4" align="right" width="100">文章标题:</td>
                    <td width="700" class="bian1"><asp:textbox id="txtheadline" CssClass="ziti3" runat="server" Width="300px" MaxLength="100"></asp:textbox>&nbsp;&nbsp;
                        </td>
                </tr>
                    <tr height="25">
                    <td class="ziti4" align="right" width="100">URL:</td>
                    <td width="700" class="bian1"><asp:textbox id="txtURL" CssClass="ziti3" runat="server" Width="300px" MaxLength="100"></asp:textbox>
                    <asp:RegularExpressionValidator ID="rev" runat ="server" ControlToValidate="txtURL" ErrorMessage="输入的Url格式不正确!" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?"></asp:RegularExpressionValidator>&nbsp;&nbsp;
                        </td>
                </tr>
    
                    <tr height="25">
                    <td class="ziti4" align="right" width="100">文章发表时间:</td>
                    <td width="700" class="bian1"><asp:textbox id="txtTime" CssClass="ziti3" runat="server" Width="191px" MaxLength="20"></asp:textbox>
                    &nbsp;&nbsp;
                        </td>
                </tr>
                <tr height="25">
                    <td class="ziti4" vAlign="top" align="right" width="100">文章内容:</td>
                    <td width="700" vAlign="top" class="bian1"><FCKEDITORV2:FCKEDITOR id="fck" runat="server" Height="500px"></FCKEDITORV2:FCKEDITOR></td>
                    
                </tr>
                <tr height="25">
                    <td colspan="2" align="center" class="ziti4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:button id="ButOK" runat="server" Text=" 添 加 文 章 " OnClick="ButOK_Click"></asp:button></td>
                </tr>
            </table>
        </form>
    </body>
</HTML>
2008-09-04 09:10
kevintang
Rank: 4
等 级:业余侠客
威 望:9
帖 子:799
专家分:236
注 册:2008-2-14
收藏
得分:0 
StringBuilder sql = new StringBuilder();
        sql.Append("insert into news(type,Title,strtime,Contents,AddTimes,url)");
        sql.Append("values(");
        sql.Append("'" + this.drpclass.SelectedValue.ToString() + "',");
        sql.Append("'" + this.txtheadline.Text.Trim() + "',");
        sql.Append("'" + this.txtTime.Text.Trim() + "',");
      

 sql.Append("'" + this.fck.Value + "',");这里是获取值
        

sql.Append("'" + DateTime.Now.ToString() + "',");
        sql.Append("'" + this.txtURL.Text.Trim() + "'");
        sql.Append(")");
        ProcessData.DefaultControl.Execute(sql.ToString());

        MessageBox.MessageBox.Show(this, "文章添加成功!");
        this.drpclass.SelectedIndex = 0;
        this.txtheadline.Text = "";
        this.fck.Value = "";
        this.txtURL.Text = "";
        return;
2008-09-04 09:11
kevintang
Rank: 4
等 级:业余侠客
威 望:9
帖 子:799
专家分:236
注 册:2008-2-14
收藏
得分:0 
WEB.CONFIG 中的配置

<?xml version="1.0"?>
<!--
    注意: 除了手动编辑此文件以外,您还可以使用
    Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
     “网站”->“ 配置”选项。
    设置和注释的完整列表在
    machine. 中,该文件通常位于
    \Windows\\Framework\v2.x\Config 中
-->
<configuration>
    <connectionStrings/>
    <system.web>
        <!--
            设置 compilation debug="true" 将调试符号插入
            已编译的页面中。但由于这会
            影响性能,因此只在开发过程中将此值
            设置为 true。
        -->
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
        <!--
            通过 <authentication> 节可以配置 使用的
            安全身份验证模式,
            以标识传入的用户。
        -->
        <authentication mode="Windows"/>
        <!--
            如果在执行请求的过程中出现未处理的错误,
            则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
            开发人员通过该节可以配置
            要显示的 html 错误页
            以代替错误堆栈跟踪。

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    </system.web>
    <appSettings>
        <!--about数据库 -->
        <add key="ConnectionString" value="server=192.168.0.19;database=about;uid=sa;pwd=sa"/>
        <!--配置新闻编辑器 -->
        <add key="FCKeditor:BasePath" value="/about/admin/fckeditor/"/>
        <add key="FCKeditor:UserFilesPath" value="/about/file/"/>
        <!--配置邮件 -->
        <add key="from" value="icityid@
        <add key="SmtpServer" value="mail.
        <add key="username" value="icityid"/>
        <add key="password" value="147258369159753"/>
    </appSettings>
</configuration>
2008-09-04 09:13
快速回复:在线文本编辑器
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014091 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved