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


PHP cms_utils::get_wysiwyg_module方法代码示例

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


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

示例1: create_textarea

/**
 * A method to create a text area control
 *
 * @internal
 * @access private
 * @param boolean Wether the currently selected wysiwyg area should be enabled (depends on user, and site preferences
 * @param string  The contents of the text area
 * @param string  The name of the text area
 * @param string  An optional class name
 * @param string  An optional ID (HTML ID) value
 * @param string  The optional encoding
 * @param string  Optional style information
 * @param integer Width (the number of columns) (CSS can and will override this)
 * @param integer Hieght (the number of rows) (CSS can and will override this)
 * @param string  A flag to indicate that the wysiwyg should be forced to a different type independant of user settings
 * @param string  The name of the syntax hilighter to use (if empty it is assumed that a wysiwyg text area is requested instead of a syntax hiliter)
 * @param string  Optional additional text to include in the textarea tag
 * @return string
 */
function create_textarea($enablewysiwyg, $text, $name, $classname = '', $id = '', $encoding = '', $stylesheet = '', $width = '80', $height = '15', $forcewysiwyg = '', $wantedsyntax = '', $addtext = '')
{
    $gCms = cmsms();
    $result = '';
    $uid = get_userid(false);
    if ($enablewysiwyg == true) {
        $module = cms_utils::get_wysiwyg_module($forcewysiwyg);
        if ($module) {
            $result = $module->WYSIWYGTextArea($name, $width, $height, $encoding, $text, $stylesheet, $addtext);
        }
    }
    if (!$result && $wantedsyntax) {
        $module = cms_utils::get_syntax_highlighter_module();
        if ($module) {
            $result = $module->SyntaxTextArea($name, $wantedsyntax, $width, $height, $encoding, $text, $addtext);
        }
    }
    if ($result == '') {
        $result = '<textarea name="' . $name . '" cols="' . $width . '" rows="' . $height . '"';
        if ($classname != '') {
            $result .= ' class="' . $classname . '"';
        } else {
            $result .= ' class="cms_textarea"';
        }
        if ($id != '') {
            $result .= ' id="' . $id . '"';
        }
        if (!empty($addtext)) {
            $result .= ' ' . $addtext;
        }
        $result .= '>' . cms_htmlentities($text, ENT_NOQUOTES, get_encoding($encoding)) . '</textarea>';
    }
    return $result;
}
开发者ID:aldrymaulana,项目名称:cmsdepdagri,代码行数:53,代码来源:page.functions.php

示例2: lang

                print ']]></Details>';
            } else {
                print '<Response>Success</Response>';
                print '<Details><![CDATA[' . lang('contentupdated') . ']]></Details>';
            }
            print '</EditContent>';
            exit;
        }
    }
}
if (strlen($contentobj->Name()) > 0) {
    $CMS_ADMIN_SUBTITLE = $contentobj->Name();
}
// Detect if a WYSIWYG is in use, and grab its form submit action
$addlScriptSubmit = '';
$modobj = cms_utils::get_wysiwyg_module();
if ($modobj) {
    $addlScriptSubmit .= $modobj->WYSIWYGPageFormSubmit();
}
$closestr = cms_html_entity_decode(lang('close'));
$cancelstr = cms_html_entity_decode(lang('confirmcancel'));
$headtext .= <<<EOSCRIPT
<script type="text/javascript">
// <![CDATA[
jQuery(document).ready(function(){
  jQuery('[name=cancel]').click(function(){
    var tmp = jQuery(this).val();
    if( tmp == '{$closestr}' )
      {
\treturn true;
      }
开发者ID:rainbow-studio,项目名称:cmsms,代码行数:31,代码来源:editcontent.php

示例3: create_textarea

/**
 * A method to create a text area control
 *
 * @internal
 * @access private
 * @param boolean Wether or not we are enabling a wysiwyg.  If false, and forcewysiwyg is not empty then a syntax area is used.
 * @param string  The contents of the text area
 * @param string  The name of the text area
 * @param string  An optional class name
 * @param string  An optional ID (HTML ID) value
 * @param string  The optional encoding
 * @param string  Optional style information
 * @param integer Width (the number of columns) (CSS can and will override this)
 * @param integer Hieght (the number of rows) (CSS can and will override this)
 * @param string  Optional name of the syntax hilighter or wysiwyg to use.  If empty, preferences indicate which a syntax editor or wysiwyg should be used.
 * @param string  Optional name of the language used.  If non empty it indicates that a syntax highlihter will be used.
 * @param string  Optional additional text to include in the textarea tag
 * @return string
 */
function create_textarea($enablewysiwyg, $text, $name, $classname = '', $id = '', $encoding = '', $stylesheet = '', $width = '80', $height = '15', $forcewysiwyg = '', $wantedsyntax = '', $addtext = '')
{
    // todo: rewrite me with var args... to accept a numeric array of arguments, or a hash.
    $gCms = cmsms();
    $result = '';
    $uid = get_userid(false);
    if ($enablewysiwyg == true || $forcewysiwyg) {
        $module = cms_utils::get_wysiwyg_module($forcewysiwyg);
        if ($module) {
            $result = $module->WYSIWYGTextArea($name, $width, $height, $encoding, $text, $stylesheet, $addtext);
        }
    }
    if (!$result && $wantedsyntax) {
        // here we should get a list of installed/available modules.
        $module = cmsms()->GetModuleOperations()->GetSyntaxHighlighter($forcewysiwyg);
        if ($module) {
            $result = $module->SyntaxTextArea($name, $wantedsyntax, $width, $height, $encoding, $text, $addtext);
        }
    }
    if ($result == '') {
        $result = '<textarea name="' . $name . '" cols="' . $width . '" rows="' . $height . '"';
        if ($classname != '') {
            $result .= ' class="' . $classname . '"';
        } else {
            $result .= ' class="cms_textarea"';
        }
        if ($id != '') {
            $result .= ' id="' . $id . '"';
        }
        if (!empty($addtext)) {
            $result .= ' ' . $addtext;
        }
        $result .= '>' . cms_htmlentities($text, ENT_NOQUOTES, get_encoding($encoding)) . '</textarea>';
    }
    return $result;
}
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:55,代码来源:page.functions.php


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