简体   繁体   English

活动管理员普通文本字段

[英]Active Admin Normal Text Field

I'm trying to bring a custom view to an active admins page. 我正在尝试将自定义视图带到活动的管理员页面。

But thing is whenever I try to put a text area field it automatically produces a custom text area field where I can set font and all, something like word editor as shown in picture. 但是问题是,每当我尝试放置文本区域字段时,它都会自动生成一个自定义文本区域字段,我可以在其中设置字体和所有内容,如图片编辑器所示。

在此处输入图片说明

Is there a way I can prevent this and get normal text editor? 有什么办法可以防止这种情况并获得普通的文本编辑器?

Yes. 是。 TinyMCE lets you specify a html class that prevents it from activating. TinyMCE允许您指定一个阻止其激活的html类。 Text fields with that class will not get transformed into the editor. 该类的文本字段不会转换为编辑器。

http://www.tinymce.com/wiki.php/Configuration3x:editor_deselector http://www.tinymce.com/wiki.php/Configuration3x:editor_deselector

Where you initialize TinyMCE, add these options: 在初始化TinyMCE的位置,添加以下选项:

tinyMCE.init({
    //your init code
    editor_deselector: 'selector', //replace this with the HTML class of your choice
    //more of your init code
  });

Any text area that has the specified class will not get transformed into an editor. 具有指定类的任何文本区域都不会转换为编辑器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM