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


PHP Textarea::renderInput方法代码示例

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


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

示例1: renderInput

 public function renderInput($params = null)
 {
     OW::getDocument()->addOnloadScript('
         var _a = $("<a>", {class: "ow_hidden ow_content a"}).appendTo(document.body);
         OW.addCss(".cm-hashtag{cursor:pointer;color:" + _a.css("color") + "}");
         _a.remove();
     ');
     return parent::renderInput($params);
 }
开发者ID:tammyrocks,项目名称:photo,代码行数:9,代码来源:hashtag_form_element.php

示例2: renderInput

 /**
  * @see FormElement::renderInput()
  *
  * @param array $params
  * @return string
  */
 public function renderInput($params = null)
 {
     parent::renderInput($params);
     if ($this->textarea !== null) {
         return $this->textarea->renderInput();
     }
     if (OW::getRegistry()->get('baseWsInit') === null) {
         $language = OW::getLanguage();
         $languageDto = BOL_LanguageService::getInstance()->getCurrent();
         $array = array('editorCss' => OW::getPluginManager()->getPlugin('base')->getStaticCssUrl() . 'htmlarea_editor.css', 'themeImagesUrl' => OW::getThemeManager()->getCurrentTheme()->getStaticImagesUrl(), 'imagesUrl' => OW::getRouter()->urlFor('BASE_CTRL_MediaPanel', 'index', array('pluginKey' => 'blog', 'id' => '__id__')), 'labels' => array('buttons' => array('bold' => $language->text('base', 'ws_button_label_bold'), 'italic' => $language->text('base', 'ws_button_label_italic'), 'underline' => $language->text('base', 'ws_button_label_underline'), 'orderedlist' => $language->text('base', 'ws_button_label_orderedlist'), 'unorderedlist' => $language->text('base', 'ws_button_label_unorderedlist'), 'link' => $language->text('base', 'ws_button_label_link'), 'image' => $language->text('base', 'ws_button_label_image'), 'video' => $language->text('base', 'ws_button_label_video'), 'html' => $language->text('base', 'ws_button_label_html'), 'more' => $language->text('base', 'ws_button_label_more'), 'switchHtml' => $language->text('base', 'ws_button_label_switch_html')), 'common' => array('buttonAdd' => $language->text('base', 'ws_add_label'), 'buttonInsert' => $language->text('base', 'ws_insert_label'), 'videoHeadLabel' => $language->text('base', 'ws_video_head_label'), 'htmlHeadLabel' => $language->text('base', 'ws_html_head_label'), 'htmlTextareaLabel' => $language->text('base', 'ws_html_textarea_label'), 'videoTextareaLabel' => $language->text('base', 'ws_video_textarea_label'), 'linkTextLabel' => $language->text('base', 'ws_link_text_label'), 'linkUrlLabel' => $language->text('base', 'ws_link_url_label'), 'linkNewWindowLabel' => $language->text('base', 'ws_link_new_window_label')), 'messages' => array('imagesEmptyFields' => $language->text('base', 'ws_image_empty_fields'), 'linkEmptyFields' => $language->text('base', 'ws_link_empty_fields'), 'videoEmptyField' => $language->text('base', 'ws_video_empty_field'))), 'buttonCode' => OW::getThemeManager()->processDecorator('button', array('label' => '#label#', 'class' => 'ow_ic_add mn_submit')), 'rtl' => $languageDto !== null && (bool) $languageDto->getRtl() ? true : false);
         $script = "window.htmlAreaData = " . json_encode($array);
         OW::getDocument()->addScriptDeclarationBeforeIncludes($script);
         OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('base')->getStaticJsUrl() . 'htmlarea.js');
         OW::getDocument()->addStyleSheet(OW::getPluginManager()->getPlugin('base')->getStaticCssUrl() . 'htmlarea.css');
         OW::getRegistry()->set('baseWsInit', true);
     }
     $params = array('toolbar' => $this->buttons, 'size' => $this->size);
     if (!empty($this->customBodyClass)) {
         $params["customClass"] = $this->customBodyClass;
     }
     OW::getDocument()->addOnloadScript("\r\n            \$('#{$this->getId()}').get(0).htmlarea = function(){ \$(this).htmlarea( " . json_encode($params) . " );};\r\n            \$('#{$this->getId()}').get(0).htmlareaFocus = function(){this.jhtmlareaObject.iframe[0].contentWindow.focus();};\r\n            \$('#{$this->getId()}').get(0).htmlareaRefresh = function(){if(this.jhtmlareaObject){this.jhtmlareaObject.dispose();\$(this).htmlarea( " . json_encode($params) . " );}};\r\n        ");
     if ($this->value === null && $this->getHasInvitation()) {
         $this->addAttribute('value', $this->getInvitation());
         $this->addAttribute('class', 'invitation');
     }
     if ($this->init) {
         OW::getDocument()->addOnloadScript("\$('#{$this->getId()}').htmlarea( " . json_encode($params) . " );");
     }
     $this->removeAttribute('value');
     if ($this->value === null && $this->getHasInvitation()) {
         $markup = UTIL_HtmlTag::generateTag('textarea', $this->attributes, true, $this->getInvitation());
     } else {
         $markup = UTIL_HtmlTag::generateTag('textarea', $this->attributes, true, htmlspecialchars(BOL_TextFormatService::getInstance()->processWsForInput($this->value, array('buttons' => $this->buttons))));
     }
     return $markup;
 }
开发者ID:vBulleteen,项目名称:oxwall,代码行数:42,代码来源:form_element.php


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