- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2018-07-12T14:28:11+09:00","default:wikiwriter","wikiwriter")
#author("2018-07-12T14:29:46+09:00","default:wikiwriter","wikiwriter")
&tag(CKEditor4);
*目次 [#l01b5099]
#contents
*関連ページ [#f6782b1e]
*参考情報 [#j7951ec4]
&tag(CKEditor/基本);
*基本的な使用方法 [#m1b9c7ce]
-[[Quick Start Guide - CKEditor 4 Documentation:https://docs.ckeditor.com/ckeditor4/latest/guide/dev_installation.html]]
-Standardパッケージをダウンロード。
-以下のリンクでサンプルを確認できる
http://<your site="">/ckeditor/samples/index.html
-CKEditorの組み込み。
#pre{{
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>A Simple Page with CKEditor</title>
<!-- Make sure the path to CKEditor is correct. -->
<script src="../ckeditor.js"></script>
</head>
<body>
<form>
<textarea name="editor1" id="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea>
<script>
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
CKEDITOR.replace( 'editor1' );
</script>
</form>
</body>
</html>
}}
*プラグイン [#z66b06d9]
**プラグインの使用方法 [#bec46b02]
-[[Installing Plugins - CKEditor 4 Documentation:https://docs.ckeditor.com/ckeditor4/latest/guide/dev_plugins.html]]
-pluginsディレクトリの下にプラグインフォルダを作成。
-config.jsのextraPluginsでプラグインを指定。
-例えば
#pre{{
config.extraPlugins = 'openlink';
}}
**openlink [#s5a1cb61]
-デフォルトではCKEditorのエディタ部に入力されたリンクはクリックできない。
-それを有効するのがopenlinkプラグイン。
-デフォルトではCmd/Ctrlキーを押しながらリンクをクリックする必要があるが、以下の設定を有効にすればこのキーは不要になり左クリックで別のウィンドウ(タブ)で開けるようになる。
config.openlink_modifier = 0;