• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP WFEditor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中WFEditor的典型用法代码示例。如果您正苦于以下问题:PHP WFEditor类的具体用法?PHP WFEditor怎么用?PHP WFEditor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了WFEditor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getConfig

 public function getConfig(&$settings)
 {
     $model = JModel::getInstance('editor', 'WFModel');
     $wf = WFEditor::getInstance();
     // Add format plugin to plugins list
     if (!in_array('format', $settings['plugins'])) {
         $settings['plugins'][] = 'format';
     }
     // Encoding
     $settings['entity_encoding'] = $wf->getParam('editor.entity_encoding', 'raw', 'named');
     $settings['inline_styles'] = $wf->getParam('editor.inline_styles', 1, 1);
     // Paragraph handling
     $settings['forced_root_block'] = $wf->getParam('editor.forced_root_block', 'p', 'p');
     $settings['removeformat_selector'] = $wf->getParam('editor.removeformat_selector', 'span,b,strong,em,i,font,u,strike', 'span,b,strong,em,i,font,u,strike');
     $formats = array('p' => 'advanced.paragraph', 'address' => 'advanced.address', 'pre' => 'advanced.pre', 'h1' => 'advanced.h1', 'h2' => 'advanced.h2', 'h3' => 'advanced.h3', 'h4' => 'advanced.h4', 'h5' => 'advanced.h5', 'h6' => 'advanced.h6', 'div' => 'advanced.div', 'blockquote' => 'advanced.blockquote', 'code' => 'advanced.code', 'dt' => 'advanced.dt', 'dd' => 'advanced.dd', 'samp' => 'advanced.samp', 'span' => 'advanced.span');
     $tmpblocks = $wf->getParam('editor.theme_advanced_blockformats', 'p,div,address,pre,h1,h2,h3,h4,h5,h6,code,samp,span', 'p,address,pre,h1,h2,h3,h4,h5,h6');
     $list = array();
     $blocks = array();
     if (is_string($tmpblocks)) {
         $tmpblocks = explode(',', $tmpblocks);
     }
     foreach ($tmpblocks as $k => $v) {
         $key = $formats[$v];
         if ($key) {
             $list[$key] = $v;
         }
         $blocks[] = $v;
     }
     $selector = $settings['removeformat_selector'] == '' ? 'span,b,strong,em,i,font,u,strike' : $settings['removeformat_selector'];
     $selector = explode(',', $selector);
     // set the root block
     $rootblock = !$settings['forced_root_block'] ? 'p' : $settings['forced_root_block'];
     if ($k = array_search($rootblock, $blocks) !== false) {
         unset($blocks[$k]);
     }
     // remove format selector
     $settings['removeformat_selector'] = implode(',', array_unique(array_merge($blocks, $selector)));
     // Format list / Remove Format
     $settings['theme_advanced_blockformats'] = json_encode($list);
     // add span 'format'
     $settings['formats'] = "{span : {inline : 'span'}}";
     // new lines (paragraphs or linebreaks)
     if ($wf->getParam('editor.newlines', 0)) {
         $settings['force_br_newlines'] = 1;
         $settings['force_p_newlines'] = 0;
         $settings['forced_root_block'] = false;
     }
     // Relative urls
     $settings['relative_urls'] = $wf->getParam('editor.relative_urls', 1, 1);
     if ($settings['relative_urls'] == 0) {
         $settings['remove_script_host'] = 0;
     }
     // Fonts
     $settings['theme_advanced_fonts'] = $model->getEditorFonts($wf->getParam('editor.theme_advanced_fonts_add', ''), $wf->getParam('editor.theme_advanced_fonts_remove', ''));
     $settings['theme_advanced_font_sizes'] = $wf->getParam('editor.theme_advanced_font_sizes', '8pt,10pt,12pt,14pt,18pt,24pt,36pt');
     $settings['theme_advanced_default_foreground_color'] = $wf->getParam('editor.theme_advanced_default_foreground_color', '#000000');
     $settings['theme_advanced_default_background_color'] = $wf->getParam('editor.theme_advanced_default_background_color', '#FFFF00');
     // colour picker custom colours
     $settings['custom_colors'] = $wf->getParam('editor.custom_colors', '', '');
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:60,代码来源:config.php


示例2: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     $number = $wf->getParam('lists.number_styles');
     $bullet = $wf->getParam('lists.bullet_styles');
     if (!empty($number)) {
         if (count($number) < count(self::$defaultNumList)) {
             $items = array();
             foreach ($number as $item) {
                 $title = $item == 'default' ? 'def' : str_replace('-', '_', $item);
                 $style = $item == 'default' ? '' : $item;
                 $items[] = array('title' => 'advlist.' . $title, 'styles' => array('listStyleType' => $style));
             }
             $settings['advlist_number_styles'] = json_encode($items);
         }
     }
     if (!empty($bullet)) {
         if (count($bullet) < count(self::$defaultBulletList)) {
             $items = array();
             foreach ($bullet as $item) {
                 $title = $item == 'default' ? 'def' : str_replace('-', '_', $item);
                 $style = $item == 'default' ? '' : $item;
                 $items[] = array('title' => 'advlist.' . $title, 'styles' => array('listStyleType' => $style));
             }
             $settings['advlist_bullet_styles'] = json_encode($items);
         }
     }
 }
