本文整理匯總了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;
//.........這裏部分代碼省略.........