本文整理汇总了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;
//.........这里部分代码省略.........