开发者ID:01J,项目名称:topm,代码行数:28,代码来源:config.php


示例3: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     //$settings['article_hide_xtd_btns'] 	= $wf->getParam('article.hide_xtd_btns', 0, 0);
     $settings['article_show_readmore'] = $wf->getParam('article.show_readmore', 1, 1);
     $settings['article_show_pagebreak'] = $wf->getParam('article.show_pagebreak', 1, 1);
 }
开发者ID:jguilloux71,项目名称:crok-notes,代码行数:7,代码来源:config.php


示例4: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     // legacy
     $state = $wf->getParam('editor.visualchars', 0);
     $settings['visualchars_default_state'] = $wf->getParam('editor.visualchars_state', $state, 0, 'boolean');
 }
开发者ID:01J,项目名称:topm,代码行数:7,代码来源:config.php


示例5: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     $engine = $wf->getParam('spellchecker.engine', 'browser', 'browser');
     $url = JURI::base(true) . '/index.php?option=com_jce&view=editor&layout=plugin&plugin=spellchecker&component_id=' . $settings['component_id'];
     switch ($engine) {
         default:
         case 'browser':
             $languages = '';
             $settings['spellchecker_browser_state'] = $wf->getParam('spellchecker.browser_state', 0, 0);
             break;
         case 'googlespell':
             $languages = $wf->getParam('spellchecker.googlespell_languages', '');
             // use a default
             if (!$languages) {
                 $languages = $wf->getParam('spellchecker.languages', 'English=en', '');
             }
             break;
         case 'pspell':
         case 'pspellshell':
         case 'enchantspell':
             $languages = $wf->getParam('spellchecker.languages', 'English=en', '');
             break;
     }
     $settings['spellchecker_rpc_url'] = $url;
     // cast as array
     if ($languages) {
         $languages = (array) $languages;
     }
     if (!empty($languages)) {
         $settings['spellchecker_languages'] = '+' . implode(',', $languages);
     }
     $settings['spellchecker_engine'] = $engine;
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:34,代码来源:config.php


