欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

drupal 使用或禁用 ckeditor 富文本编辑器 有大用

shiping1 的头像

1)admin/settings/ckeditor  进入

全局设置  个人资料 后的编辑 (admin/settings/ckeditor/editg)

Visibility settings

就可以设置某个url下的多行文本的可见性

如果要禁用某个路径下的字段怎么办?
像下面这样  edit-field-shiping-bofang-intro-0-value 就是字段 
node/add/xljingsuban.edit-field-shiping-bofang-intro-0-value
edit-field-shiping-bofang-intro-0-value  是从哪里来的呢 
我们 进入 含这个字段的表单的页面 node/add/xljingsuban    (xljingsuban是一个类型 相当于story)

 


admin/settings/ckeditor/editg  见下面的提示  

 
Enter the paths to the textarea fields for which you want to enable or disable CKEditor. See the Help page for more information about defining field names. Short instruction is available below.
  • Path structure: theme_name:content_type@path.element_id
  • The following wildcards are available: "*", "?".
  • Content type and theme name is optional. You may even specify only path or field id.
  • Examples:
    • garland:blog@*.edit-body - matches all fields of type "blog" called edit-body in garland theme, on any page.
    • node/add/*.edit-user-* - matches fields starting with "edit-user-" on pages starting with "node/add/



 

2)使用  hook_field_attach_form  可以进行设置某个表单字段是否使用编辑器
https://api.drupal.org/api/drupal/7/search/hook_field

 
普通分类: