Skip to content

Instantly share code, notes, and snippets.

@TranHaiQuan
Created August 17, 2019 01:23
Show Gist options
  • Select an option

  • Save TranHaiQuan/3b749adaca482e420b1f86e32be256bc to your computer and use it in GitHub Desktop.

Select an option

Save TranHaiQuan/3b749adaca482e420b1f86e32be256bc to your computer and use it in GitHub Desktop.
About CKeditor
<%= javascript_include_tag Ckeditor.cdn_url %>
phải ở trước html content để load ckeditor trước
<!DOCTYPE html>
<html>
<head>
<title>DemoCkeditor</title>
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="05DsTmL/Ex9rB0qdNh/D6ArOrdNb/ZyoEMj84Mkfsk48JG2QzhK6Ytd/se94FsEsQfYozAwiyvBr5cEXa0pEXw==" />
<link rel="stylesheet" media="all" href="/assets/application.self-f0d704deea029cf000697e2c0181ec173a1b474645466ed843eb5ee7bb215794.css?body=1" data-turbolinks-track="reload" />
<script src="//cdn.ckeditor.com/4.11.3/standard/ckeditor.js"></script>
</head>
<body>
<form class="new_post" id="new_post" action="/posts" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="k+a8RiFY0mqEJ74b6MTn4fyywBHwE2PVkS9+6AXjA0+2zu2yMHF4+XlbqFKrqWKLDBrVEtWVk7aMYvqoMaS1Pg==" />
<textarea name="post[description]" id="post_description">
</textarea><script>
//<![CDATA[
(function() {
if (typeof CKEDITOR != 'undefined') {
if (CKEDITOR.instances['post_description']) { CKEDITOR.instances['post_description'].destroy(); }
CKEDITOR.replace('post_description', {"customConfig":"/assets/ckeditor/config-038e57e325a3e5043de4f46e4e2ba71e735f5226bf46a61f979ea290fa8a85da.js"});
}
})();
//]]>
</script>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment