富文本的使用

asp.net

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

<div style="width: 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="width:100%" border="0"><tr><td style="width:50%"><h3>Title 1</h3></td><td></td><td style="width: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="width: 80%"><h3>Title goes here</h3><table style="width: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>‘}]});}

时间: 2024-08-09 06:33:11

富文本的使用的相关文章

微信小程序富文本-wxParse的使用

最近小程序蛮火的,公司要做于是学了一点点小程序 不知道你们有没有遇到过这种问题: 从公司服务器获取的文章内容是有HTML标签格式的一段内容,但是微信是不支持这些标签的,怎么办呢? 1.一般网站后台的文章是这样的,带有很多的html标签(这里是截取的今日头条某文章内容),但是小程序并不支持,它会以文本直接显示 怎么办呢? 2.在这个时候可以考虑 wxParse wxParse信息 版本号0.1 历史版本号0.2 具体代码请查看仓库分支V1 github地址: https://github.com/

TinyMCE(富文本编辑器)

[转]TinyMCE(富文本编辑器)在Asp.Net中的使用方法 官网演示以及示例代码:https://www.tinymce.com/docs/demo/image-tools/ 转自:http://www.cnblogs.com/hahacjh/archive/2010/07/24/1784268.html TinyMCE 在Asp.Net中的使用方法其实挺简单的,从官方网站下载TinyMCE),然后将里面的jscripts目录拷到你的网站目录 假设你的aspx页面中某一个地方需要用到编辑器

Java 实现HTML富文本导出至word完美解决方案

一. 问题的提出 最近用java开发一个科技项目信息管理系统,里面有一个根据项目申请书的模板填写项目申报信息的功能,有一个科技项目申请书word导出功能. 已有的实现方式:采用标准的jsp模板输出实现,简单地说,就是把数据渲染进jsp页面,然后将此页面另存为doc文档,从而达到word导出效果.但是存在以下几个问题: (1) 由于导出的html网页格式,打开word后,默认显示的视图模式为WEB版式视图: (2) 修改word文档后,会新增一个相关联的文件夹,word的html中会引用这个文件夹

Android富文本编辑器RichEditor的使用

以前有个项目做一个笔记本类似的东西,觉得写的不太好,最近重新写,就发现了这个富文本编辑器他的效果是这样的 感觉有点厉害啊 废话不多说开始撸码 1先添加依赖 dependencies { compile 'jp.wasabeef:richeditor-android:1.2.0' } 2写布局 <jp.wasabeef.richeditor.RichEditor android:id="@+id/editor" android:layout_width="match_pa

C# 富文本的使用

一般使用的是百度富文本编辑器: http://ueditor.baidu.com/website/download.html           下载地址 使用方法: 前台 后台:

商城项目整理(四)JDBC+富文本编辑器实现商品增加,样式设置,和修改

UEditor富文本编辑器:http://ueditor.baidu.com/website/ 相应页面展示: 商品添加: 商品修改: 前台商品展示: 商品表建表语句: 1 create table TEST.GOODS_TABLE 2 ( 3 gid NUMBER not null, 4 gname VARCHAR2(90), 5 gdetails CLOB, 6 gpicture VARCHAR2(100), 7 gprice NUMBER, 8 gleixing NUMBER, 9 gpi

关于富文本编辑器UEditor

2017.1.18,星期三?     关于富文本编辑器:     富文本编辑器,Rich Text Editor, 简称 RTE, 是一种可内嵌于浏览器,所见即所得的文本编辑器. 富文本编辑器不同于文本编辑器,程序员可到网上下载免费的富文本编辑器内嵌于自己的网站或程序里(当然付费的功能会更强大些),方便用户编辑文章或信息.比较好的文本编辑器有kindeditor,fckeditor等. 关于UEditor:官网                           UEditor文档,我们的说明书

ios中label富文本的设置

1.修改不同文字和颜色 // 创建一个富文本 NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:@"哈哈哈哈哈123456789"]; // 修改富文本中的不同文字的样式 [attri addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(0, 5

iOS常用技术-Label富文本

////  ViewController.m//  Label富文本////  Created by 大欢 on 16/1/19.//  Copyright © 2016年 bjsxt. All rights reserved.// #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad {    [super view

android 基于Fresco的富文本展示

由于应用中的数据大量采用富文本排版 所以需要客户端解析格式去显示 虽然WebView 可以做到 可是其中的图片下载并没有没有通过我们自己的缓存机制 在git上找到了一个基于picasso的RichText 替换成我们所使用的Fresco 运行起来 没有问题 比起WebView也要流畅很多 所以分享一下实现的代码 有问题 互相帮助改进 现存问题:不支持gif格式 talk is cheap show me the code /** * Created by sunche on 15/11/10.