<!DOCTYPE html>
	<html lang="vi" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
	<head>
<title>Hướng dẫn cài đặt ckeditor - trình soạn thảo văn bản trên website</title>
<meta name="description" content="Hướng dẫn cài đặt ckeditor - trình soạn thảo văn bản trên website - Savefile - Windows -...">
<meta name="keywords" content="windows">
<meta name="news_keywords" content="windows">
<meta name="author" content="Trường thcs Trần Quang Khải">
<meta name="copyright" content="Trường thcs Trần Quang Khải &#91;phavaphu@gmail.com&#93;">
<meta name="robots" content="index, archive, follow, noodp">
<meta name="googlebot" content="index,archive,follow,noodp">
<meta name="msnbot" content="all,index,follow">
<meta name="google-site-verification" content="RcwYmWMVb8dh-0VdAvXEp4IOHtTN12pffjnuI5mDK1o">
<meta name="generator" content="NukeViet v4.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="article:author" content="http://thcstranquangkhai.edu.vn">
<meta property="og:title" content="Hướng dẫn cài đặt ckeditor - trình soạn thảo văn bản trên website">
<meta property="og:type" content="website">
<meta property="og:description" content="Savefile - Windows - https&#x3A;&#x002F;&#x002F;thcstranquangkhai.edu.vn&#x002F;index.php&#x002F;vi&#x002F;windows&#x002F;savefile&#x002F;nukeviet&#x002F;huong-dan-cai-dat-ckeditor-trinh-soan-thao-van-ban-tren-website-96.html">
<meta property="og:site_name" content="Trường thcs Trần Quang Khải">
<meta property="og:url" content="https://thcstranquangkhai.edu.vn/index.php/vi/windows/nukeviet/huong-dan-cai-dat-ckeditor-trinh-soan-thao-van-ban-tren-website-96.html">
<link rel="shortcut icon" href="https://thcstranquangkhai.edu.vn/uploads/favicon.ico">
<link rel="canonical" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/nukeviet/huong-dan-cai-dat-ckeditor-trinh-soan-thao-van-ban-tren-website-96.html">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/" title="Windows" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/thuat-thuat-bai-giang-van-phong/" title="Windows - Thuật thuật Bài giảng - Văn phòng" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/bai-giang-e-learning/" title="Windows - Bài giảng E_Learning" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/tai-lieu-su-dung-phan-mem-soan-giang-e-learning/" title="Windows - Tài liệu sử dụng phần mềm soạn giảng E_Learning" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/Tin-cong-nghe/" title="Windows - Microsoft PowerPoint" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/microsoft-word/" title="Windows - Microsoft Word" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/microsoft-excel/" title="Windows - Microsoft Excel" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/vnedu-phan-mem-nhap-diem/" title="Windows - VnEdu &#40;Phần mềm nhập điểm&#41;" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/Thu-thuat-khac/" title="Windows - Thủ thuật khác" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/thu-thuat-phan-mem-internet/" title="Windows - Thủ thuật Phần mềm - Internet" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/proshow-proceducer/" title="Windows - Proshow Proceducer" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/internet/" title="Windows - Internet" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/nukeviet/" title="Windows - NukeViet" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/thu-thuat-blogspot/" title="Windows - Thủ thuật Blogspot" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/thu-thuat-usb/" title="Windows - Thủ thuật USB" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/thu-thuat-youtube/" title="Windows - Thủ thuật Youtube" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/Download-Upload/" title="Windows - Download - Upload" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/may-chieu-projector/" title="Windows - Máy chiếu - Projector" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/photoshop/" title="Windows - Photoshop" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/driver/" title="Windows - Driver" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/mang-xa-hoi/" title="Windows - Mạng xã hội" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/Windows/" title="Windows - Windows" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/phan-mem-soan-bai-giang-elearning/" title="Windows - Phần mềm soạn bài giảng Elearning" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/San-pham/" title="Windows - Phần mềm SGK tin THCS" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/phan-mem-tin-lop-6/" title="Windows - Phần mềm Tin lớp 6" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/phan-mem-tin-lop-7/" title="Windows - Phần mềm Tin lớp 7" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/phan-mem-tin-lop-8/" title="Windows - Phần mềm Tin lớp 8" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/phan-mem-tin-lop-9/" title="Windows - Phần mềm Tin lớp 9" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/phan-mem-tin-danh-cho-tieu-hoc/" title="Windows - Phần mềm tin dành cho Tiểu học" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/phan-mem-tin-danh-cho-mam-non/" title="Windows - Phần mềm tin dành cho Mầm non" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/giang-day-hoc-tap/" title="Windows - Giảng dạy - Học tập" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/phan-mem-tap-huan/" title="Windows - Phần mềm tập huấn" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/ung-dung-van-phong/" title="Windows - Ứng dụng Văn phòng" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/phan-mem-phavaphu/" title="Windows - Phần mềm phavaphu" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/he-dieu-hanh/" title="Windows - Hệ điều hành" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/phan-mem-khac/" title="Windows - Phần mềm khác" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/qt/" title="Windows - QT" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/ban-ghost-win/" title="Windows - Bản Ghost Win" type="application/rss+xml">
<link rel="alternate" href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/rss/lap-trinh-di-dong/" title="Windows - Lập trình di động" type="application/rss+xml">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/assets/js/jquery/jquery.min.js">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/wow.js">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/wow.min.js">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/theia-sticky-sidebar.js">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/assets/js/language/vi.js">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/assets/js/global.js">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/news.js">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/assets/js/jquery/jquery.cookie.js">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/main.js">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/custom.js">
<link rel="preload" as="script" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/bootstrap.min.js">
<link rel="StyleSheet" href="https://thcstranquangkhai.edu.vn/assets/css/font-awesome.min.css">
<link rel="StyleSheet" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/css/bootstrap.non-responsive.css">
<link rel="StyleSheet" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/css/style.css">
<link rel="StyleSheet" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/css/style.non-responsive.css">
<link rel="StyleSheet" href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/css/news.css">
<link rel="StyleSheet" href="https://thcstranquangkhai.edu.vn/assets/css/defaultphavaphu.vi.0.css?t=77">
<link href="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/css/animate.css" rel="stylesheet">
<style>
	body{background: #fff;}
</style>
		<!-- BEGIN: thông báo đẩy js -->
		<!-- END: thông báo đẩy js -->
<script data-show="inline">(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-81359612-1', '.thcstranquangkhai.edu.vn');
ga('send', 'pageview');
</script>
</head>
	<body>
<div id="print">
	<div id="hd_print">
		<h2 class="pull-left">Trường thcs Trần Quang Khải</h2>
		<p class="pull-right"><a title="Trường thcs Trần Quang Khải" href="https://thcstranquangkhai.edu.vn/">https://thcstranquangkhai.edu.vn</a></p>
	</div>
	<div class="clear"></div>
	<hr />
	<div id="content">
		<h1>Hướng dẫn cài đặt ckeditor - trình soạn thảo văn bản trên website</h1>
		<ul class="list-inline">
			<li>Thứ ba - 26/07/2016 07:27</li>
			<li class="hidden-print txtrequired"><em class="fa fa-print">&nbsp;</em><a title="In ra" href="javascript:;" onclick="window.print()">In ra</a></li>
			<li class="hidden-print txtrequired"><em class="fa fa-power-off">&nbsp;</em><a title="Đóng cửa sổ này" href="javascript:;" onclick="window.close()">Đóng cửa sổ này</a></li>
		</ul>
		<div class="clear"></div>
		<div id="hometext">
						<div class="pull-left imghome">
				<img alt="Hướng dẫn cài đặt ckeditor - trình soạn thảo văn bản trên website" src="https://mynukeviet.net/uploads/news/2015/selection_152.png" width="100" class="img-thumbnail" />
			</div>
			Ckeditor là một trong những trình soạn thảo văn bản trên website nổi tiếng, được sử dụng nhiều nhất hiện nay. Bài viết này mình xin trình bày cách tích hợp Ckeditor vào code php của bạn.
		</div>
		<div id="bodytext" class="clearfix">
			<h2><a id="1. Tải về CKEditor" name="1. Tải về CKEditor">1. Tải về CKEditor</a></h2>
- Truy cập vào địa chỉ dowload ckeditor&nbsp;<a href="http://ckeditor.com/download">http://ckeditor.com/download</a>

<figure><img alt="Download ckeditor" height="348" src="https://mynukeviet.net/uploads/news/2015/selection_152.png" width="749" />
<figcaption>Giao diện download ckeditor</figcaption>
</figure>
<br  />
- Ckeditor cung cấp các gói mặc định để bạn download, nên chọn đúng gói phù hợp với nhu cầu của bạn, để tiết kiệm tài nguyên hệ thống.
<ul>
	<li><strong>Basic Package (1):</strong>&nbsp;Là trình soạn thảo mini, nhỏ gọn, bao gồm 17 plugin cơ bản.</li>
	<li><strong>Standard Package (2):</strong>&nbsp;Là trình soạn thảo thông thường, gồm 48 plugin thường dùng nhất.<strong>&nbsp;(Khuyên dùng)</strong></li>
	<li><strong>Full Package (3):&nbsp;</strong>Trình soạn thảo trù phú, đầy đủ với 72 plugin cài sẵn.</li>
	<li><strong>Customize CKEditor (4):</strong>&nbsp;Nếu chọn, hệ thống sẽ dẫn bạn đến trang&nbsp;<a href="http://mynukeviet.net/html-css/tu-chon-cau-hinh-ckeditor-bang-customize-ckeditor-113.html">cài đặt ckeditor theo yêu cầu của bạn</a>.</li>
</ul>
- Có thể click vào&nbsp;<strong>“Compare packages”</strong>&nbsp;để xem các plugin đã được cài theo các gói cấu hình tương ứng.&nbsp;- Sau khi chọn được gói cấu hình đúng với nhu cầu của bạn, click vào&nbsp;<strong>“Download CKEditor” (5)</strong>&nbsp;để tiến hành tải về CKEditor

<h2><a id="2. Cài đặt CKEditor trong HTML" name="2. Cài đặt CKEditor trong HTML">2. Cài đặt CKEditor trong HTML</a></h2>
- Giải nén tập tin vừa download, được thư mục&nbsp;<strong>ckeditor</strong>, di chuyển thư mục này vào thư mục web của bạn. (Đặt thư mục ở vị trí thích hợp, đường dẫn sẽ khai báo sau)&nbsp;- Thêm tập tin&nbsp;<strong>ckeditor.js</strong>&nbsp;vào HTML: Chèn đoạn mã này vào trong thẻ &lt;head&gt;&lt;/head&gt;.

<pre>
<code>&lt;script type=&quot;text/javascript&quot; src=&quot;ckeditor_path/ckeditor.js&quot;&gt;&lt;/script&gt;</code></pre>
<strong>Chú ý:</strong>&nbsp;Thay đường dẫn đến file&nbsp;<strong>ckeditor.js</strong>&nbsp;tương ứng với đường dẫn tại thư mục web của bạn.&nbsp;- Tạo một textarea,&nbsp;<strong>có khai báo thuộc tính id.&nbsp;</strong>Giá trị của thuộc tính này bạn có thể đặt tùy ý. Ở đây mình ví dụ là&nbsp;<strong>id=“editor1”</strong>

<pre>
<code>&lt;textarea name=&quot;description&quot; id=&quot;editor1&quot; rows=&quot;10&quot; cols=&quot;80&quot;&gt;This is my textarea to be replaced with CKEditor.&lt;/textarea&gt;</code></pre>
- Dùng javascript, thay thế&nbsp;<strong>textarea</strong>&nbsp;bên trên bằng editor. Giá trị&nbsp;<strong>editor1</strong>&nbsp;ở đây chính là giá trị của thuộc tính id đặt bên trên.

<pre>
<code>&lt;script&gt;    CKEDITOR.replace( &#039;editor1&#039; );&lt;/script&gt;</code></pre>
<strong>Đoạn mã hoàn chỉnh</strong>

<pre>
<code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
	&lt;head&gt;
		&lt;meta charset=&quot;utf-8&quot;&gt;
		&lt;title&gt;A Simple Page with CKEditor&lt;/title&gt;&lt;!-- Make sure the path to CKEditor is correct. --&gt;
		&lt;script src=&quot;../ckeditor.js&quot;&gt;&lt;/script&gt;
	&lt;/head&gt;
	&lt;body&gt;
		&lt;form&gt;
			&lt;textarea name=&quot;editor1&quot; id=&quot;editor1&quot; rows=&quot;10&quot; cols=&quot;80&quot;&gt;                This is my textarea to be replaced with CKEditor.            &lt;/textarea&gt;
			&lt;script&gt;
				// Replace the &lt;textarea id=&quot;editor1&quot;&gt; with a CKEditor                // instance, using default configuration.                CKEDITOR.replace( &#039;editor1&#039; );
			&lt;/script&gt;
		&lt;/form&gt;
	&lt;/body&gt;
&lt;/html&gt;</code></pre>
<strong>Kết quả:</strong>&nbsp;<a href="http://developers.mynukeviet.net/code/Su-dung-trinh-soan-thao-ckeditor-cho-website-30/">http://developers.mynukeviet.net/code/Su-dung-trinh-soan-thao-ckeditor-cho-website-30/</a>
		</div>
				<div id="author">
						<p>
				<strong>Tác giả bài viết:</strong>
				Hồ Ngọc Triển
			</p>
						<p>
				<strong>Nguồn tin:</strong>
				mynukeviet.net
			</p>
		</div>
	</div>
	<div id="footer" class="clearfix">
		<div id="url">
			<strong>URL của bản tin này: </strong><a href="https://thcstranquangkhai.edu.vn/index.php/vi/windows/nukeviet/huong-dan-cai-dat-ckeditor-trinh-soan-thao-van-ban-tren-website-96.html" title="Hướng dẫn cài đặt ckeditor - trình soạn thảo văn bản trên website">https://thcstranquangkhai.edu.vn/index.php/vi/windows/nukeviet/huong-dan-cai-dat-ckeditor-trinh-soan-thao-van-ban-tren-website-96.html</a>

		</div>
		<div class="clear"></div>
		<div class="copyright">
			&copy; Trường thcs Trần Quang Khải
		</div>
		<div id="contact">
			<a href="mailto:phavaphu@gmail.com">phavaphu@gmail.com</a>
		</div>
	</div>
</div>
        <div id="timeoutsess" class="chromeframe">
            Bạn đã không sử dụng Site, <a onclick="timeoutsesscancel();" href="https://thcstranquangkhai.edu.vn/#">Bấm vào đây để duy trì trạng thái đăng nhập</a>. Thời gian chờ: <span id="secField"> 60 </span> giây
        </div>
        <div id="openidResult" class="nv-alert" style="display:none"></div>
        <div id="openidBt" data-result="" data-redirect=""></div>
<div id="run_cronjobs" style="visibility:hidden;display:none;"><img alt="" src="/index.php?second=cronjobs&amp;p=l38YsK3f" width="1" height="1" /></div>
<script src="https://thcstranquangkhai.edu.vn/assets/js/jquery/jquery.min.js"></script>
<script>var nv_base_siteurl="/",nv_lang_data="vi",nv_lang_interface="vi",nv_name_variable="nv",nv_fc_variable="op",nv_lang_variable="language",nv_module_name="windows",nv_func_name="savefile",nv_is_user=0, nv_my_ofs=7,nv_my_abbr="+07",nv_cookie_prefix="nv4c_y197C",nv_check_pass_mstime=1738000,nv_area_admin=0,nv_safemode=0,theme_responsive=0,nv_is_recaptcha=0;</script>
<script src="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/wow.js"></script>
<script src="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/wow.min.js"></script>
<script src="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/theia-sticky-sidebar.js"></script>
<script src="https://thcstranquangkhai.edu.vn/assets/js/language/vi.js"></script>
<script src="https://thcstranquangkhai.edu.vn/assets/js/global.js"></script>
<script src="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/news.js"></script>
<script src="https://thcstranquangkhai.edu.vn/assets/js/jquery/jquery.cookie.js"></script>
<script src="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/main.js"></script>
<script src="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/custom.js"></script>
<script type="text/javascript">
    (function(p,u,s,h){
        p._pcq=p._pcq||[];
        p._pcq.push(['_currentTime',Date.now()]);
        s=u.createElement('script');
        s.type='text/javascript';
        s.async=true;
        s.src='https://cdn.pushcrew.com/js/00454aebdd272f8e4c5a5b5e50ac4513.js';
        h=u.getElementsByTagName('script')[0];
        h.parentNode.insertBefore(s,h);
    })(window,document);
</script>
<script src="https://thcstranquangkhai.edu.vn/themes/defaultphavaphu/js/bootstrap.min.js"></script>
</body>
</html>