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 ...
随机推荐
- 04_web基础(九)考核与评估
- ss源码学习--事件处理
为了方便区分,以下分别使用local,server,remote代表ss客户端,ss服务端,以及ss客户端请求访问的远程主机. 在shadowsocks中,无论对于local还是server,都需要建 ...
- Java自学之路(小白向)
首先学习一门语言无非就受教与自学两种方式,本博文针对自学(穷逼没钱报班,大学又不是计算机专业,只能自学啊) 开个玩笑,其实有很多人是适合自学的,下面介绍. 一.要充满自信我自己就可以学好(够面试用的入 ...
- 【nginx】配置详解
nginx作为web server,是最常用的网络服务器.来看下它的配置文件. 实验1:最基础的配置(可访问静态资源) 包括listen,server_name,root,index,access_l ...
- [LeetCode_96] Unique Binary Search Trees
题目链接 https://leetcode.com/problems/unique-binary-search-trees/ 题意 计算给定节点数的BST有多少种 思路 递归 相关知识 二叉搜索树(B ...
- f5基本介绍
1.信息查看 1)登录: https://10.160.100.10 f5有2台,做HA IP地址分别为10.160.100.3和10.160.100.2 10.160.100.10为虚拟地址 2)基 ...
- bbs项目中对反向查询和分组查询的具体的应用
我的数据库是按照下面的图片的方式设计的 然后看下model中代码 class User(models.Model): uid = models.AutoField(primary_key=True) ...
- 不常见的javascript调试技巧
原文链接:https://segmentfault.com/a/1190000011857058 有时, 有一组复杂的对象要查看.可以通过console.log查看并滚动浏览,亦或者使用console ...
- 水晶报表一页变两页,server2008添加XPS虚拟打印机
水晶报表,程序开发的时候是一页,部署到服务器上后变为两页. 经过这几天研究是服务器上水晶报表的打印机设置不对 本地水晶报表的打印机设置的是 Microsoft XPS Document Writer ...
- Linux下tar.gz、tar、bz2、zip等解压缩、压缩命令小结(转)
本文介绍了linux下的压缩程式tar.gzip.gunzip.bzip2.bunzip2.compress .uncompress. zip. unzip.rar.unrar等程式,以及如何使用它们 ...