当前位置: 首页>>代码示例>>PHP>>正文


PHP Gdn_Format::wysiwyg方法代码示例

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


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

示例1: settingsController_emojiExtender_create

 /**
  * Configure settings page in dashboard.
  *
  * @param SettingsController $sender
  * @param array $args
  */
 public function settingsController_emojiExtender_create($sender, $args)
 {
     $sender->permission('Garden.Settings.Manage');
     $cf = new ConfigurationModule($sender);
     $items = array();
     foreach ($this->getEmojiSets() as $key => $emojiSet) {
         $manifest = $this->getManifest($emojiSet);
         $selected = '<svg class="icon icon-svg-checkmark" viewBox="0 0 17 17"><use xlink:href="#checkmark" /></svg>';
         $icon = isset($manifest['icon']) ? img($emojiSet['basePath'] . '/' . $manifest['icon'], array('alt' => $manifest['name'], 'class' => 'label-selector-image')) : '';
         $items[$key] = '@<div class="image-wrap">' . $icon . '<div class="overlay">' . '<div class="buttons">' . '<a class="btn btn-overlay">' . t('Select') . '</a>' . '</div>' . '<div class="selected">' . $selected . '</div>' . '</div>' . '</div>' . '<div emojiset-body>' . '<div><b>' . htmlspecialchars($manifest['name']) . '</b></div>' . (empty($manifest['author']) ? '' : '<div class="emojiset-author info">' . sprintf(t('by %s'), $manifest['author']) . '</div>') . (empty($manifest['description']) ? '' : '<p class="emojiset-description">' . Gdn_Format::wysiwyg($manifest['description']) . '</p>') . '</div>';
     }
     $cf->initialize(array('Garden.EmojiSet' => array('LabelCode' => 'Emoji Set', 'Control' => 'radiolist', 'Items' => $items, 'Options' => array('list' => true, 'list-item-class' => 'label-selector-item', 'listclass' => 'emojiext-list label-selector', 'display' => 'after', 'class' => 'label-selector-input', 'no-grid' => true))));
     $sender->setData('Title', t('Choose Your Emoji Set'));
     $cf->renderAll();
 }
开发者ID:vanilla,项目名称:vanilla,代码行数:21,代码来源:class.emojiextender.plugin.php

示例2: settingsController_emojiExtender_create

 /**
  * Configure settings page in dashboard.
  *
  * @param SettingsController $sender
  * @param array $args
  */
 public function settingsController_emojiExtender_create($sender, $args)
 {
     $cf = new ConfigurationModule($sender);
     $items = array();
     foreach ($this->getEmojiSets() as $key => $emojiSet) {
         $manifest = $this->getManifest($emojiSet);
         $icon = isset($manifest['icon']) ? img($emojiSet['basePath'] . '/' . $manifest['icon'], array('alt' => $manifest['name'])) : '';
         $items[$key] = '@' . $icon . '<div emojiset-body>' . '<div><b>' . htmlspecialchars($manifest['name']) . '</b></div>' . (empty($manifest['author']) ? '' : '<div class="emojiset-author">' . sprintf(t('by %s'), $manifest['author']) . '</div>') . (empty($manifest['description']) ? '' : '<p class="emojiset-description">' . Gdn_Format::wysiwyg($manifest['description']) . '</p>') . '</div>';
     }
     $cf->initialize(array('Garden.EmojiSet' => array('LabelCode' => 'Emoji Set', 'Control' => 'radiolist', 'Description' => '<p>Which emoji set would you like to use?</p>', 'Items' => $items, 'Options' => array('list' => true, 'listclass' => 'emojiext-list', 'display' => 'after'))));
     $sender->addCssFile('settings.css', 'plugins/EmojiExtender');
     $sender->addSideMenu();
     $sender->setData('Title', sprintf(t('%s Settings'), 'Emoji'));
     $cf->renderAll();
 }
开发者ID:caidongyun,项目名称:vanilla,代码行数:21,代码来源:class.emojiextender.plugin.php


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