SalesSystemOnline/ckeditor_3.6/ckeditor/_samples/readonly.html

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Read-only State &mdash; CKEditor Sample</title>
	<meta content="text/html; charset=utf-8" http-equiv="content-type" />
	<script type="text/javascript" src="../ckeditor.js"></script>
	<script src="sample.js" type="text/javascript"></script>
	<link href="sample.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
	//<![CDATA[

var editor;

// The instanceReady event is fired, when an instance of CKEditor has finished
// its initialization.
CKEDITOR.on( 'instanceReady', function( ev )
	{
		editor = ev.editor;

		// Show this "on" button.
		document.getElementById( 'readOnlyOn' ).style.display = '';

		// Event fired when the readOnly property changes.
		editor.on( 'readOnly', function()
			{
				document.getElementById( 'readOnlyOn' ).style.display = this.readOnly ? 'none' : '';
				document.getElementById( 'readOnlyOff' ).style.display = this.readOnly ? '' : 'none';
			});
	});

function toggleReadOnly( makeEditable )
{
	// Change the read-only state of the editor.
	// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setReadOnly
	editor.setReadOnly( makeEditable );
}

	//]]>
	</script>

</head>
<body>
	<h1 class="samples">
		CKEditor Sample &mdash; Using the CKEditor Read-Only API
	</h1>
	<div class="description">
	<p>
		This sample shows how to use the
		<code><a class="samples" href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#setReadOnly">setReadOnly</a></code>
		API to put editor into the read-only state that makes it impossible for users to change the editor contents.
	</p>
	<p>
		For details on how to create this setup check the source code of this sample page.
	</p>
	</div>

后面还有 31 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。