示例6: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     $model = JModel::getInstance('editor', 'WFModel');
     $settings['cleanup_pluginmode'] = $wf->getParam('cleanup.pluginmode', 0, 0, 'boolean');
     $settings['verify_html'] = $wf->getParam('editor.verify_html', 0, 1, 'boolean');
     // set schema
     $settings['schema'] = $wf->getParam('editor.schema', 'html4', 'html4');
     // Get Extended elements
     $settings['extended_valid_elements'] = $wf->getParam('editor.extended_elements', '', '');
     // Configuration list of invalid elements as array
     $settings['invalid_elements'] = explode(',', $wf->getParam('editor.invalid_elements', '', ''));
     // Add elements to invalid list (removed by plugin)
     $model->addKeys($settings['invalid_elements'], self::$invalid_elements);
     // remove extended_valid_elements
     if ($settings['extended_valid_elements']) {
         preg_match_all('#(\\w+)(\\[([^\\]]+)\\])?#', $settings['extended_valid_elements'], $extended);
         if ($extended && count($extended) > 1) {
             $settings['invalid_elements'] = array_diff($settings['invalid_elements'], $extended[1]);
         }
     }
     // remove it if it is the same as the default
     if ($settings['invalid_elements'] === self::$invalid_elements) {
         $settings['invalid_elements'] = array();
     }
     $settings['invalid_attributes'] = $wf->getParam('editor.invalid_attributes', 'dynsrc,lowsrc', 'dynsrc,lowsrc', 'string', true);
     $settings['invalid_attribute_values'] = $wf->getParam('editor.invalid_attribute_values', '', '', 'string', true);
 }
开发者ID:laiello,项目名称:senluonirvana,代码行数:28,代码来源:config.php


示例7: getConfig

 public function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     $settings['spellchecker_languages'] = '+' . $wf->getParam('spellchecker.languages', 'English=en', '');
     $settings['spellchecker_engine'] = $wf->getParam('spellchecker.engine', 'googlespell', 'googlespell');
     $settings['spellchecker_rpc_url'] = JURI::base(true) . '/index.php?option=com_jce&view=editor&layout=plugin&plugin=spellchecker&component_id=' . $settings['component_id'];
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:7,代码来源:config.php


示例8: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     wfimport('admin.models.editor');
     $model = new WFModelEditor();
     $tags = array();
     if ($wf->getParam('media.iframes', 0)) {
         $tags[] = 'iframe';
     }
     if ($wf->getParam('media.audio', 1)) {
         $tags[] = 'audio';
     }
     if ($wf->getParam('media.video', 1)) {
         $tags[] = 'video';
     }
     if (in_array('audio', $tags) || in_array('video', $tags)) {
         $tags[] = 'source';
     }
     if ($wf->getParam('media.embed', 1)) {
         $tags[] = 'embed';
     }
     if ($wf->getParam('media.object', 1)) {
         $tags[] = 'object';
         $tags[] = 'param';
     }
     $model->removeKeys($settings['invalid_elements'], $tags);
     $settings['media_strict'] = $wf->getParam('media.strict', 1, 1);
     $settings['media_version_flash'] = $wf->getParam('media.version_flash', '10,1,53,64', '10,1,53,64');
     $settings['media_version_windowsmedia'] = $wf->getParam('media.version_windowsmedia', '10,00,00,3646', '10,00,00,3646');
     $settings['media_version_shockwave'] = $wf->getParam('media.version_shockwave', '10,2,0,023', '10,2,0,023');
     $settings['media_version_quicktime'] = $wf->getParam('media.version_quicktime', '7,3,0,0', '7,3,0,0');
     $settings['media_version_java'] = $wf->getParam('media.version_java', '1,5,0,0', '1,5,0,0');
 }
开发者ID:jimyb3,项目名称:mathematicalteachingsite,代码行数:33,代码来源:config.php


