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 ...
随机推荐
- linux下安装Cmake和Sniffles
-------------------------------------------------------------------cmake的安装------------------------- ...
- QPS/TPS/并发量/系统吞吐量的概念
我们在日常工作中经常会听到QPS/TPS这些名词,也会经常被别人问起说你的系统吞吐量有多大.这个问题从业务上来讲,可以理解为应用系统每秒钟最大能接受的用户访问量.或者每秒钟最大能处理的请求数: QPS ...
- OWAPSP_ZAP使用
启动OWAPSP_ZAP后 netstat -pantu | grep 8080
- JMeter(二十二)与其它工具对比(转载)
转载自 http://www.cnblogs.com/yangxia-test JMeter工具的扩展性非常好. JMeter工具是开源的.开源不仅仅意味着免费,更重要的是意味着用户可以通过开放的源代 ...
- I/O复用之epoll
epoll 简介 epoll是为处理大批量句柄而作了改进的poll,它是在2.5.44内核中被引进的. 相关函数调用 int epoll_create(int size); 创建一个epoll的句柄. ...
- LibreOJ 6280 . 数列分块入门 4
题目链接:https://loj.ac/problem/6280 加一个数组保存块的和. 代码: #include<iostream> #include<cstring> #i ...
- shape 图形
主要属性: <?xml version="1.0"encoding="utf-8"?><shape > <corners /> ...
- php项目执行composer install时报错
报错信息: Loading composer repositories with package informationInstalling dependencies (including requi ...
- Could not get lock /var/lib/dpkg/lock更新问题
发生于apt-get update或apt update时. 常见手段,先试试: sudo rm /var/lib/dpkg/lock sudo rm /var/lib/apt/lists/lock ...
- TZOJ 3663 最长路径(floyd)
描述 网络是由很多交换机与网线组成的,网络中的信息可能会在这些网络中不断转发,给定任意两个交换机,我们需要从中找到最快的路径进行转发,我们定义转发过程中所经过的网线条数为两个交换机之间的路径长度.如果 ...