zoukankan      html  css  js  c++  java
  • 富文本的使用

    asp.net

    <%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>


    <div style=" 100%; height: 40px;">
    <iframe src="/pages/common/uploadPic.aspx?type=<%=Yph.Crm.Common.Enum.ESourceType.fromTempPic %>&editor=<%=Descirption.ClientID %>&id=0"
    scrolling="no" frameborder="0" height="40" width="400"></iframe>
    </div>
    <CKEditor:CKEditorControl ID="Descirption" runat="server" Width="100%" Height="350px" TemplatesFiles="/js/common/ckeditor/plugins/templates/templates/default.js" onchange="unloadcheck=true;"></CKEditor:CKEditorControl>

    ///获取富文本的值

      var Content = CKEDITOR.instances.ctl00_MainContent_Descirption.getData().trim();

    default.js{

    CKEDITOR.addTemplates('default',{imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath('templates')+'templates/images/'),templates:[{title:'Image and Title',image:'template1.gif',description:'One main image with a title and text that surround the image.',html:'<h3><img style="margin-right: 10px" height="100" width="100" align="left"/>Type the title here</h3><p>Type the text here</p>'},{title:'Strange Template',image:'template2.gif',description:'A template that defines two colums, each one with a title, and some text.',html:'<table cellspacing="0" cellpadding="0" style="100%" border="0"><tr><td style="50%"><h3>Title 1</h3></td><td></td><td style="50%"><h3>Title 2</h3></td></tr><tr><td>Text 1</td><td></td><td>Text 2</td></tr></table><p>More text goes here.</p>'},{title:'Text and Table',image:'template3.gif',description:'A title with some text and a table.',html:'<div style=" 80%"><h3>Title goes here</h3><table style="150px;float: right" cellspacing="0" cellpadding="0" border="1"><caption style="border:solid 1px black"><strong>Table title</strong></caption></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></table><p>Type the text here</p></div>'}]});}

  • 相关阅读:
    本周最新文献速递20211128
    R报错:Error in gzfile(file, "rb") : cannot open the connection rds
    本地安装github上的R包
    本周最新文献速递20211114
    本周最新文献速递20211107(论怎么在信号少、样本量少的情况下发到NG上)
    经典排序算法 桶排序Bucket sort
    经典排序算法 耐心排序Patience Sorting
    [MSSQL]FOR XML AUTO II
    经典排序算法 快速排序Quick sort
    经典排序算法 冒泡排序Bubble sort
  • 原文地址:https://www.cnblogs.com/lp73/p/6644329.html
Copyright © 2011-2022 走看看