示例9: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     $width = $wf->getParam('table.width');
     $height = $wf->getParam('table.height');
     if ($width && preg_match('#^[0-9\\.]$#', $width)) {
         $width .= 'px';
     }
     if ($height && preg_match('#^[0-9\\.]$#', $height)) {
         $height .= 'px';
     }
     $settings['table_default_width'] = $width;
     $settings['table_default_height'] = $height;
     $settings['table_default_border'] = $wf->getParam('table.border', 0, 0);
     $settings['table_default_align'] = $wf->getParam('table.align', '', '');
     $settings['table_default_cellpadding'] = $wf->getParam('table.cellpadding', 0, 0);
     $settings['table_default_cellspacing'] = $wf->getParam('table.cellspacing', 0, 0);
     $settings['table_default_rows'] = $wf->getParam('table.rows', 2, 2);
     $settings['table_default_cols'] = $wf->getParam('table.cols', 2, 2);
     $settings['table_cell_limit'] = $wf->getParam('table.cell_limit', 0, 0);
     $settings['table_row_limit'] = $wf->getParam('table.row_limit', 0, 0);
     $settings['table_col_limit'] = $wf->getParam('table.col_limit', 0, 0);
     $settings['table_pad_empty_cells'] = $wf->getParam('table.pad_empty_cells', 1, 1);
     $settings['table_classes'] = $wf->getParam('table.classes', "", "");
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:25,代码来源:config.php


示例10: getConfig

 public static function getConfig(&$settings)
 {
     wfimport('admin.models.editor');
     $model = new WFModelEditor();
     $wf = WFEditor::getInstance();
     $settings['inline_styles'] = $wf->getParam('editor.inline_styles', 1, 1);
     // Paragraph handling
     $settings['forced_root_block'] = $wf->getParam('editor.forced_root_block', 'p', '', false);
     // set as boolean if disabled
     if (is_numeric($settings['forced_root_block'])) {
         $settings['forced_root_block'] = (bool) $settings['forced_root_block'];
         if ($wf->getParam('editor.force_br_newlines', 0, 0, 'boolean') === false) {
             // legacy
             $settings['force_p_newlines'] = $wf->getParam('editor.force_p_newlines', 1, 0, 'boolean');
         }
     }
     if (strpos($settings['forced_root_block'], '|') !== false) {
         // multiple values
         $values = explode('|', $settings['forced_root_block']);
         foreach ($values as $value) {
             $kv = explode(':', $value);
             if (count($kv) == 2) {
                 $settings[$kv[0]] = (bool) $kv[1];
             } else {
                 $settings['forced_root_block'] = (bool) $kv[0];
             }
         }
     }
     $settings['removeformat_selector'] = $wf->getParam('editor.removeformat_selector', 'span,b,strong,em,i,font,u,strike', 'span,b,strong,em,i,font,u,strike');
     // Relative urls
     $settings['relative_urls'] = $wf->getParam('editor.relative_urls', 1, 1, 'boolean');
     if ($settings['relative_urls'] == 0) {
         $settings['remove_script_host'] = false;
     }
 }
开发者ID:jimyb3,项目名称:mathematicalteachingsite,代码行数:35,代码来源:config.php


示例11: getConfig

 public function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     $model = JModel::getInstance('editor', 'WFModel');
     if ($wf->getParam('media.iframes', 0)) {
         $model->removeKeys($settings['invalid_elements'], array('iframe'));
     }
     if ($wf->getParam('media.audio', 1)) {
         $model->removeKeys($settings['invalid_elements'], array('audio', 'source'));
     }
     if ($wf->getParam('media.video', 1)) {
         $model->removeKeys($settings['invalid_elements'], array('video', 'source'));
     }
     if ($wf->getParam('media.embed', 1)) {
         $model->removeKeys($settings['invalid_elements'], array('embed'));
     }
     if ($wf->getParam('media.object', 1)) {
         $model->removeKeys($settings['invalid_elements'], array('object', 'param'));
     }
     $settings['media_strict'] = $wf->getParam('media.strict', 1, 1);
     $settings['media_version_flash'] = $wf->getParam('media.version_flash', '10.1.53.64', '10,1,53,64');
     $settings['media_version_windowsmedia'] = $wf->getParam('media.version_windowsmedia', '10,00,00,3646', '10,00,00,3646');
     $settings['media_version_shockwave'] = $wf->getParam('media.version_shockwave', '10,2,0,023', '10,2,0,023');
     $settings['media_version_quicktime'] = $wf->getParam('media.version_quicktime', '7,3,0,0', '7,3,0,0');
     $settings['media_version_java'] = $wf->getParam('media.version_java', '1,5,0,0', '1,5,0,0');
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:26,代码来源:config.php


