tinemce sugarcrm 无法获取字段值

问题描述 投票:0回答:0

我已经按照文档在 sugarcrm 中配置了 tinymce

https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.0/Architecture/TinyMCE/

在记录.php

 array (
                'readonly' => false,
                'name' => 'internal_notes',
                'studio' => 'visible',
                'rows' => 3,
                'span' => 12,
                  'type'          => 'htmleditable_tinymce',  
                  'span'          => 12,   
                  'tinyConfig'    => array(     
                  'script_url'                        => 'XXX/custom/epicom/tinymce/tinymce.min.js',     
                  'height'                            => '100%',     
                  'width'                             => '100%',     
                  'theme'                             => 'advanced',     
                  'skin'                              => 'sugar7',     
                  'plugins'                           => 'advlist autolink link image lists charmap print preview hr anchor pagebreak   
                                                          spellchecker searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking save table contextmenu directionality emoticons template paste textcolor',     
                  'entity_encoding'                   => 'raw',     
                  'forced_root_block'                 => false,     
                  'theme_advanced_buttons1'           => "code,separator,bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,backcolor,separator,fontsizeselect",     
                  'theme_advanced_toolbar_location'   => "top",     
                  'theme_advanced_toolbar_align'      => "left",     
                  'theme_advanced_statusbar_location' => "none",     
                  'theme_advanced_resizing'           => false,     
                  'schema'                            => 'html5',     
                  'template_external_list_url'        => 'lists/template_list.js',     
                  'external_link_list_url'            => 'lists/link_list.js',     
                  'external_image_list_url'           => 'lists/image_list.js',     
                  'media_external_list_url'           => 'lists/media_list.js',     
                  'theme_advanced_path'               => false,     
                  'theme_advanced_source_editor_width'=> 500,     
                  'theme_advanced_source_editor_height'=> 400,     
                  'inlinepopups_skin'                 => 'sugar7modal',
                  'relative_urls'                     => false,     
                  'remove_script_host'                => false,   
                                  
                ),
              ),

我能够在 record.js 的 TextArea 中生成 html 模板。但是当我保存记录时,我无法从 TextArea 字段中获取新的编辑数据......我只得到旧集 HTML 数据

我用过这个代码

tinymce.activeEditor.getContent()
 tinymce.get("myTextarea").getContent()

但是此代码始终具有 activeEditor 和 getContent 的空值。

我如何从 HTML 可编辑文本区域字段中获取价值??

javascript tinymce sugarcrm
© www.soinside.com 2019 - 2024. All rights reserved.