Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cf70c55
Showing
31 changed files
with
1,298 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
body { | ||
padding: 0; | ||
margin: 0; | ||
/*font-family: "MS Sans Serif", "Geneva", "sans-serif";*/ | ||
|
||
/*background: white;*/ | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<!-- Template Design by TheWebhub.com | http://www.thewebhub.com | Released for free under a Creative Commons Attribution-Share Alike 3.0 Philippines --> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="content-type" content="no-cache" /> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
<title>JQuery UI - RichText widget</title> | ||
<meta name="keywords" content="jquery ui widget richtext" /> | ||
<meta name="description" content="A JQuery UI RichText widget implementation" /> | ||
<link href="style.css" rel="stylesheet" type="text/css" media="screen" /> | ||
<link href="themes/ui-lightness/ui.css" rel="stylesheet" type="text/css" media="screen" /> | ||
<link href="../jquery.richtext.css" rel="stylesheet" type="text/css" media="screen" /> | ||
|
||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | ||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script> | ||
<script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script> | ||
<script type="text/javascript" src="../jquery.richtext.js"></script> | ||
|
||
<script type="text/javascript"> | ||
$(function() { | ||
|
||
$('#switcher').themeswitcher(); | ||
|
||
function showTab(tabName) { | ||
var scrollVal = $(document).scrollTop(); | ||
|
||
$('.tab-pane').addClass('tabHidden'); | ||
$('#'+tabName).removeClass('tabHidden'); | ||
|
||
$('#menu a').removeClass('selected'); | ||
$('#menu a[href="#'+tabName+'"]').addClass('selected'); | ||
|
||
setTimeout(function() { $(document).scrollTop(scrollVal); }, 0); | ||
} | ||
|
||
|
||
var anchorSep = document.location.href.indexOf('#'); | ||
showTab( 0 <= anchorSep ? document.location.href.substr(anchorSep+1) : 'home' ); | ||
|
||
$('a.tab').click(function(e) { | ||
showTab( $(this).attr('href').substr(1) ); | ||
e.stopPropagation(); | ||
}); | ||
|
||
$('#textcontainer').richtext({ | ||
'sandboxed': true, | ||
'editorStyles': ['editor.css'] | ||
}); | ||
|
||
$('#btnEnableRTx').click(function(e) { | ||
$('#textcontainer').richtext('enable'); | ||
}); | ||
$('#btnDisableRTx').click(function(e) { | ||
$('#textcontainer').richtext('disable'); | ||
}); | ||
|
||
$('#btnToolBold').click(function(e) { | ||
$('#textcontainer').richtext('tools', 'bold'); | ||
}); | ||
$('#btnToolItalic').click(function(e) { | ||
$('#textcontainer').richtext('tools', 'italic'); | ||
}); | ||
$('#btnToolUnderline').click(function(e) { | ||
$('#textcontainer').richtext('tools', 'underline'); | ||
}); | ||
$('#btnToolStrike').click(function(e) { | ||
$('#textcontainer').richtext('tools', 'strikeThrough'); | ||
}); | ||
var _viewSource = false; | ||
$('#btnViewSource').click(function(e) { | ||
$('#textcontainer').richtext('tools', 'viewSource', _viewSource = !_viewSource); | ||
}); | ||
|
||
/* toggle in-place editing */ | ||
var _inPlaceActive = false; | ||
$('#btnToggleRTx').click(function(e) { | ||
if (_inPlaceActive) { | ||
$('#inplacecontainer').richtext('destroy'); | ||
} else { | ||
$('#inplacecontainer').richtext({ | ||
'sandboxed': false, | ||
'toolbars': false | ||
}); | ||
} | ||
_inPlaceActive = !_inPlaceActive; | ||
}); | ||
|
||
|
||
}); | ||
</script> | ||
|
||
</head> | ||
<body> | ||
<div id="wrapper"> | ||
<div id="header"> | ||
<h1>JQuery UI</h1> | ||
<h2>RichText widget</h2> | ||
</div> | ||
<div id="menu"> | ||
<ul> | ||
<li><a href="#home" class="tab">Home</a></li> | ||
<li><a href="#demo" class="tab">Demo</a></li> | ||
<li><a href="#api" class="tab">API</a></li> | ||
<li><a href="#about" class="tab">About</a></li> | ||
<li><a href="#changelog" class="tab">Changelog</a></li> | ||
</ul> | ||
</div> | ||
<div id="content"> | ||
<div id="center"> | ||
<div id="home" class="post tab-pane"> | ||
<h2>Home</h2> | ||
<p>This is a richtext editor using the JQuery UI Widget factory. It is very small and does not include any bell and whistles; just an editor. However, it can be extended in an almost unlimited way through "tools".</p> | ||
<p>...But what are you waiting for? Go check the <a href="#demo" class="tab">demo</a>, and why not also the <a href="../jquery.richtext.js">source code?</a></p> | ||
</div> | ||
<div id="demo" class="post tab-pane"> | ||
<div> | ||
<div id="switcher" style="float:right;"></div> | ||
<div class="ui-helper-clearfix"></div> | ||
</div> | ||
|
||
<h2>Demo</h2> | ||
<p> | ||
<h3>Sandboxed <TEXTAREA></h3> | ||
<p> | ||
<button id="btnEnableRTx">Enable RichText</button> | ||
<button id="btnDisableRTx">Disable RichText</button> | ||
</p> | ||
<p> | ||
<button id="btnToolBold" style="font-weight:900;">B</button> | ||
<button id="btnToolItalic" style="font-style:italic;">I</button> | ||
<button id="btnToolUnderline" style="font-decoration:underline;">U</button> | ||
<button id="btnToolStrike" style="text-decoration: line-through;">S</button> | ||
<button id="btnViewSource">Source</button> | ||
</p> | ||
<p> | ||
<textarea id="textcontainer" cols="60" rows="10">This is an <strong>HTML</strong> text container</textarea> | ||
</p> | ||
</p> | ||
|
||
<p> | ||
<h3>In-Page editing</h3> | ||
<span>(no toolbar)</span> | ||
<p> | ||
<button id="btnToggleRTx">Toggle RichText</button> | ||
</p> | ||
<p> | ||
<div id="inplacecontainer" style="height:200px;">This <code>DIV</code> has some <strong>HTML</strong> in it, and it can be <em>edited</em> if you <span style="text-decoration: underline;">toggle to the editor mode</span>.</div> | ||
</p> | ||
</p> | ||
|
||
</div> | ||
<div id="api" class="post tab-pane"> | ||
<h2>API</h2> | ||
|
||
<p>Soon!!</p> | ||
|
||
<p>Sorry! This widget is in very early development....</p> | ||
</div> | ||
<div id="about" class="post tab-pane"> | ||
<h2>About</h2> | ||
|
||
<p> | ||
<h3>Author</h3> | ||
<a href="mailto:yanick.rochon@gmail.com">Yanick Rochon</a> | ||
</p> | ||
</div> | ||
<div id="changelog" class="post tab-pane"> | ||
<h2>Changelog</h2> | ||
|
||
<p> | ||
<h3>2010-07-12 - version 0.4</h3> | ||
<ul> | ||
<li>finally added toolbar support (replace with official JQuery UI Toolbar when ready). For no toolbar, set <code>toolbars: false</code></li> | ||
<li>refactored tools extension implementations</li> | ||
<li>added widget styles (see jquery.richtext.css)</li> | ||
<li>added themeroller widget for demos</li> | ||
<li>many features still missing...</li> | ||
</ul> | ||
</p> | ||
<p> | ||
<h3>2010-06-29 - version 0.3</h3> | ||
<ul> | ||
<li>Corrected namespace (because it is not an official JQuery UI widget)/li> | ||
<li>Added <code>viewSource</code> tool</li> | ||
<li>Added an utility method to return all the available tools (<code>getAllTools</code>)</li> | ||
</ul> | ||
</p> | ||
<p> | ||
<h3>2010-06-28 - version 0.2</h3> | ||
<ul> | ||
<li>Added <code>sandbox</code> option with in-page editing</li> | ||
</ul> | ||
</p> | ||
<p> | ||
<h3>2010-06-27 - version 0.1</h3> | ||
<ul> | ||
<li>First implementation.</li> | ||
<li>Basic usage example using iframe</li> | ||
</ul> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="footer"> | ||
<p class="copyright">Copyright © 2006 Sitename.com. Template Designed by <a href="http://www.thewebhub.com/">TheWebHub.com</a> Free Icons by <a href="http://famfamfam.com/">FAMFAMFAM</a></p> | ||
<p class="links"><a href="http://validator.w3.org/check/referer" class="xhtml">Valid XHTML</a> <a href="http://jigsaw.w3.org/css-validator/check/referer" class="css">Valid CSS</a> </p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.