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


PHP MyTextSanitizer::makeTareaData4Edit方法代码示例

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


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

示例1: init_editor

function init_editor($textareaname)
{
    global $xoopsDB, ${$textareaname}, $maintext;
    $myts = new MyTextSanitizer();
    ${$textareaname} = "{$maintext}";
    ${$textareaname} = $myts->makeTareaData4Edit(${$textareaname}, 1, 1, 1);
    $myEditor = "myEditor_" . $textareaname;
    ?>

<script type="text/javascript">

window.onerror = handleErrors;
function handleErrors()
{
   //----- Used For Browsers That Don't Want To Behave -----
   return true;
}

function initToolBar(ed, myEditor) {
var eb = document.all.editbar;
if (ed!=null) {
eb._editor = window.frames[myEditor];
}}

function doFormat(what) {
var eb = document.all.editbar;
eb._editor.execCommand(what, arguments[1]);
}

function doLink(what) { 
var eb = document.all.editbar._editor;
	eb._editor.document.execCommand(what); 
}

function dounredo(what) {
var eb = document.all.editbar;
	eb._editor.document.execCommand(what, arguments[1]);
}

function swapMode() {
var eb = document.all.editbar._editor;
eb.swapModes();
}

function newFile(){
 var eb = document.all.editbar;
 eb._editor.newdocument();
}

function Help_OnClick(){
window.open("<?php 
    echo XOOPS_URL;
    ?>
/modules/<?php 
    echo $GLOBALS['drname'];
    ?>
/images/wysiwyg/help_document.htm","wHelp", "toolbar=10, scrollbars=yes, width=400, height=450");
}

function copyValue_<?php 
    echo $textareaname;
    ?>
() {
var theHtml = document.frames("<?php 
    echo $myEditor;
    ?>
").document.frames("textEdit").document.body.innerHTML;
theHtml=theHtml.replace(/(\r\n)|(\r)|(\n)/gi," ");
document.all.<?php 
    echo $textareaname;
    ?>
.value = theHtml;
}

function word_<?php 
    echo $textareaname;
    ?>
_OnClick() {
var t = document.frames("<?php 
    echo $myEditor;
    ?>
").document.frames("textEdit").document.body.innerHTML;	
	alert("Not working in this version! Not sure why? But if you could give it a try and help me out?");
	t = t.replace( /<\/?o:p>/gi, '' );
	t = t.replace( /(<td.*?>)\s*<p.*?>(.*?)<\/p>\s*<\/td>/gi, '$1$2</td>' );
	t = t.replace( /<span.*?>(.*?)<\/span>/gi, '$1' );
	t = t.replace( /<t((?:body|r|d|able)\s.*?)style=".*?"(.*?)>/gi, '<t$1$2>' );		
	document.all.<?php 
    echo $textareaname;
    ?>
.value = t;
	alert("Cleaning finished!");
}

function SwapView<?php 
    echo $textareaname;
    ?>
_OnClick() {
if(document.all.btnSwapView<?php 
    echo $textareaname;
//.........这里部分代码省略.........
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:101,代码来源:wysiwygeditor.php


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