if(img&&img.GetNameLower()=="img")
			{
				var src=img.GetAttribute("src");
				OnGetImageUrl(src);
			}
			editor.SetText("");
		}
		function OnGetImageUrl(src) {
			document.getElementById("result").innerHTML = "You selected : " + src;
		}
		
	</script>
</head>
<body>
        <h1>
		    Use RichTextEditor as image selector</h1>
	    <p>
	    </p>
	    <div style="display:none;">
            <?php 
echo $rte->GetString();
?>
	    </div>
	    <br />
	    <div>
		    <button type="button" onclick="ShowEditorGallery();return false;">Select Image</button>
	    </div>
	    <br />
	    <div id="result"></div>
</body>
</html>
Beispiel #2
0
				<div>
					<button type="button" onclick="GetEditorHTML('1');">
						Get Content</button></div>
			</div>
			<div class="tab-content" id="tabs2">                
                 <?php 
echo $rte2->GetString();
?>
				<div>
					<button type="button" onclick="GetEditorHTML('2');">
						Get Content</button></div>
			</div>
			<div class="tab-content" id="tabs3">
            
                 <?php 
echo $rte3->GetString();
?>
				<div>
					<button type="button" onclick="GetEditorHTML('3');">
						Get Content</button></div>
			</div>
		</div>
		<br />
		<div>
			<h3>
				Result html:</h3>
			<div id="result">
			</div>
		</div>    
</body>
</html>
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>RichTextEditor - Default Toolbar Config</title>
	<link rel="stylesheet" href="../example.css" type="text/css" />
</head>
<body>
		<h1>
			Simple Configuration example</h1>
		<p>
			This example shows the simple Configuration of editor.
		</p>
        <?php 
echo $rte->GetString();
?>
		<br />
        <?php 
echo $rte2->GetString();
?>
		<br />
        <?php 
echo $rte3->GetString();
?>
		<br />
        <?php 
echo $rte4->GetString();
?>
</body>
</html>
	<form action="multiple_editors.php" method="post" action="<?php 
echo htmlentities($_SERVER["PHP_SELF"] . "?" . $_SERVER["QUERY_STRING"]);
?>
">
        <h1>
            Multiple Editors in one page</h1>
        <p>
            This example shows how to setup multiple editors on the same page.
        </p>
		<div>
             <?php 
echo $rte->GetString();
?>
			<br />
            <?php 
echo $rte2->GetString();
?>
			<br />
			<button type="submit">Submit</button>
		</div>
		<br />
		<div>
			<div>
				<?php 
if (strlen($rte->Text) > 0 || strlen($rte->Text) > 0) {
    echo "<div style='font-size:16px;font-weight:bold;'>RichTextEditor 1:</div><br/>" . $rte->Text . "<br/><div style='font-size:16px;font-weight:bold;'>RichTextEditor 1:</div><br/>" . $rte2->Text;
}
?>
			</div>
		</div>
	</form>