How to Set Ckeditor ReadOnly Mode
CKEditor API makes it possible to render the editor content read-only (and thus impossible for the user to edit). Some editor features that will not cause the user to modify the content will still be available, though. This includes, for example, the view of the content source code or features such as preview and editor interface maximization within the browser window.
The most crucial element of the API is the setReadOnly() method which puts the editor into the read-only state and restores it to the editable state.
When the editor goes from the editable into the read-only state, its readOnly property is being set to true
(for read-only mode) or false
(for editable mode). The readOnly event is also fired after each change of the readOnly
property.
This is what CKEditor looks like when it is in read-only mode.
Read-Only Mode on Startup
CKEditor can be configured to open in the read-only mode on startup by setting the CKEDITOR.config.readOnly configuration option to true
. For example:
config.readOnly = true;
The same can be achieved by setting the disabled
attribute for the <textarea>
element that CKEditor replaces.
Read-Only Mode Demo
See also the working “Read-Only Mode” sample that showcases toggling between the read-only and editable mode.
How to Set Ckeditor ReadOnly Mode的更多相关文章
- 七牛云:ckeditor JS SDK 结合 C#实现多图片上传。
成功了,搞了2天.分享一下经验. 首先是把官方的那个例子下载下来,然后照如下的方式修改. 其中tempValue是一个全局变量. function savetoqiniu() { var upload ...
- C#基础知识七之const和readonly关键字
前言 不知道大家对const和readonly关键字两者的区别了解多少,如果你也不是很清楚的话,那就一起来探讨吧!探讨之前我们先来了解静态常量和动态常量. 静态常量 所谓静态常量就是在编译期间会对变量 ...
- const 与 readonly知多少
原文地址: http://www.cnblogs.com/royenhome/archive/2010/05/22/1741592.html 尽管你写了很多年的C#的代码,但是可能当别人问到你cons ...
- 基于CkEditor实现.net在线开发之路(7)列表页面开发动作介绍
一个列表页面不止是查询,它也包含了很多业务上功能的实现,这些业务功能的实现的逻辑我称之为动作.如触发单击按钮删除数据,更改业务表数据,调用webService,调用WCF接口,弹出新窗体新增.修改.查 ...
- IOS 杂笔-15(知识小点 readonly)
readonly是我们并不陌生的属性. 但是他也有值得我们注意的地. 属性如其名-只读-也就是说我们只能读取-不能进行写操作 当我们尝试进行写操作时会如下 但是这并不意味着我们不可以改变其内部的属性 ...
- 1.2 - C#语言习惯 - 用运行时常量readonly而不是编译期常量const
C#中有两种类型的常量:编译期常量和运行时常量.二者有着截然不同的行为,使用不当将会带来性能上或正确性上的问题. 这两个问题最好都不要发生,不过若难以同时避免的话,那么一个略微慢一些但能保证正确的程序 ...
- 表单中Readonly和Disabled的区别
1.readonly是要锁定这个控件,通过在界面上无法修改他(但是通过javascript可以修改他). 2.disabled和readonly有相同的地方也是可以锁定这个控件用户不能改变他的值,但是 ...
- C# readonly 与const
引自:http://www.cnblogs.com/ryuasuka/p/3342282.html?utm_source=tuicool&utm_medium=referral 现在正在学&l ...
- 个人CKeditor的config.js配置
/** * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. * For lic ...
随机推荐
- day11 闭包函数和装饰器
1.函数不是新知识点 主要是学习函数的用法 在面向对象编程中,一切皆对象,函数也不例外 具体的表现 1.函数可以引用 2.函数可以作为函数的参数 3.函数可以作为函数的返回值 4.可以被存储到容器类型 ...
- Android的框架功能说明
OkHttp网络框架 Picasso图片缓存框架 ORMLite数据库框架 GreenDao数据库框架
- MongoDB之Array Object的特殊操作
相比关系型数据库,Array[1,2,3,4,5]和Object{'name':'Wjs'}是MongoDB比较特殊的类型 db.Wjs.insert({"name":" ...
- Jenkins安装部署(二)
Jenkins配置 一.修改jenkins家目录 由于jenkins在启动个之后会默认将所有的构建应用在家目录中创建一遍,为了合理化服务器资源,重新定义jenkins家目录. 在tomcat的cata ...
- HDU-1087.SuperJUmpingJUmpingJumping.(DP and LISPP)
本题大意:给定一个长度为n的序列a,让你输出这个序列子序列中元素和最大的最大上升子序列. 本题思路:一开始肯定可以想到用LIS实现,我们用LIS实现的时候可以发现这个问题并不满足LIS问题的最优子结构 ...
- Unicode编码字符范围和具体文字
1)标准CJK文字 http://www.unicode.org/Public/UNIDATA/Unihan.html 2)全角ASCII.全角中英文标点.半宽片假名.半宽平假名.半宽韩文字母:FF0 ...
- mac navicat premium 使用技巧
快捷键 CMD-I:对象信息 CMD-L:查询日志 CMD-Y:新建查询 SHIFT-CMD-T:数据传输 SHIFT-CMD-C:命令列界面
- swift 8.0之后打开 手机设置
if #available(iOS 8.0, *){ if let url = URL(string: UIApplication.openSettingsURLString), UIApplicat ...
- Java03-Java语法基础(二)运算符
Java语法基础(二)运算符 一.运算符 1.算数运算符:+.-.*./.% 1)双目运算符:二元运算符,参加运算的对象有两个(+.-.*./.%) 2)单目运算符:一元运算符,参加运算的对象只有一个 ...
- Swift 常量、变量、条件判断
- 常量用 let ,变量用 var - // Optional为可选项,// 可用类型值 + ? 代替 let x: Optional = 10 let y: Int? = 5 print(x! + ...