江の島エンジニアのTips集

ckeditor-tips

(2015/03/04)

ckeditor-tips

バージョン確認

http://localhost:3000/assets/ckeditor/init.js

allowedContent

# タグのフィルタリングを無効化
CKEDITOR.config.allowedContent = true

allowedContentをtrueにするとdisallowContentが設定できない http://docs.ckeditor.com/#!/guide/dev_disallowed_content

# 画像のstyleでwidthとheightは出力しない
CKEDITOR.config.allowedContent = {
  $1: {
      # Use the ability to specify elements as an object.
      elements: CKEDITOR.dtd,
      attributes: true,
      styles: true,
      classes: true
  }
}

CKEDITOR.config.disallowedContent = 'img{width,height}'

ルールのフォーマット http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules-section-string-format

  • このエントリーをはてなブックマークに追加
  • follow us in feedly