示例12: getConfig

 public static function getConfig(&$settings)
 {
     wfimport('admin.models.editor');
     $model = new WFModelEditor();
     $wf = WFEditor::getInstance();
     $settings['inline_styles'] = $wf->getParam('editor.inline_styles', 1, 1);
     // Paragraph handling
     $forced_root_block = $wf->getParam('editor.forced_root_block', '', 'p', 'string', false);
     // set as boolean if disabled
     if (is_numeric($forced_root_block)) {
         $settings['forced_root_block'] = (bool) intval($forced_root_block);
         if ($wf->getParam('editor.force_br_newlines', 0, 0, 'boolean') === false) {
             // legacy
             $settings['force_p_newlines'] = $wf->getParam('editor.force_p_newlines', 1, 0, 'boolean');
         }
     } else {
         if (strpos($forced_root_block, '|') !== false) {
             // multiple values
             foreach (explode('|', $forced_root_block) as $option) {
                 list($key, $value) = explode(':', $option);
                 $settings[$key] = (bool) $value;
             }
         } else {
             $settings['forced_root_block'] = $forced_root_block;
         }
     }
     //$settings['removeformat_selector'] = $wf->getParam('editor.removeformat_selector', 'span,b,strong,em,i,font,u,strike', 'span,b,strong,em,i,font,u,strike');
     // Relative urls
     $settings['relative_urls'] = $wf->getParam('editor.relative_urls', 1, 1, 'boolean');
     if ($settings['relative_urls'] == 0) {
         $settings['remove_script_host'] = false;
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:33,代码来源:config.php


示例13: getFonts

 /**
  * Get a list of editor font families
  *
  * @return string font family list
  * @param string $add Font family to add
  * @param string $remove Font family to remove
  */
 protected static function getFonts()
 {
     $wf = WFEditor::getInstance();
     $fonts = $wf->getParam('fontselect.fonts');
     // get fonts using legacy parameters
     if (empty($fonts)) {
         $fonts = self::$fonts;
         $add = $wf->getParam('editor.theme_advanced_fonts_add');
         $remove = $wf->getParam('editor.theme_advanced_fonts_remove');
         if (empty($remove) && empty($add)) {
             return implode(';', $fonts);
         }
         $remove = preg_split('/[;,]+/', $remove);
         if (count($remove)) {
             foreach ($fonts as $key => $value) {
                 foreach ($remove as $gone) {
                     if ($gone && preg_match('/^' . $gone . '=/i', $value)) {
                         // Remove family
                         unset($fonts[$key]);
                     }
                 }
             }
         }
         foreach (explode(";", $add) as $new) {
             // Add new font family
             if (preg_match('/([^\\=]+)(\\=)([^\\=]+)/', trim($new)) && !in_array($new, $fonts)) {
                 $fonts[] = $new;
             }
         }
         natcasesort($fonts);
         $fonts = implode(';', $fonts);
     }
     return $fonts;
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:41,代码来源:config.php


示例14: getRootDir

 /**
  * Return the full user directory path. Create if required
  *
  * @param string  The base path
  * @access public
  * @return Full path to folder
  */
 public function getRootDir()
 {
     static $root;
     if (!isset($root)) {
         $user = JFactory::getUser();
         $wf = WFEditor::getInstance();
         $profile = $wf->getProfile();
         // Get base directory as shared parameter
         $root = $this->get('dir', '');
         // Remove whitespace
         $root = trim($root);
         if (!empty($root)) {
             // Convert slashes / Strip double slashes
             $root = preg_replace('/[\\\\]+/', '/', $root);
             // Remove first leading slash
             $root = ltrim($root, '/');
             // Force default directory if base param starts with a variable or a . eg $id
             if (preg_match('/[\\.\\$]/', $root[0])) {
                 $root = 'images';
             }
             jimport('joomla.user.helper');
             // Joomla! 1.6+
             if (method_exists('JUserHelper', 'getUserGroups')) {
                 $groups = JUserHelper::getUserGroups($user->id);
                 // get keys only
                 $groups = array_keys($groups);
                 // get the first group
                 $group_id = array_shift($groups);
                 // Joomla! 2.5?
                 if (is_int($group_id)) {
                     // usergroup table
                     $group = JTable::getInstance('Usergroup');
                     $group->load($group_id);
                     // usertype
                     $usertype = $group->title;
                 } else {
                     $usertype = $group_id;
                 }
             } else {
                 $usertype = $user->usertype;
             }
             // Replace any path variables
             $pattern = array('/\\$id/', '/\\$username/', '/\\$user(group|type)/', '/\\$(group|profile)/', '/\\$day/', '/\\$month/', '/\\$year/');
             $replace = array($user->id, $user->username, $usertype, $profile->name, date('d'), date('m'), date('Y'));
             $root = preg_replace($pattern, $replace, $root);
             // split into path parts to preserve /
             $parts = explode('/', $root);
             $textcase = $wf->getParam('editor.websafe_textcase');
             if (!empty($textcase)) {
                 $textcase = array_shift($textcase);
             }
             // clean path parts
             $parts = WFUtility::makeSafe($parts, $wf->getParam('editor.websafe_mode', 'utf-8'), $wf->getParam('editor.websafe_allow_spaces', 0), $textcase);
             //join path parts
             $root = implode('/', $parts);
         }
     }
     return $root;
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:66,代码来源:filesystem.php


示例15: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     $model = new WFModelEditor();
     if ($wf->getParam('mediamanager.aggregator.youtube.enable', 1) || $wf->getParam('mediamanager.aggregator.vimeo.enable', 1)) {
         $model->removeKeys($settings['invalid_elements'], array('iframe'));
     }
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:8,代码来源:config.php


示例16: getConfig

 public function getConfig(&$settings)
 {
     // Get JContentEditor instance
     $wf = WFEditor::getInstance();
     $smilies = 'smiley-confused.gif,smiley-cool.gif,smiley-cry.gif,smiley-eek.gif,smiley-embarassed.gif,smiley-evil.gif,smiley-laughing.gif,smiley-mad.gif,smiley-neutral.gif,smiley-roll.gif,smiley-sad.gif,smiley-surprised.gif,smiley-tongue_out.gif,smiley-wink.gif,smiley-yell.gif,smiley-smile.gif';
     $settings['emotions_smilies'] = $wf->getParam('emotions.smilies');
     $settings['emotions_url'] = $wf->getParam('emotions.url');
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:8,代码来源:config.php


示例17: getStyles

 public static function getStyles()
 {
     $wf = WFEditor::getInstance();
     // only required if we're packing css
     if ($wf->getParam('editor.compress_css', 1)) {
         // add ui theme css file
         return array(dirname(dirname(__FILE__)) . '/css/dialog.css');
     }
 }
开发者ID:grlf,项目名称:eyedock,代码行数:9,代码来源:config.php


示例18: getConfig

 public static function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     wfimport('admin.models.editor');
     $model = new WFModelEditor();
     // Encoding
     $settings['entity_encoding'] = $wf->getParam('editor.entity_encoding');
     // keep &nbsp;
     $nbsp = (bool) $wf->getParam('editor.keep_nbsp', 1);
     // use named encoding with limited entities set if raw/utf-8 and keep_nbsp === true
     if ($settings['entity_encoding'] === 'raw' && $nbsp) {
         $settings['entity_encoding'] = '';
         $settings['entities'] = '160,nbsp,173,shy';
     }
     // set "plugin mode"
     $settings['cleanup_pluginmode'] = $wf->getParam('editor.cleanup_pluginmode', 0, 0);
     // get verify html (default is true)
     $settings['verify_html'] = $wf->getParam('editor.verify_html', 1, 1, 'boolean', false);
     $settings['pad_empty_tags'] = $wf->getParam('editor.pad_empty_tags', 1, 1, 'boolean');
     // set schema
     $settings['schema'] = $wf->getParam('editor.schema', 'mixed');
     if ($settings['schema'] === "html5") {
         $settings['schema'] = "html5-strict";
     }
     // Get Extended elements
     $settings['extended_valid_elements'] = $wf->getParam('editor.extended_elements', '', '');
     // Configuration list of invalid elements as array
     $settings['invalid_elements'] = explode(',', preg_replace('#\\s+#', '', $wf->getParam('editor.invalid_elements', '', '')));
     // Add elements to invalid list (removed by plugin)
     $model->addKeys($settings['invalid_elements'], self::$invalid_elements);
     // process extended_valid_elements
     if ($settings['extended_valid_elements']) {
         $extended_elements = explode(',', $settings['extended_valid_elements']);
         $elements = array();
         // add wildcard attributes if none specified
         for ($i = 0; $i < count($extended_elements); $i++) {
             $pos = strpos($extended_elements[$i], '[');
             if ($pos === false) {
                 $elements[] = $extended_elements[$i];
                 $extended_elements[$i] .= '[*]';
             } else {
                 $elements[] = substr($extended_elements[$i], 0, $pos);
             }
         }
         // restore settings to array
         $settings['extended_valid_elements'] = implode(',', $extended_elements);
         if (!empty($elements)) {
             $settings['invalid_elements'] = array_diff($settings['invalid_elements'], $elements);
         }
     }
     // remove it if it is the same as the default
     if ($settings['invalid_elements'] === self::$invalid_elements) {
         $settings['invalid_elements'] = array();
     }
     $settings['invalid_attributes'] = $wf->getParam('editor.invalid_attributes', 'dynsrc,lowsrc', 'dynsrc,lowsrc', 'string', true);
     $settings['invalid_attribute_values'] = $wf->getParam('editor.invalid_attribute_values', '', '', 'string', true);
 }
开发者ID:spikart,项目名称:spikart.com.ua,代码行数:57,代码来源:config.php


示例19: getBulletList

 private static function getBulletList()
 {
     $wf = WFEditor::getInstance();
     $bullet = (array) $wf->getParam('lists.bullet_styles');
     if (empty($bullet) || count($bullet) === 1 && array_shift($bullet) === 'default') {
         return false;
     }
     return $bullet;
 }
开发者ID:grlf,项目名称:eyedock,代码行数:9,代码来源:config.php


示例20: getConfig

 function getConfig(&$settings)
 {
     $wf = WFEditor::getInstance();
     $settings['templatemanager_selected_content_classes'] = $wf->getParam('templatemanager.selected_content_classes', '');
     $settings['templatemanager_cdate_classes'] = $wf->getParam('templatemanager.cdate_classes', 'cdate creationdate', 'cdate creationdate');
     $settings['templatemanager_mdate_classes'] = $wf->getParam('templatemanager.mdate_classes', 'mdate modifieddate', 'mdate modifieddate');
     $settings['templatemanager_cdate_format'] = $wf->getParam('templatemanager.cdate_format', '%m/%d/%Y : %H:%M:%S', '%m/%d/%Y : %H:%M:%S');
     $settings['templatemanager_mdate_format'] = $wf->getParam('templatemanager.mdate_format', '%m/%d/%Y : %H:%M:%S', '%m/%d/%Y : %H:%M:%S');
     $settings['templatemanager_content_url'] = $wf->getParam('templatemanager.content_url', '');
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:10,代码来源:config.php



注:本文中的WFEditor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP WFEditorPlugin类代码示例发布时间:2022-05-23
下一篇:
PHP WFDocument类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap