當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。