hypweb.net
XOOPSマニア  最新情報のRSS(サイト全体)
[ 自宅サーバーWebRing |ID=54 前後5表示乱移動サイト一覧 ]

TOP » UsersWiki » nao-pon » blog » 2013-02-05

RSS of nao-pon/blog
2013 2月 5 (火)
 

ckeditor4 Version 0.33 リリース anchor.png

ckeditor4 をアップデートして Version 0.33 としました。

X-update で更新、もしくは、mygithub-download:ckeditor4 からダウンロードできます。

主な更新内容は、テーマ下 CSS と テーマ下 プリロード(もどき) の対応です。

テーマ下 CSS

themes/[ThemeName]/ckeditor4/ ディレクトリに "contents.css" を置くと、CKEditor の編集エリアにその CSS が読み込まれます。

テーマ下 プリロード(もどき)

themes/[ThemeName]/ckeditor4/ ディレクトリに "preload.class.php" というファイル名でクラス名 "ckeditor4_PreloadForTheme" をクラス定義しそのクラスの "setParams", "preSetConfig", "postSetConfig" の3つの method で CKEditor の挙動を制御することができるようになります。

Vfka.png
例えば、marine さんの tw_responsive テーマ の tw_responsive/ckeditor4/ に filepreload.class.php を放り込むと、右のような感じになります。スタイルプルダウンで Twitter Bootstrap のスタイルを簡単に適用することができるようになります。

こんな感じで、テーマ下の preload.class.php で CKEditor の config のほとんどを設定することができるようになりました。

preload.class.php の詳細については、mygithub:ckeditor4/blob/master/html/modules/ckeditor4/preload/ThemePreload.class.php を参照してください。

Page Top

更新履歴 anchor.png

  • 892c8f9: add editor_reset.css for the editing area
  • a282c61: ckeditor4 version 0.31
  • c252cb1: refactoring of "Ckeditor4_Utils"
  • fa4bb57: load CSS "themes/[theme]/ckeditor4/contents.css" if exists
    • テーマ下 ckeditor4/contents.css が存在する場合は、編集エリア用 CSS として追加読み込みするようにした。

      編集エリア用 CSS は body に対して定義を指定すると、編集エリアに反映されます。

  • 294b2bb: ckeditor4 version 0.32
  • 34a92b4: add preload/ThemePreload.class.php
    • themes/[theme]/ckeditor4/preload.class.php が存在すれば、それを読み込むプリロード

      preload.class.php のクラス名は "ckeditor4_PreloadForTheme" 固定

      setParams, preSetConfig, postSetConfig の3つの method を持つことができる

      それぞれの method は必要な物だけでよい

      1
      2
      3
      4
      5
      
      @ param array $params Smarty プラグインから与えられたパラメタ
      @ param array $config CKEditor に与える config 配列
                            key(string): config 名 
                            val(mixed) : 値  [] で括った文字列は、JavaScript のオブジェクトとして扱われる 
                                         その他の値は json_encode で処理され、 CKEditor に渡される
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      14
      
      class ckeditor4_PreloadForTheme
      {
          // Smarty プラグインがから渡されたパラメタをカスタムする用
          function setParams(& $params) {}
          
          // ckeditor.config をカスタムする用
          // (Params 解釈前: Smarty プラグインで指定した toolbar や管理画面:一般設定の config
      は上書きできない)
          function preSetConfig(& $config, $params) {}
          
          // ckeditor.config をカスタムする用
          // (最終段階: すべての config を上書きできる)
          function postSetConfig(& $config, $params) {}
      }
  • 4e551d0: add var $themeName into ckeditor4_PreloadForTheme()
  • 09994e6: ckeditor4 version 0.33


トップ   凍結 差分 バックアップ 複製 名前変更 リロード印刷に適した表示   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom Powered by xpWiki
Counter: 396, today: 1, yesterday: 0
初版日時: 2013-02-05 (火) 22:18:49
最終更新: 2013-02-05 (火) 22:37:15 (JST) (4059d) by nao-pon
このページのTopへ
メインメニュー
ログイン

ユーザー名:


パスワード:





パスワード紛失  |新規登録
最近の更新
#recent(): You called me too much
オンライン状況
198 人のユーザが現在オンラインです。 (7 人のユーザが UsersWiki を参照しています。)

登録ユーザ: 0
ゲスト: 198

もっと...
サイト情報