@ -1,16 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<widget xmlns="http://www.w3.org/ns/widgets" |
|
||||||
xmlns:ub="http://uniboard.mnemis.com/widgets" |
|
||||||
id="http://uniboard.mnemis.com/widgets/htmleditor" |
|
||||||
version="1.1" |
|
||||||
width="542" |
|
||||||
height="350" |
|
||||||
ub:resizable="true"> |
|
||||||
|
|
||||||
<name>Html Editor</name> |
|
||||||
<author href="http://www.getuniboard.com" |
|
||||||
email="info@mnemis.com">Mnemis SA</author> |
|
||||||
<description>Simple Html editor</description> |
|
||||||
|
|
||||||
<content src="index.html"/> |
|
||||||
</widget> |
|
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
@ -1,26 +0,0 @@ |
|||||||
body { |
|
||||||
font: 13px "Trebuchet MS", Arial, Verdana; |
|
||||||
padding-top:0px; |
|
||||||
color: gray; |
|
||||||
} |
|
||||||
|
|
||||||
a { |
|
||||||
text-decoration:none; |
|
||||||
color:#3C769D; |
|
||||||
} |
|
||||||
h1 a, |
|
||||||
p em a { |
|
||||||
display:block; |
|
||||||
overflow:hidden; |
|
||||||
text-indent:-1000px; |
|
||||||
position:absolute; |
|
||||||
top:0px; left:0px; |
|
||||||
} |
|
||||||
h1 a { |
|
||||||
width:245px; height:85px; |
|
||||||
top:28px; |
|
||||||
} |
|
||||||
p em a { |
|
||||||
width:120px; height:28px; |
|
||||||
left:30px; |
|
||||||
} |
|
@ -1,82 +0,0 @@ |
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
||||||
<head> |
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
||||||
<title>markItUp! Universal markup editor</title> |
|
||||||
<link rel="stylesheet" type="text/css" href="images/style.css" /> |
|
||||||
<script type="text/javascript" src="jquery.pack.js"></script> |
|
||||||
<script type="text/javascript" src="languages.js"></script> |
|
||||||
<script type="text/javascript" src="markitup/jquery.markitup.js"></script> |
|
||||||
<script type="text/javascript" src="markitup/sets/html/set.js"></script> |
|
||||||
<link rel="stylesheet" type="text/css" href="markitup/skins/markitup/style.css" /> |
|
||||||
<link rel="stylesheet" type="text/css" href="markitup/sets/html/style.css" /> |
|
||||||
|
|
||||||
</head> |
|
||||||
<body> |
|
||||||
<script type="text/javascript" > |
|
||||||
var lang = ""; |
|
||||||
|
|
||||||
if(window.sankore){ |
|
||||||
try{ |
|
||||||
lang = sankore.locale().substr(0,2); |
|
||||||
sankoreLang[lang].welcome; |
|
||||||
} catch(e){ |
|
||||||
lang = "en"; |
|
||||||
} |
|
||||||
} else |
|
||||||
lang = "en"; |
|
||||||
|
|
||||||
$(document).ready(function(){ |
|
||||||
|
|
||||||
$("#reset-btn").hide(); |
|
||||||
|
|
||||||
$('#markItUp').markItUp(mySettings); |
|
||||||
$("#markItUp").width($(window).width()-100) |
|
||||||
.height($(window).height()-80); |
|
||||||
$('iframe').width($(window).width()-24) |
|
||||||
.height($(window).height()-46); |
|
||||||
if(window.sankore){ |
|
||||||
var html = window.sankore.preference("iHtml", sankoreLang[lang].welcome); |
|
||||||
$("#markItUp").val(html); |
|
||||||
}; |
|
||||||
|
|
||||||
$("#markItUp").keyup(function(){ |
|
||||||
if(window.sankore){ |
|
||||||
window.sankore.setPreference("iHtml", $("#markItUp").val()); |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
$("li").mouseout(function(){ |
|
||||||
if(window.sankore){ |
|
||||||
window.sankore.setPreference("iHtml", $("#markItUp").val()); |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
$("#reset-btn").click(function(){ |
|
||||||
$(this).data("hidden", true).hide(); |
|
||||||
$('textarea').show(); |
|
||||||
$('iframe').remove(); |
|
||||||
$("#fakebar").show(); |
|
||||||
$("#menu").show(); |
|
||||||
}); |
|
||||||
}); |
|
||||||
|
|
||||||
$(window).resize(function(){ |
|
||||||
$("#markItUp").width($(window).width()-100) |
|
||||||
.height($(window).height()-80); |
|
||||||
$('iframe').width($(window).width()-24) |
|
||||||
.height($(window).height()-46); |
|
||||||
$('#markItUpFooter').width($(window).width()-30); |
|
||||||
|
|
||||||
$("#markitUp").html(sankoreLang[lang].welcome); |
|
||||||
}); |
|
||||||
</script> |
|
||||||
|
|
||||||
<div id='fakebar'></div> |
|
||||||
<textarea id="markItUp" cols="80" rows="20"> |
|
||||||
Welcome to HTML EDITOR |
|
||||||
</textarea> |
|
||||||
<img id="reset-btn" src="images/bts.png" style="position:absolute; top:0; left:5"/> |
|
||||||
|
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,29 +0,0 @@ |
|||||||
var sankoreLang = { |
|
||||||
"en":{ |
|
||||||
"enter_title": "Enter yuor title here...", |
|
||||||
"welcome":"Welcome to HTML Editor", |
|
||||||
"source":"Source", |
|
||||||
"link":"Link", |
|
||||||
"preview":"Preview", |
|
||||||
"text_to_link":"Your text to link", |
|
||||||
"alt_text":"Alternative text" |
|
||||||
}, |
|
||||||
"ru":{ |
|
||||||
"enter_title": "Введите Ваш заголовок ...", |
|
||||||
"welcome":"Добро пожаловать в HTML-редактор", |
|
||||||
"source":"Источник", |
|
||||||
"link":"Ссылка", |
|
||||||
"preview":"Предпросмотр", |
|
||||||
"text_to_link":"Текст ссылки", |
|
||||||
"alt_text":"Альтернативный текст" |
|
||||||
}, |
|
||||||
"fr":{ |
|
||||||
"enter_title": "Entrer le titre yuor ici ...", |
|
||||||
"welcome":"Bienvenue sur HTML Editor", |
|
||||||
"source":"Source", |
|
||||||
"link":"Lien", |
|
||||||
"preview":"Aperçu", |
|
||||||
"text_to_link":"Votre texte à lier", |
|
||||||
"alt_text":"Texte alternatif" |
|
||||||
} |
|
||||||
}; |
|
@ -1,583 +0,0 @@ |
|||||||
// ----------------------------------------------------------------------------
|
|
||||||
// markItUp! Universal MarkUp Engine, JQuery plugin
|
|
||||||
// v 1.1.5
|
|
||||||
// Dual licensed under the MIT and GPL licenses.
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Copyright (C) 2007-2008 Jay Salvat
|
|
||||||
// http://markitup.jaysalvat.com/
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
|
||||||
// in the Software without restriction, including without limitation the rights
|
|
||||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
// copies of the Software, and to permit persons to whom the Software is
|
|
||||||
// furnished to do so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in
|
|
||||||
// all copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
// THE SOFTWARE.
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
(function($) { |
|
||||||
$.fn.markItUp = function(settings, extraSettings) { |
|
||||||
var options, ctrlKey, shiftKey, altKey; |
|
||||||
ctrlKey = shiftKey = altKey = false; |
|
||||||
|
|
||||||
options = { id: '', |
|
||||||
nameSpace: '', |
|
||||||
root: '', |
|
||||||
previewInWindow: '', // 'width=800, height=600, resizable=yes, scrollbars=yes'
|
|
||||||
previewAutoRefresh: true, |
|
||||||
previewPosition: 'after', |
|
||||||
previewTemplatePath: '~/templates/preview.html', |
|
||||||
previewParserPath: '', |
|
||||||
previewParserVar: 'data', |
|
||||||
resizeHandle: true, |
|
||||||
beforeInsert: '', |
|
||||||
afterInsert: '', |
|
||||||
onEnter: {}, |
|
||||||
onShiftEnter: {}, |
|
||||||
onCtrlEnter: {}, |
|
||||||
onTab: {}, |
|
||||||
markupSet: [ { /* set */ } ] |
|
||||||
}; |
|
||||||
$.extend(options, settings, extraSettings); |
|
||||||
|
|
||||||
// compute markItUp! path
|
|
||||||
if (!options.root) { |
|
||||||
$('script').each(function(a, tag) { |
|
||||||
miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/); |
|
||||||
if (miuScript !== null) { |
|
||||||
options.root = miuScript[1]; |
|
||||||
} |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
return this.each(function() { |
|
||||||
var $$, textarea, levels, scrollPosition, caretPosition, caretOffset, |
|
||||||
clicked, hash, header, footer, previewWindow, template, iFrame, abort; |
|
||||||
$$ = $(this); |
|
||||||
textarea = this; |
|
||||||
levels = []; |
|
||||||
abort = false; |
|
||||||
scrollPosition = caretPosition = 0; |
|
||||||
caretOffset = -1; |
|
||||||
|
|
||||||
options.previewParserPath = localize(options.previewParserPath); |
|
||||||
options.previewTemplatePath = localize(options.previewTemplatePath); |
|
||||||
|
|
||||||
// apply the computed path to ~/
|
|
||||||
function localize(data, inText) { |
|
||||||
if (inText) { |
|
||||||
return data.replace(/("|')~\//g, "$1"+options.root); |
|
||||||
} |
|
||||||
return data.replace(/^~\//, options.root); |
|
||||||
} |
|
||||||
|
|
||||||
// init and build editor
|
|
||||||
function init() { |
|
||||||
id = ''; nameSpace = ''; |
|
||||||
if (options.id) { |
|
||||||
id = 'id="'+options.id+'"'; |
|
||||||
} else if ($$.attr("id")) { |
|
||||||
id = 'id="markItUp'+($$.attr("id").substr(0, 1).toUpperCase())+($$.attr("id").substr(1))+'"'; |
|
||||||
|
|
||||||
} |
|
||||||
if (options.nameSpace) { |
|
||||||
nameSpace = 'class="'+options.nameSpace+'"'; |
|
||||||
} |
|
||||||
$$.wrap('<div '+nameSpace+'></div>'); |
|
||||||
$$.wrap('<div '+id+' class="markItUp"></div>'); |
|
||||||
$$.wrap('<div class="markItUpContainer"></div>'); |
|
||||||
$$.addClass("markItUpEditor"); |
|
||||||
|
|
||||||
// add the header before the textarea
|
|
||||||
header = $('<div id="menu" class="markItUpHeader"></div>').insertBefore($$); |
|
||||||
$(dropMenus(options.markupSet)).appendTo(header); |
|
||||||
|
|
||||||
// add the footer after the textarea
|
|
||||||
footer = $('<div class="markItUpFooter"></div>').insertAfter($$); |
|
||||||
|
|
||||||
// add the resize handle after textarea
|
|
||||||
if (options.resizeHandle === true && $.browser.safari !== true) { |
|
||||||
resizeHandle = $('<div class="markItUpResizeHandle"></div>'); |
|
||||||
footer.insertAfter($$) |
|
||||||
footer.bind("mousedown", function(e) { |
|
||||||
var h = $$.height(), y = e.clientY, mouseMove, mouseUp; |
|
||||||
mouseMove = function(e) { |
|
||||||
$$.css("height", Math.max(20, e.clientY+h-y)+"px"); |
|
||||||
return false; |
|
||||||
}; |
|
||||||
mouseUp = function(e) { |
|
||||||
$("html").unbind("mousemove", mouseMove).unbind("mouseup", mouseUp); |
|
||||||
return false; |
|
||||||
}; |
|
||||||
$("html").bind("mousemove", mouseMove).bind("mouseup", mouseUp); |
|
||||||
}); |
|
||||||
footer.append(resizeHandle); |
|
||||||
} |
|
||||||
|
|
||||||
// listen key events
|
|
||||||
$$.keydown(keyPressed).keyup(keyPressed); |
|
||||||
|
|
||||||
// bind an event to catch external calls
|
|
||||||
$$.bind("insertion", function(e, settings) { |
|
||||||
if (settings.target !== false) { |
|
||||||
get(); |
|
||||||
} |
|
||||||
if (textarea === $.markItUp.focused) { |
|
||||||
markup(settings); |
|
||||||
} |
|
||||||
}); |
|
||||||
|
|
||||||
// remember the last focus
|
|
||||||
$$.focus(function() { |
|
||||||
$.markItUp.focused = this; |
|
||||||
}); |
|
||||||
} |
|
||||||
|
|
||||||
// recursively build header with dropMenus from markupset
|
|
||||||
function dropMenus(markupSet) { |
|
||||||
var ul = $('<ul></ul>'), i = 0; |
|
||||||
$('li:hover > ul', ul).css('display', 'block'); |
|
||||||
$.each(markupSet, function() { |
|
||||||
var button = this, t = '', title, li, j; |
|
||||||
title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||''); |
|
||||||
key = (button.key) ? 'accesskey="'+button.key+'"' : ''; |
|
||||||
if (button.separator) { |
|
||||||
li = $('<li class="markItUpSeparator">'+(button.separator||'')+'</li>').appendTo(ul); |
|
||||||
} else { |
|
||||||
i++; |
|
||||||
for (j = levels.length -1; j >= 0; j--) { |
|
||||||
t += levels[j]+"-"; |
|
||||||
} |
|
||||||
li = $('<li class="markItUpButton markItUpButton'+t+(i)+' '+(button.className||'')+'"><a href="" '+key+' title="'+title+'">'+(button.name||'')+'</a></li>') |
|
||||||
.bind("contextmenu", function() { // prevent contextmenu on mac and allow ctrl+click
|
|
||||||
return false; |
|
||||||
}).click(function() { |
|
||||||
return false; |
|
||||||
}).mouseup(function() { |
|
||||||
if (button.call) { |
|
||||||
eval(button.call)(); |
|
||||||
} |
|
||||||
markup(button); |
|
||||||
return false; |
|
||||||
}).hover(function() { |
|
||||||
$('> ul', this).show(); |
|
||||||
$(document).one('click', function() { // close dropmenu if click outside
|
|
||||||
$('ul ul', header).hide(); |
|
||||||
} |
|
||||||
); |
|
||||||
}, function() { |
|
||||||
$('> ul', this).hide(); |
|
||||||
} |
|
||||||
).appendTo(ul); |
|
||||||
if (button.dropMenu) { |
|
||||||
levels.push(i); |
|
||||||
$(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu)); |
|
||||||
} |
|
||||||
} |
|
||||||
});
|
|
||||||
levels.pop(); |
|
||||||
return ul; |
|
||||||
} |
|
||||||
|
|
||||||
// markItUp! markups
|
|
||||||
function magicMarkups(string) { |
|
||||||
if (string) { |
|
||||||
string = string.toString(); |
|
||||||
string = string.replace(/\(\!\(([\s\S]*?)\)\!\)/g, |
|
||||||
function(x, a) { |
|
||||||
var b = a.split('|!|'); |
|
||||||
if (altKey === true) { |
|
||||||
return (b[1] !== undefined) ? b[1] : b[0]; |
|
||||||
} else { |
|
||||||
return (b[1] === undefined) ? "" : b[0]; |
|
||||||
} |
|
||||||
} |
|
||||||
); |
|
||||||
// [![prompt]!], [![prompt:!:value]!]
|
|
||||||
string = string.replace(/\[\!\[([\s\S]*?)\]\!\]/g, |
|
||||||
function(x, a) { |
|
||||||
var b = a.split(':!:'); |
|
||||||
if (abort === true) { |
|
||||||
return false; |
|
||||||
} |
|
||||||
value = prompt(b[0], (b[1]) ? b[1] : ''); |
|
||||||
if (value === null) { |
|
||||||
abort = true; |
|
||||||
} |
|
||||||
return value; |
|
||||||
} |
|
||||||
); |
|
||||||
return string; |
|
||||||
} |
|
||||||
return ""; |
|
||||||
} |
|
||||||
|
|
||||||
// prepare action
|
|
||||||
function prepare(action) { |
|
||||||
if ($.isFunction(action)) { |
|
||||||
action = action(hash); |
|
||||||
} |
|
||||||
return magicMarkups(action); |
|
||||||
} |
|
||||||
|
|
||||||
// build block to insert
|
|
||||||
function build(string) { |
|
||||||
openWith = prepare(clicked.openWith); |
|
||||||
placeHolder = prepare(clicked.placeHolder); |
|
||||||
replaceWith = prepare(clicked.replaceWith); |
|
||||||
closeWith = prepare(clicked.closeWith); |
|
||||||
if (replaceWith !== "") { |
|
||||||
block = openWith + replaceWith + closeWith; |
|
||||||
} else if (selection === '' && placeHolder !== '') { |
|
||||||
block = openWith + placeHolder + closeWith; |
|
||||||
} else { |
|
||||||
block = openWith + (string||selection) + closeWith; |
|
||||||
} |
|
||||||
return { block:block,
|
|
||||||
openWith:openWith,
|
|
||||||
replaceWith:replaceWith,
|
|
||||||
placeHolder:placeHolder, |
|
||||||
closeWith:closeWith |
|
||||||
}; |
|
||||||
} |
|
||||||
|
|
||||||
// define markup to insert
|
|
||||||
function markup(button) { |
|
||||||
var len, j, n, i; |
|
||||||
hash = clicked = button; |
|
||||||
get(); |
|
||||||
|
|
||||||
$.extend(hash, { line:"",
|
|
||||||
root:options.root, |
|
||||||
textarea:textarea,
|
|
||||||
selection:(selection||''),
|
|
||||||
caretPosition:caretPosition, |
|
||||||
ctrlKey:ctrlKey,
|
|
||||||
shiftKey:shiftKey,
|
|
||||||
altKey:altKey |
|
||||||
} |
|
||||||
); |
|
||||||
// callbacks before insertion
|
|
||||||
prepare(options.beforeInsert); |
|
||||||
prepare(clicked.beforeInsert); |
|
||||||
if (ctrlKey === true && shiftKey === true) { |
|
||||||
prepare(clicked.beforeMultiInsert); |
|
||||||
}
|
|
||||||
$.extend(hash, { line:1 }); |
|
||||||
|
|
||||||
if (ctrlKey === true && shiftKey === true) { |
|
||||||
lines = selection.split(/\r?\n/); |
|
||||||
for (j = 0, n = lines.length, i = 0; i < n; i++) { |
|
||||||
if ($.trim(lines[i]) !== '') { |
|
||||||
$.extend(hash, { line:++j, selection:lines[i] } ); |
|
||||||
lines[i] = build(lines[i]).block; |
|
||||||
} else { |
|
||||||
lines[i] = ""; |
|
||||||
} |
|
||||||
} |
|
||||||
string = { block:lines.join('\n')}; |
|
||||||
start = caretPosition; |
|
||||||
len = string.block.length + (($.browser.opera) ? n : 0); |
|
||||||
} else if (ctrlKey === true) { |
|
||||||
string = build(selection); |
|
||||||
start = caretPosition + string.openWith.length; |
|
||||||
len = string.block.length - string.openWith.length - string.closeWith.length; |
|
||||||
len -= fixIeBug(string.block); |
|
||||||
} else if (shiftKey === true) { |
|
||||||
string = build(selection); |
|
||||||
start = caretPosition; |
|
||||||
len = string.block.length; |
|
||||||
len -= fixIeBug(string.block); |
|
||||||
} else { |
|
||||||
string = build(selection); |
|
||||||
start = caretPosition + string.block.length ; |
|
||||||
len = 0; |
|
||||||
start -= fixIeBug(string.block); |
|
||||||
} |
|
||||||
if ((selection === '' && string.replaceWith === '')) { |
|
||||||
caretOffset += fixOperaBug(string.block); |
|
||||||
|
|
||||||
start = caretPosition + string.openWith.length; |
|
||||||
len = string.block.length - string.openWith.length - string.closeWith.length; |
|
||||||
|
|
||||||
caretOffset = $$.val().substring(caretPosition, $$.val().length).length; |
|
||||||
caretOffset -= fixOperaBug($$.val().substring(0, caretPosition)); |
|
||||||
} |
|
||||||
$.extend(hash, { caretPosition:caretPosition, scrollPosition:scrollPosition } ); |
|
||||||
|
|
||||||
if (string.block !== selection && abort === false) { |
|
||||||
insert(string.block); |
|
||||||
set(start, len); |
|
||||||
} else { |
|
||||||
caretOffset = -1; |
|
||||||
} |
|
||||||
get(); |
|
||||||
|
|
||||||
$.extend(hash, { line:'', selection:selection }); |
|
||||||
|
|
||||||
// callbacks after insertion
|
|
||||||
if (ctrlKey === true && shiftKey === true) { |
|
||||||
prepare(clicked.afterMultiInsert); |
|
||||||
} |
|
||||||
prepare(clicked.afterInsert); |
|
||||||
prepare(options.afterInsert); |
|
||||||
|
|
||||||
// refresh preview if opened
|
|
||||||
if (previewWindow && options.previewAutoRefresh) { |
|
||||||
refreshPreview();
|
|
||||||
} |
|
||||||
|
|
||||||
// reinit keyevent
|
|
||||||
shiftKey = altKey = ctrlKey = abort = false; |
|
||||||
} |
|
||||||
|
|
||||||
// Substract linefeed in Opera
|
|
||||||
function fixOperaBug(string) { |
|
||||||
if ($.browser.opera) { |
|
||||||
return string.length - string.replace(/\n*/g, '').length; |
|
||||||
} |
|
||||||
return 0; |
|
||||||
} |
|
||||||
// Substract linefeed in IE
|
|
||||||
function fixIeBug(string) { |
|
||||||
if ($.browser.msie) { |
|
||||||
return string.length - string.replace(/\r*/g, '').length; |
|
||||||
} |
|
||||||
return 0; |
|
||||||
} |
|
||||||
|
|
||||||
// add markup
|
|
||||||
function insert(block) {
|
|
||||||
if (document.selection) { |
|
||||||
var newSelection = document.selection.createRange(); |
|
||||||
newSelection.text = block; |
|
||||||
} else { |
|
||||||
$$.val($$.val().substring(0, caretPosition) + block + $$.val().substring(caretPosition + selection.length, $$.val().length)); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
// set a selection
|
|
||||||
function set(start, len) { |
|
||||||
if (textarea.createTextRange){ |
|
||||||
// quick fix to make it work on Opera 9.5
|
|
||||||
if ($.browser.opera && $.browser.version >= 9.5 && len == 0) { |
|
||||||
return false; |
|
||||||
} |
|
||||||
range = textarea.createTextRange(); |
|
||||||
range.collapse(true); |
|
||||||
range.moveStart('character', start);
|
|
||||||
range.moveEnd('character', len);
|
|
||||||
range.select(); |
|
||||||
} else if (textarea.setSelectionRange ){ |
|
||||||
textarea.setSelectionRange(start, start + len); |
|
||||||
} |
|
||||||
textarea.scrollTop = scrollPosition; |
|
||||||
textarea.focus(); |
|
||||||
} |
|
||||||
|
|
||||||
// get the selection
|
|
||||||
function get() { |
|
||||||
textarea.focus(); |
|
||||||
|
|
||||||
scrollPosition = textarea.scrollTop; |
|
||||||
if (document.selection) { |
|
||||||
selection = document.selection.createRange().text; |
|
||||||
if ($.browser.msie) { // ie
|
|
||||||
var range = document.selection.createRange(), rangeCopy = range.duplicate(); |
|
||||||
rangeCopy.moveToElementText(textarea); |
|
||||||
caretPosition = -1; |
|
||||||
while(rangeCopy.inRange(range)) { // fix most of the ie bugs with linefeeds...
|
|
||||||
rangeCopy.moveStart('character'); |
|
||||||
caretPosition ++; |
|
||||||
} |
|
||||||
} else { // opera
|
|
||||||
caretPosition = textarea.selectionStart; |
|
||||||
} |
|
||||||
} else { // gecko
|
|
||||||
caretPosition = textarea.selectionStart; |
|
||||||
selection = $$.val().substring(caretPosition, textarea.selectionEnd); |
|
||||||
}
|
|
||||||
return selection; |
|
||||||
} |
|
||||||
|
|
||||||
// open preview window
|
|
||||||
function preview() { |
|
||||||
$('textarea').hide(); |
|
||||||
if (!previewWindow || previewWindow.closed) { |
|
||||||
if (options.previewInWindow) { |
|
||||||
previewWindow = window.open('', 'preview', options.previewInWindow); |
|
||||||
|
|
||||||
} else { |
|
||||||
iFrame = $('<iframe frameborder="0" class="markItUpPreviewFrame"></iframe>'); |
|
||||||
if (options.previewPosition == 'after') { |
|
||||||
iFrame.insertAfter(footer); |
|
||||||
} else { |
|
||||||
iFrame.insertBefore(header); |
|
||||||
}
|
|
||||||
previewWindow = iFrame[iFrame.length-1].contentWindow || frame[iFrame.length-1]; |
|
||||||
} |
|
||||||
} else if (altKey === true) { |
|
||||||
if (iFrame) { |
|
||||||
iFrame.remove(); |
|
||||||
} |
|
||||||
|
|
||||||
previewWindow.close(); |
|
||||||
previewWindow = iFrame = false; |
|
||||||
} |
|
||||||
if (!options.previewAutoRefresh) { |
|
||||||
refreshPreview();
|
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
// refresh Preview window
|
|
||||||
function refreshPreview() { |
|
||||||
$('iframe').width($(window).width()-24) |
|
||||||
.height($(window).height()-49); |
|
||||||
if (previewWindow.document) {
|
|
||||||
try { |
|
||||||
sp = previewWindow.document.documentElement.scrollTop |
|
||||||
} catch(e) { |
|
||||||
sp = 0; |
|
||||||
}
|
|
||||||
previewWindow.document.open(); |
|
||||||
previewWindow.document.write(renderPreview()); |
|
||||||
previewWindow.document.close(); |
|
||||||
previewWindow.document.documentElement.scrollTop = sp; |
|
||||||
} |
|
||||||
if (options.previewInWindow) { |
|
||||||
previewWindow.focus(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
function renderPreview() {
|
|
||||||
if (options.previewParserPath !== '') { |
|
||||||
$.ajax( { |
|
||||||
type: 'POST', |
|
||||||
async: false, |
|
||||||
url: options.previewParserPath, |
|
||||||
data: options.previewParserVar+'='+encodeURIComponent($$.val()), |
|
||||||
success: function(data) { |
|
||||||
phtml = localize(data, 1);
|
|
||||||
} |
|
||||||
} ); |
|
||||||
} else { |
|
||||||
if (!template) { |
|
||||||
$.ajax( { |
|
||||||
async: false, |
|
||||||
url: options.previewTemplatePath, |
|
||||||
success: function(data) { |
|
||||||
template = localize(data, 1);
|
|
||||||
} |
|
||||||
} ); |
|
||||||
} |
|
||||||
phtml = template.replace(/<!-- content -->/g, $$.val()); |
|
||||||
} |
|
||||||
if(window.uniboard){ |
|
||||||
window.uniboard.setPreference("html", $('textarea').val()); |
|
||||||
}; |
|
||||||
|
|
||||||
$("#fakebar").hide(); |
|
||||||
$("#menu").hide(); |
|
||||||
$("#reset-btn").fadeIn(500).data("hidden", false) |
|
||||||
.animate({ |
|
||||||
top:-12 |
|
||||||
},1500) |
|
||||||
.mouseover(function(){ |
|
||||||
$(this).css({ |
|
||||||
top:0 |
|
||||||
}); |
|
||||||
}) |
|
||||||
.mouseout(function(){ |
|
||||||
$(this).css({ |
|
||||||
top:-12 |
|
||||||
}); |
|
||||||
|
|
||||||
if($(this).data("hidden")){ |
|
||||||
$(this).css({top:0}) |
|
||||||
}; |
|
||||||
}); |
|
||||||
return phtml; |
|
||||||
} |
|
||||||
|
|
||||||
// set keys pressed
|
|
||||||
function keyPressed(e) {
|
|
||||||
shiftKey = e.shiftKey; |
|
||||||
altKey = e.altKey; |
|
||||||
ctrlKey = (!(e.altKey && e.ctrlKey)) ? e.ctrlKey : false; |
|
||||||
|
|
||||||
if (e.type === 'keydown') { |
|
||||||
if (ctrlKey === true) { |
|
||||||
li = $("a[accesskey="+String.fromCharCode(e.keyCode)+"]", header).parent('li'); |
|
||||||
if (li.length !== 0) { |
|
||||||
ctrlKey = false; |
|
||||||
li.triggerHandler('mouseup'); |
|
||||||
return false; |
|
||||||
} |
|
||||||
} |
|
||||||
if (e.keyCode === 13 || e.keyCode === 10) { // Enter key
|
|
||||||
if (ctrlKey === true) { // Enter + Ctrl
|
|
||||||
ctrlKey = false; |
|
||||||
markup(options.onCtrlEnter); |
|
||||||
return options.onCtrlEnter.keepDefault; |
|
||||||
} else if (shiftKey === true) { // Enter + Shift
|
|
||||||
shiftKey = false; |
|
||||||
markup(options.onShiftEnter); |
|
||||||
return options.onShiftEnter.keepDefault; |
|
||||||
} else { // only Enter
|
|
||||||
markup(options.onEnter); |
|
||||||
return options.onEnter.keepDefault; |
|
||||||
} |
|
||||||
} |
|
||||||
if (e.keyCode === 9) { // Tab key
|
|
||||||
if (shiftKey == true || ctrlKey == true || altKey == true) { // Thx Dr Floob.
|
|
||||||
return false;
|
|
||||||
} |
|
||||||
if (caretOffset !== -1) { |
|
||||||
get(); |
|
||||||
caretOffset = $$.val().length - caretOffset; |
|
||||||
set(caretOffset, 0); |
|
||||||
caretOffset = -1; |
|
||||||
return false; |
|
||||||
} else { |
|
||||||
markup(options.onTab); |
|
||||||
return options.onTab.keepDefault; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
init(); |
|
||||||
}); |
|
||||||
}; |
|
||||||
|
|
||||||
$.fn.markItUpRemove = function() { |
|
||||||
return this.each(function() { |
|
||||||
$$ = $(this).unbind().removeClass('markItUpEditor'); |
|
||||||
$$.parent('div').parent('div.markItUp').parent('div').replaceWith($$); |
|
||||||
} |
|
||||||
); |
|
||||||
}; |
|
||||||
|
|
||||||
$.markItUp = function(settings) { |
|
||||||
var options = { target:false }; |
|
||||||
$.extend(options, settings); |
|
||||||
if (options.target) { |
|
||||||
return $(options.target).each(function() { |
|
||||||
$(this).focus(); |
|
||||||
$(this).trigger('insertion', [options]); |
|
||||||
}); |
|
||||||
} else { |
|
||||||
$('textarea').trigger('insertion', [options]); |
|
||||||
} |
|
||||||
}; |
|
||||||
})(jQuery); |
|
@ -1,62 +0,0 @@ |
|||||||
markItUp! 1.1.5 |
|
||||||
|
|
||||||
CHANGE LOG |
|
||||||
markItUp! 1.1.5 2009-05-01 |
|
||||||
- Modified: http://drupal.org/project/wysiwyg compatibility |
|
||||||
- Modified: Alt/Ctrl/Alt+Tab are now disabled |
|
||||||
|
|
||||||
markItUp! 1.1.4 2008-12-03 |
|
||||||
- Fixed: Extra quote deleted line 95 |
|
||||||
|
|
||||||
markItUp! 1.1.3 2008-09-12 |
|
||||||
- Fixed: IE7 preview problem |
|
||||||
|
|
||||||
markItUp! 1.1.2 2008-07-17 |
|
||||||
- Fixed: Quick fix for Opera 9.5 caret position problem after insertion |
|
||||||
|
|
||||||
markItUp! 1.1.1 2008-06-02 |
|
||||||
- Fixed: Key events status are passed to callbacks properly |
|
||||||
- Improved: ScrollPosition is kept in the preview when its refreshed |
|
||||||
|
|
||||||
markItUp! 1.1.0 2008-05-04 |
|
||||||
- Modified: Textarea's id is no more moved to the main container |
|
||||||
- Modified: NameSpace Span become a Div to remain strict |
|
||||||
- Added: Relative path to the script is computed |
|
||||||
- Added: Relative path to the script passed to callbacks |
|
||||||
- Added: Global instance ID property |
|
||||||
- Added: $(element).markItUpRemove() to remove markItUp! |
|
||||||
- Added: Resize handle is now optional with resizeHandle property |
|
||||||
- Added: Property previewInWindow is added and accept window parameter |
|
||||||
- Added: Property previewPosition is added |
|
||||||
- Modified: Resize handle is no more displayed in Safari to avoid repetition with the native handle |
|
||||||
- Modified: Property previewIframeRefresh become previewAutorefresh |
|
||||||
- Modified: Built-in Html Preview call a template file |
|
||||||
- Improved: Autorefreshing is now apply for preview in window too |
|
||||||
- Improved: Cancel button in prompt window cancel now the whole insertion process |
|
||||||
- Improved: Cleaner markItUp! code added to the DOM |
|
||||||
- Removed: Depreciated preview properties as previewBaseUrl, previewCharset, previewCssPath, previewBodyId, previewBodyClassName |
|
||||||
- Removed: Property previewIframe not longer exists |
|
||||||
- Fixed: "Magic markups" works with line feeds |
|
||||||
- Fixed: Key events are initialized after insertion |
|
||||||
- Fixed: Internet Explorer line feed offset bug |
|
||||||
- Fixed: Shortcut keys on Mac OS |
|
||||||
- Fixed: Ctrl+click works and doesn't open Mac context menu anymore |
|
||||||
- Fixed: Ctrl+click works and doesn't open the page in a new tab anymore |
|
||||||
- Fixed: Minor Css modifications |
|
||||||
|
|
||||||
markItUp! 1.0.3 2008-04-04 |
|
||||||
- Fixed: IE7 Preview empty baseurl problem |
|
||||||
- Fixed: IE7 external targeted insertion |
|
||||||
- Added: Property scrollPosition is passed to callbacks functions |
|
||||||
|
|
||||||
markItUp! 1.0.2 2008-03-31 |
|
||||||
- Fixed: IE7 Html preview problems |
|
||||||
- Fixed: Selection is kept if nothing is inserted |
|
||||||
- Improved: Code minified |
|
||||||
|
|
||||||
markItUp! 1.0.1 2008-03-21 |
|
||||||
- Removed: Global PlaceHolder |
|
||||||
- Modified: Property previewCharset is setted to "utf-8" by default |
|
||||||
|
|
||||||
markItUp! 1.0.0 2008-03-01 |
|
||||||
- First public release |
|
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 667 B |
Before Width: | Height: | Size: 516 B |
Before Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 269 B |
@ -1,27 +0,0 @@ |
|||||||
// ----------------------------------------------------------------------------
|
|
||||||
// markItUp!
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Copyright (C) 2008 Jay Salvat
|
|
||||||
// http://markitup.jaysalvat.com/
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Html tags
|
|
||||||
// http://en.wikipedia.org/wiki/html
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Basic set. Feel free to add more tags
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
mySettings = {
|
|
||||||
onShiftEnter: {keepDefault:false, replaceWith:'<br />\n'}, |
|
||||||
onCtrlEnter: {keepDefault:false, openWith:'\n<p>', closeWith:'</p>'}, |
|
||||||
onTab: {keepDefault:false, replaceWith:' '}, |
|
||||||
markupSet: [
|
|
||||||
{name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' }, |
|
||||||
{name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)' }, |
|
||||||
{name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' }, |
|
||||||
{separator:'---------------' }, |
|
||||||
{name:'Picture', key:'P', replaceWith:'<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />' }, |
|
||||||
{name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' }, |
|
||||||
{separator:'---------------' }, |
|
||||||
{name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
|
|
||||||
{name:'Preview', className:'preview', call:'preview'} |
|
||||||
] |
|
||||||
} |
|
@ -1,27 +0,0 @@ |
|||||||
/* ------------------------------------------------------------------- |
|
||||||
// markItUp! |
|
||||||
// By Jay Salvat - http://markitup.jaysalvat.com/ |
|
||||||
// ------------------------------------------------------------------*/ |
|
||||||
.markItUp .markItUpButton1 a { |
|
||||||
background-image:url(images/bold.png); |
|
||||||
} |
|
||||||
.markItUp .markItUpButton2 a { |
|
||||||
background-image:url(images/italic.png); |
|
||||||
} |
|
||||||
.markItUp .markItUpButton3 a { |
|
||||||
background-image:url(images/stroke.png); |
|
||||||
} |
|
||||||
|
|
||||||
.markItUp .markItUpButton4 a { |
|
||||||
background-image:url(images/picture.png); |
|
||||||
} |
|
||||||
.markItUp .markItUpButton5 a { |
|
||||||
background-image:url(images/link.png); |
|
||||||
} |
|
||||||
|
|
||||||
.markItUp .markItUpButton6 a { |
|
||||||
background-image:url(images/clean.png); |
|
||||||
} |
|
||||||
.markItUp .preview a { |
|
||||||
background-image:url(images/preview.png); |
|
||||||
} |
|
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 306 B |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 516 B |
Before Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 343 B |
Before Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 248 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 269 B |
@ -1,11 +0,0 @@ |
|||||||
Markup language: |
|
||||||
Html |
|
||||||
|
|
||||||
Description: |
|
||||||
A basic Html markup set with Headings, Paragraph, Bold, Italic, Stroke through, Picture, Link, List, Clean button, Preview button. |
|
||||||
|
|
||||||
Install: |
|
||||||
- Download the zip file |
|
||||||
- Unzip it in your markItUp! sets folder |
|
||||||
- Modify your JS link to point at this set.js |
|
||||||
- Modify your CSS link to point at this style.css |
|
@ -1,52 +0,0 @@ |
|||||||
// ----------------------------------------------------------------------------
|
|
||||||
// markItUp!
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Copyright (C) 2008 Jay Salvat
|
|
||||||
// http://markitup.jaysalvat.com/
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Html tags
|
|
||||||
// http://en.wikipedia.org/wiki/html
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Basic set. Feel free to add more tags
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
var lang = ""; |
|
||||||
|
|
||||||
if(window.sankore){ |
|
||||||
try{ |
|
||||||
lang = sankore.locale().substr(0,2); |
|
||||||
sankoreLang[lang].welcome; |
|
||||||
} catch(e){ |
|
||||||
lang = "en"; |
|
||||||
} |
|
||||||
} else
|
|
||||||
lang = "en"; |
|
||||||
|
|
||||||
mySettings = { |
|
||||||
onShiftEnter: {keepDefault:false, replaceWith:'<br />\n'}, |
|
||||||
onCtrlEnter: {keepDefault:false, openWith:'\n<p>', closeWith:'</p>\n'}, |
|
||||||
onTab: {keepDefault:false, openWith:' '}, |
|
||||||
markupSet: [ |
|
||||||
{name:'Heading 1', key:'1', openWith:'<h1(!( class="[![Class]!]")!)>', closeWith:'</h1>', placeHolder:sankoreLang[lang].enter_title}, |
|
||||||
{name:'Heading 2', key:'2', openWith:'<h2(!( class="[![Class]!]")!)>', closeWith:'</h2>', placeHolder:sankoreLang[lang].enter_title}, |
|
||||||
{name:'Heading 3', key:'3', openWith:'<h3(!( class="[![Class]!]")!)>', closeWith:'</h3>', placeHolder:sankoreLang[lang].enter_title}, |
|
||||||
{name:'Heading 4', key:'4', openWith:'<h4(!( class="[![Class]!]")!)>', closeWith:'</h4>', placeHolder:sankoreLang[lang].enter_title}, |
|
||||||
{name:'Heading 5', key:'5', openWith:'<h5(!( class="[![Class]!]")!)>', closeWith:'</h5>', placeHolder:sankoreLang[lang].enter_title}, |
|
||||||
{name:'Heading 6', key:'6', openWith:'<h6(!( class="[![Class]!]")!)>', closeWith:'</h6>', placeHolder:sankoreLang[lang].enter_title}, |
|
||||||
{name:'Paragraph', openWith:'<p(!( class="[![Class]!]")!)>', closeWith:'</p>'}, |
|
||||||
{separator:'---------------'}, |
|
||||||
{name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)'}, |
|
||||||
{name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)'}, |
|
||||||
{name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>'}, |
|
||||||
{separator:'---------------'}, |
|
||||||
{name:'Ul', openWith:'<ul>\n', closeWith:'</ul>\n'}, |
|
||||||
{name:'Ol', openWith:'<ol>\n', closeWith:'</ol>\n'}, |
|
||||||
{name:'Li', openWith:'<li>', closeWith:'</li>'}, |
|
||||||
{separator:'---------------'}, |
|
||||||
{name:'Picture', key:'P', replaceWith:'<img src="[![' + sankoreLang[lang].source + ':!:http://]!]" alt="[![' + sankoreLang[lang].alt_text + ']!]" />'}, |
|
||||||
{name:'Link', key:'L', openWith:'<a target="_blank" href="[![' + sankoreLang[lang].link + ':!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:sankoreLang[lang].text_to_link}, |
|
||||||
{separator:'---------------'}, |
|
||||||
//{name:'Editor', className:'clean', replaceWith:function() { $('textarea').show(); $('iframe').remove();} },
|
|
||||||
{name:'', className:'preview', call:'preview'} |
|
||||||
] |
|
||||||
} |
|
@ -1,75 +0,0 @@ |
|||||||
/* ------------------------------------------------------------------- |
|
||||||
// markItUp! |
|
||||||
// By Jay Salvat - http://markitup.jaysalvat.com/ |
|
||||||
// ------------------------------------------------------------------*/ |
|
||||||
.markItUp .markItUpButton1 a { |
|
||||||
background-image:url(images/h1.png); |
|
||||||
background-repeat:no-repeat; |
|
||||||
} |
|
||||||
.markItUp .markItUpButton2 a { |
|
||||||
background-image:url(images/h2.png); |
|
||||||
background-repeat:no-repeat; |
|
||||||
} |
|
||||||
.markItUp .markItUpButton3 a { |
|
||||||
background-image:url(images/h3.png); |
|
||||||
background-repeat:no-repeat; |
|
||||||
} |
|
||||||
.markItUp .markItUpButton4 a { |
|
||||||
background-image:url(images/h4.png); |
|
||||||
background-repeat:no-repeat; |
|
||||||
} |
|
||||||
.markItUp .markItUpButton5 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/h5.png); |
|
||||||
} |
|
||||||
.markItUp .markItUpButton6 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/h6.png); |
|
||||||
} |
|
||||||
.markItUp .markItUpButton7 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/paragraph.png); |
|
||||||
} |
|
||||||
|
|
||||||
.markItUp .markItUpButton8 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/bold.png); |
|
||||||
} |
|
||||||
.markItUp .markItUpButton9 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/italic.png); |
|
||||||
} |
|
||||||
.markItUp .markItUpButton10 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/stroke.png); |
|
||||||
} |
|
||||||
|
|
||||||
.markItUp .markItUpButton11 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/list-bullet.png); |
|
||||||
} |
|
||||||
.markItUp .markItUpButton12 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/list-numeric.png); |
|
||||||
} |
|
||||||
.markItUp .markItUpButton13 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/list-item.png); |
|
||||||
} |
|
||||||
|
|
||||||
.markItUp .markItUpButton14 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/picture.png); |
|
||||||
} |
|
||||||
.markItUp .markItUpButton15 a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
background-image:url(images/link.png); |
|
||||||
} |
|
||||||
|
|
||||||
.markItUp .preview a { |
|
||||||
background-repeat:no-repeat; |
|
||||||
margin-top:-2px; |
|
||||||
width:46px; |
|
||||||
height:20px; |
|
||||||
background-image:url(images/preview.png); |
|
||||||
} |
|
Before Width: | Height: | Size: 394 B |
Before Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 487 B |
Before Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 240 B |
@ -1,7 +0,0 @@ |
|||||||
Skin: |
|
||||||
MacOSX inspired look & feel |
|
||||||
|
|
||||||
Install: |
|
||||||
- Download the zip file |
|
||||||
- Unzip it in your markItUp! skins folder |
|
||||||
- Modify your CSS link to point at this skin |
|
@ -1,139 +0,0 @@ |
|||||||
/* ------------------------------------------------------------------- |
|
||||||
// markItUp! Universal MarkUp Engine, JQuery plugin |
|
||||||
// By Jay Salvat - http://markitup.jaysalvat.com/ |
|
||||||
// ------------------------------------------------------------------*/ |
|
||||||
body { |
|
||||||
/* background-color:#3875D7;*/ |
|
||||||
} |
|
||||||
.markItUp { |
|
||||||
background-color:#3875D7; |
|
||||||
border:1px solid #3C769D; |
|
||||||
padding:13px; |
|
||||||
} |
|
||||||
.markItUp * { |
|
||||||
margin:0px; padding:0px; |
|
||||||
outline:none; |
|
||||||
} |
|
||||||
.markItUp a:link, |
|
||||||
.markItUp a:visited { |
|
||||||
color:#000; |
|
||||||
text-decoration:none; |
|
||||||
} |
|
||||||
.markItUp { |
|
||||||
width:670px; |
|
||||||
margin:5px 0 5px 0; |
|
||||||
} |
|
||||||
.markItUpContainer { |
|
||||||
width:670px; |
|
||||||
font:11px Verdana, Arial, Helvetica, sans-serif; |
|
||||||
background-image:url(images/bg-container.png); |
|
||||||
} |
|
||||||
.markItUpEditor { |
|
||||||
font:12px 'Courier New', Courier, monospace; |
|
||||||
padding:5px; |
|
||||||
margin:0px 11px 0px 11px; |
|
||||||
width:640px; |
|
||||||
height:320px; |
|
||||||
clear:both; display:block; |
|
||||||
line-height:18px; |
|
||||||
overflow:auto; |
|
||||||
border:0px solid white; |
|
||||||
} |
|
||||||
.markItUpPreviewFrame { |
|
||||||
overflow:auto; |
|
||||||
background-color:#FFFFFF; |
|
||||||
width:99.9%; |
|
||||||
height:350px; |
|
||||||
margin:5px 0; |
|
||||||
} |
|
||||||
.markItUpHeader { |
|
||||||
width:650px; |
|
||||||
padding:15px 0px 0px 20px; |
|
||||||
height:25px; |
|
||||||
background-image:url(images/bg-header.png); |
|
||||||
} |
|
||||||
.markItUpFooter { |
|
||||||
width:670px; |
|
||||||
height:25px; |
|
||||||
background-image:url(images/bg-footer.png); |
|
||||||
padding-bottom:10px; |
|
||||||
} |
|
||||||
.markItUpResizeHandle { |
|
||||||
margin:0px 12px 5px auto; |
|
||||||
overflow:hidden; |
|
||||||
width:12px; height:12px; |
|
||||||
position:relative; |
|
||||||
background-image:url(images/handle.png); |
|
||||||
cursor:n-resize; |
|
||||||
} |
|
||||||
/***************************************************************************************/ |
|
||||||
/* first row of buttons */ |
|
||||||
.markItUpHeader ul li { |
|
||||||
list-style:none; |
|
||||||
float:left; |
|
||||||
position:relative; |
|
||||||
} |
|
||||||
.markItUpHeader ul li:hover > ul{ |
|
||||||
display:block; |
|
||||||
} |
|
||||||
.markItUpHeader ul .markItUpDropMenu { |
|
||||||
background:transparent url(images/menu.png) no-repeat 115% 50%; |
|
||||||
margin-right:5px; |
|
||||||
} |
|
||||||
.markItUpHeader ul .markItUpDropMenu li { |
|
||||||
margin-right:0px; |
|
||||||
} |
|
||||||
/* next rows of buttons */ |
|
||||||
.markItUpHeader ul ul { |
|
||||||
display:none; |
|
||||||
position:absolute; |
|
||||||
top:18px; left:0px; |
|
||||||
background:#FFF; |
|
||||||
border:1px solid #000; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul li { |
|
||||||
float:none; |
|
||||||
border-bottom:1px solid #000; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul .markItUpDropMenu { |
|
||||||
background:#FFF url(images/submenu.png) no-repeat 100% 50%; |
|
||||||
} |
|
||||||
.markItUpHeader ul .markItUpSeparator { |
|
||||||
margin:0 10px; |
|
||||||
width:1px; |
|
||||||
height:16px; |
|
||||||
overflow:hidden; |
|
||||||
background-color:#CCC; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul .markItUpSeparator { |
|
||||||
width:auto; height:1px; |
|
||||||
margin:0px; |
|
||||||
} |
|
||||||
/* next rows of buttons */ |
|
||||||
.markItUpHeader ul ul ul { |
|
||||||
position:absolute; |
|
||||||
top:-1px; left:150px; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul ul li { |
|
||||||
float:none; |
|
||||||
} |
|
||||||
.markItUpHeader ul a { |
|
||||||
display:block; |
|
||||||
width:16px; height:16px; |
|
||||||
text-indent:-10000px; |
|
||||||
background-repeat:no-repeat; |
|
||||||
padding:3px; |
|
||||||
margin:0px; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul a { |
|
||||||
display:block; |
|
||||||
padding-left:0px; |
|
||||||
text-indent:0; |
|
||||||
width:120px; |
|
||||||
padding:5px 5px 5px 25px; |
|
||||||
background-position:2px 50%; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul a:hover { |
|
||||||
color:#FFF; |
|
||||||
background-color:#3875D7; |
|
||||||
} |
|
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 240 B |
@ -1,149 +0,0 @@ |
|||||||
/* ------------------------------------------------------------------- |
|
||||||
// markItUp! Universal MarkUp Engine, JQuery plugin |
|
||||||
// By Jay Salvat - http://markitup.jaysalvat.com/ |
|
||||||
// ------------------------------------------------------------------*/ |
|
||||||
.markItUp * { |
|
||||||
margin:0px; padding:0px; |
|
||||||
outline:none; |
|
||||||
} |
|
||||||
.markItUp a:link, |
|
||||||
.markItUp a:visited { |
|
||||||
color:#000; |
|
||||||
text-decoration:none; |
|
||||||
} |
|
||||||
iframe { |
|
||||||
border: 0px solid #ffffff; |
|
||||||
} |
|
||||||
.markItUp { |
|
||||||
width:97%; |
|
||||||
margin:5px 10px 5px 5px; |
|
||||||
border:5px solid #F5F5F5; |
|
||||||
} |
|
||||||
.markItUpContainer { |
|
||||||
border:1px solid #3C769D; |
|
||||||
background:#FFF url(images/bg-container.png) repeat-x top left; |
|
||||||
padding:5px 5px 2px 5px; |
|
||||||
font:11px Verdana, Arial, Helvetica, sans-serif; |
|
||||||
} |
|
||||||
.markItUpEditor { |
|
||||||
width: 100%; |
|
||||||
font:12px 'Courier New', Courier, monospace; |
|
||||||
padding:5px 5px 5px 15px; |
|
||||||
border:3px solid #3C769D; |
|
||||||
width:643px; |
|
||||||
height:320px; |
|
||||||
background-repeat:no-repeat; |
|
||||||
clear:both; display:block; |
|
||||||
line-height:18px; |
|
||||||
overflow:auto; |
|
||||||
} |
|
||||||
.markItUpPreviewFrame { |
|
||||||
overflow:auto; |
|
||||||
width:99.9%; |
|
||||||
height:300px; |
|
||||||
margin:0px 0; |
|
||||||
} |
|
||||||
.markItUpFooter { |
|
||||||
width:100%; |
|
||||||
cursor:n-resize; |
|
||||||
} |
|
||||||
.markItUpResizeHandle { |
|
||||||
overflow:hidden; |
|
||||||
width:22px; height:5px; |
|
||||||
margin-left:auto; |
|
||||||
margin-right:auto; |
|
||||||
background-image:url(images/handle.png); |
|
||||||
cursor:n-resize; |
|
||||||
} |
|
||||||
/***************************************************************************************/ |
|
||||||
/* first row of buttons */ |
|
||||||
.markItUpHeader ul li { |
|
||||||
list-style:none; |
|
||||||
float:left; |
|
||||||
position:relative; |
|
||||||
} |
|
||||||
.markItUpHeader ul li ul{ |
|
||||||
display:none; |
|
||||||
} |
|
||||||
.markItUpHeader ul li:hover > ul{ |
|
||||||
display:block; |
|
||||||
} |
|
||||||
.markItUpHeader ul .markItUpDropMenu { |
|
||||||
background:transparent url(images/menu.png) no-repeat 115% 50%; |
|
||||||
margin-right:5px; |
|
||||||
} |
|
||||||
.markItUpHeader ul .markItUpDropMenu li { |
|
||||||
margin-right:0px; |
|
||||||
} |
|
||||||
.markItUpHeader ul .markItUpSeparator { |
|
||||||
margin:0 10px; |
|
||||||
width:1px; |
|
||||||
height:16px; |
|
||||||
overflow:hidden; |
|
||||||
background-color:#CCC; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul .markItUpSeparator { |
|
||||||
width:auto; height:1px; |
|
||||||
margin:0px; |
|
||||||
} |
|
||||||
/* next rows of buttons */ |
|
||||||
.markItUpHeader ul ul { |
|
||||||
display:none; |
|
||||||
position:absolute; |
|
||||||
top:18px; left:0px; |
|
||||||
background:#F5F5F5; |
|
||||||
border:1px solid #3C769D; |
|
||||||
height:inherit; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul li { |
|
||||||
float:none; |
|
||||||
border-bottom:1px solid #3C769D; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul .markItUpDropMenu { |
|
||||||
background:#F5F5F5 url(images/submenu.png) no-repeat 100% 50%; |
|
||||||
} |
|
||||||
/* next rows of buttons */ |
|
||||||
.markItUpHeader ul ul ul { |
|
||||||
position:absolute; |
|
||||||
top:-1px; left:150px; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul ul li { |
|
||||||
float:none; |
|
||||||
} |
|
||||||
.markItUpHeader ul a { |
|
||||||
display:block; |
|
||||||
width:16px; height:16px; |
|
||||||
text-indent:-10000px; |
|
||||||
background-repeat:no-repeat; |
|
||||||
padding:3px; |
|
||||||
margin:0px; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul a { |
|
||||||
display:block; |
|
||||||
padding-left:0px; |
|
||||||
text-indent:0; |
|
||||||
width:120px; |
|
||||||
padding:5px 5px 5px 25px; |
|
||||||
background-position:2px 50%; |
|
||||||
} |
|
||||||
.markItUpHeader ul ul a:hover { |
|
||||||
color:#FFF; |
|
||||||
background-color:#3C769D; |
|
||||||
} |
|
||||||
/***************************************************************************************/ |
|
||||||
.html .markItUpEditor { |
|
||||||
background-image:url(images/bg-editor-html.png); |
|
||||||
} |
|
||||||
.markdown .markItUpEditor { |
|
||||||
background-image:url(images/bg-editor-markdown.png); |
|
||||||
} |
|
||||||
.textile .markItUpEditor { |
|
||||||
background-image:url(images/bg-editor-textile.png); |
|
||||||
} |
|
||||||
.bbcode .markItUpEditor { |
|
||||||
background-image:url(images/bg-editor-bbcode.png); |
|
||||||
} |
|
||||||
.wiki .markItUpEditor, |
|
||||||
.dotclear .markItUpEditor { |
|
||||||
background-image:url(images/bg-editor-wiki.png); |
|
||||||
} |
|
Before Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 240 B |
@ -1,4 +0,0 @@ |
|||||||
body { |
|
||||||
font:70% Verdana, Arial, Helvetica, sans-serif; |
|
||||||
color: black; |
|
||||||
} |
|
@ -1,11 +0,0 @@ |
|||||||
<!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> |
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
||||||
<title>markItUp! preview template</title> |
|
||||||
<link rel="stylesheet" type="text/css" href="~/templates/preview.css" /> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
<!-- content --> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,200 +0,0 @@ |
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
||||||
<html> |
|
||||||
<head> |
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
|
||||||
<title>GraphMe - User's guide.</title> |
|
||||||
<link rel="stylesheet" type="text/css" href="Style/Guide_Utilisateur.css"/> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
<h1>GraphMe</h1> |
|
||||||
<img src="Images/GraphMe.png"/> |
|
||||||
<h1>User's guide</h1> |
|
||||||
<ol id="Sommaire"> |
|
||||||
<li><a href="#Introduction">Introduction</a></li> |
|
||||||
<li><a href="#Installation">Installation</a></li> |
|
||||||
<li><a href="#AfficherLeWidget">Review widget</a></li> |
|
||||||
<li><a href="#PresentationAffichage">View presentation</a></li> |
|
||||||
<li><a href="#DessinerFonction">Drawing the function</a></li> |
|
||||||
<li><a href="#DeplacerAffichage">Offset function</a></li> |
|
||||||
<li><a href="#MenuOptions">The options menu</a></li> |
|
||||||
<li><a href="#MenuOutils">the tools menu</a></li> |
|
||||||
<li><a href="#PlusieursFonctions">Drawing some functions</a></li> |
|
||||||
<li><a href="#MaJ">GraphMe update</a></li> |
|
||||||
<li><a href="#Contact">Contact</a></li> |
|
||||||
</ol> |
|
||||||
<h2 id="Introduction">1. Introduction</h2> |
|
||||||
<p> |
|
||||||
GraphMe is a app that is developed using html, javascript and css. It can be used for drawing graphs. This document must explain how to use GraphMe. This app have a different functions and some useful advices for users. |
|
||||||
</p> |
|
||||||
|
|
||||||
<h2 id="Installation">2. Installation</h2> |
|
||||||
<p> |
|
||||||
This widget can be downloaded from the Internet in a packed format. Before using it must be unpacked. GraphMe was developed for using in web-browsers and integration in Sankore. To add this app in Sankore you should copy folder named "GraphMe.wgt" in "../library/interactive/". For example, on "windows OS" GraphMe must be in folder with following path: "C: / Program Files / Sankore 4/library/interactive/GraphMe.wgt". If you have no Sankore then you can get it on <a href="http://getuniboard.com">http://getuniboard.com/</a>. |
|
||||||
</p> |
|
||||||
|
|
||||||
<h2 id="AfficherLeWidget">3. Review widget</h2> |
|
||||||
<div class="droite"><img src="Images/Guide_Navigateur.png"/>Display GraphMe in browsers</div> |
|
||||||
<p> |
|
||||||
A) To display this app in browser just enough to open the file named "Grapheur.xhtml" (it's in root folder) with your browser. But some browsers can not display app correctly. Below is the list of browsers that are able to display app: |
|
||||||
</p> |
|
||||||
<ul> |
|
||||||
<li>Mozilla Firefox (3.5) : Everything works fine.</li> |
|
||||||
<li>Internet Explorer (8.0) : Cannot open a widget, because .xhtml format is not recognized.</li> |
|
||||||
<li>Internet Explorer (pré-version 9.0) : Widget works but just using SVG. Canvas not supported yet.</li> |
|
||||||
<li>Konqueror (4.3.4) : Widget can be opened but there is some problems with displaying. It still occur when choosed display method "canvas".</li> |
|
||||||
<li>Opera (10.51) : Widget quite useful.</li> |
|
||||||
<li>Google Chrome (4.1) : Everything works very nice! 3D-display is faster as compared with other browsers.</li> |
|
||||||
</ul> |
|
||||||
<p> |
|
||||||
B) To open widget in Sankore you should first open folder "Application" that is at the left of the screen. Then you must find this app and add it to the page. |
|
||||||
</p> |
|
||||||
<div class="gauche"><img src="Images/Guide_Uniboard.png"/>Display GraphMe in Sankore</div> |
|
||||||
<img src="Images/Guide_AjouterWidget.png"/> |
|
||||||
|
|
||||||
<h2 id="PresentationAffichage">4. View presentation</h2> |
|
||||||
<ol> |
|
||||||
<li>Place for functions display.</li> |
|
||||||
<li>Button for beginning the work.</li> |
|
||||||
<li>Button for adding new function or for getting access to functions history.</li> |
|
||||||
<li>Display.</li> |
|
||||||
<li>Parameters that define the part of graph that will be displayed.</li> |
|
||||||
<li>Buttons for zoom.</li> |
|
||||||
<li>Button for color changing.</li> |
|
||||||
<li>Buttons for access to menu.</li> |
|
||||||
<li>Tab-button that toggles 2D and 3D modes.</li> |
|
||||||
<li>Button for maximize the widget.</li> |
|
||||||
</ol> |
|
||||||
<img src="Images/Guide_Presentation.png"/> |
|
||||||
|
|
||||||
<h2 id="DessinerFonction">5. Drawing the function</h2> |
|
||||||
<p> |
|
||||||
To draw mathematical function just enter it at the top of widget and press button "Display". You can use different functions and predefined constants. |
|
||||||
</p> |
|
||||||
<h4>Basic operations:</h4> |
|
||||||
<ul> |
|
||||||
<li>Addition → +</li> |
|
||||||
<li>Subtraction → -</li> |
|
||||||
<li>Multiplication → *</li> |
|
||||||
<li>Division → /</li> |
|
||||||
<li>Mod → %</li> |
|
||||||
</ul> |
|
||||||
<h4>Trigonometric functions</h4> |
|
||||||
<ul> |
|
||||||
<li>sin(x), cos(x), tan(x), cot(x)</li> |
|
||||||
<li>asin(x), acos(x), atan(x), acot(x) ( ou arcsin(x), arccos(x), arctan(x), arccot(x) )</li> |
|
||||||
</ul> |
|
||||||
<h4>Square roots and degrees</h4> |
|
||||||
<ul> |
|
||||||
<li>sqrt(x) is square root from x</li> |
|
||||||
<li>pow(x, y). Variable x to the power y. For examle:<br/>x² → pow(x, 2)<br/>(x+3)⁵ → pow((x+3), 5)</li> |
|
||||||
<li>root(x, y). Root y of x</li> |
|
||||||
</ul> |
|
||||||
<h4>Exponential and logarithm</h4> |
|
||||||
<ul> |
|
||||||
<li>exp(x)</li> |
|
||||||
<li>ln(x) is natural logarithm.</li> |
|
||||||
<li>log(x) is decimal logarithm.</li> |
|
||||||
</ul> |
|
||||||
<h4>Rounding</h4> |
|
||||||
<ul> |
|
||||||
<li>round(x) → rounding to the nearest whole number</li> |
|
||||||
<li>ceil(x) → rounding to the nearest whole number in a big way</li> |
|
||||||
<li>floor(x) → rounding to the nearest whole number the smaller side</li> |
|
||||||
</ul> |
|
||||||
<h4>Other predefined function</h4> |
|
||||||
<ul> |
|
||||||
<li>abs(x) → Absolute number value</li> |
|
||||||
<li>random() → Return random number between 0 and 1</li> |
|
||||||
</ul> |
|
||||||
<h4>Also are available some constants:</h4> |
|
||||||
<ul> |
|
||||||
<li>pi = 4 * atan(1) ≈ 3.141592653589793</li> |
|
||||||
<li>e = exp(1) ≈ 2.718281828459045 </li> |
|
||||||
</ul> |
|
||||||
<p> |
|
||||||
Not always it's easy to understand how to record a required function. Really if anywhere you err then graph will not displayed. Also do not forget about "*" (multiply) to multiply and "." (decimal point) to write point. |
|
||||||
</p> |
|
||||||
<p> |
|
||||||
The two-dimensional function must be written as y=[...] and the three-dimensional function nust be written as z=[...]. Other examples are available to use in menu "Help" if you have some difficulties with function definition. |
|
||||||
</p> |
|
||||||
|
|
||||||
<h2 id="DeplacerAffichage">6. Offset function</h2> |
|
||||||
<p> |
|
||||||
Sometimes when you draw the function you don't see all necessary information about this function. In this case you can change position of graph. |
|
||||||
</p> |
|
||||||
<img src="Images/Guide_Deplacement.png"/> |
|
||||||
<p> |
|
||||||
To move the function graph just use a navigation arrows that are in the four edges of the display or mouse move tool (menu Service). |
|
||||||
</p> |
|
||||||
<p> |
|
||||||
To define place to display you should enter a custom values in the left side of the widget. The left value must be less than the right value. In other case graph will not displayed. |
|
||||||
</p> |
|
||||||
<p> |
|
||||||
You can increase or decrease the scale of displaying using buttons that are in the left menu. So you'll see more information about function. Zoom can be reset in options. |
|
||||||
</p> |
|
||||||
<h2 id="MenuOptions">7. The options menu</h2> |
|
||||||
<p> |
|
||||||
To open the menu you should click a button "Options" that is in the left of the widget. If you click on this button again then menu will close. There are some buttons for navigation between options. Their short description: |
|
||||||
</p> |
|
||||||
<ul> |
|
||||||
<li>Changing a background image and color. In Sankore changing background theme used for displaying widget on black and white background.</li> |
|
||||||
<li>Display-method used for defining displaying function. There are 6 possibilities: <br/> |
|
||||||
<ol> |
|
||||||
<li>SVG is a vector format of image and it can be built in HTML-page. It's compatible in most of browsers and Sankore support it very well so is it selected default.</li> |
|
||||||
<li>There is a big difference between SVG (image) and display method SVG. If you have a compatibility problems then you should not use this method.</li> |
|
||||||
<li>"Canvas" is a new tag that used in HTML 5.0. It define a area in which you can place some images. This display-method is faster than SVG-method, but Sankore does not fully support it. It's desirable to choose this method when you use no Sankore widget.</li> |
|
||||||
<li>"Canvas" (point) also uses a canvas but draws a points instead of lines.</li> |
|
||||||
<li>XPM format is little known so it's compatible just with a minority of browsers.</li> |
|
||||||
<li>Display method "Uniboard" allows to draw directly on the page using Sankore drawing.</li> |
|
||||||
</ol> |
|
||||||
<img src="Images/Guide_Options.png"/> |
|
||||||
</li> |
|
||||||
<li>Default zoom button returns display into original state. It helps alsoto return to the origin.</li> |
|
||||||
<li>Display options allow to display or not a grid, axis and scale. They make a mapping more readable. Also you can change the thickness of function line.</li> |
|
||||||
<li>Offset of graph not used usually. But if you use it then you can move a mapping in any direction when a center isn't in the right place. It's avaliable in some browsers.</li> |
|
||||||
<li>The accuracy of calculations of the graph will increase or decrease the number of points calculated. The higher the number, the more accuracy. It is useful to set this value to "0.01" if you draw functions like 0.5 * sin (10 * x * x).</li> |
|
||||||
<li>Options in 3D, the display style to choose how the function is designed: with small points or polygons (areas). Most functions are prettier drawing surface between the points calculated. However, it is better to draw points for functions such as the hemisphere: sqrt (12 - x*x - y*y).</li> |
|
||||||
<li>In the last tab you can change such options 3D, as the accuracy of the calculations and the color of the function.</li> |
|
||||||
</ul> |
|
||||||
<h2 id="MenuOutils">8. The tools menu.</h2> |
|
||||||
<p> |
|
||||||
This menu allows you to choose first action of the mouse on the graph. There is a choice of three options: |
|
||||||
</p> |
|
||||||
<ul> |
|
||||||
<li>The selected tool is the default. By moving the mouse, a point moves on the function and the coordinates of this point are shown in the top left of the display.</li> |
|
||||||
<li>The second tool is moving. It allows you to move the chart with the mouse. Just keep clicking on the display and move the mouse. Unfortunately, this tool can be slow on some browsers.</li> |
|
||||||
<li>The third tool is the tangent. This tool draws the tangent to the function at the point where is a mouse cursor.</li> |
|
||||||
</ul> |
|
||||||
<p> |
|
||||||
Then, this menu also allows to calculate a point of the function. Simply enter the coordinate "x" from the point where we want to find the coordinate "y" and press the "Evaluate". For example, if the function is "x * x" and that defined "x = 2", then the point whose coordinate on the X axis is "2" will be to coordinate on the Y axis "4". |
|
||||||
</p> |
|
||||||
<p> |
|
||||||
Another useful tool is the analysis of function. To analyse the function click on "start the analysis". Analyses based on this widget are not 100% reliable, but are complementary to a analysis of function that you are doing yourself. It may be that this tool will be improved in a future version of the widget. |
|
||||||
</p> |
|
||||||
<p> |
|
||||||
In this menu there are also tests the display. They can try different methods to display and see if they work on the browser used. |
|
||||||
</p> |
|
||||||
<h2 id="PlusieursFonctions">9. Drawing some functions</h2> |
|
||||||
<p> |
|
||||||
To draw multiple functions simultaneously, click the small "+" button which is located to the right of "View" (point 1). Then, a menu appears. |
|
||||||
</p> |
|
||||||
<img src="Images/Guide_Plus.png"/> |
|
||||||
<p> |
|
||||||
The tabs in this menu can go to the history or the additional features (point 2). To add a function click the button to the right of the current function (point 3). Below is a list that contains all the displayed functions (point 4). To remove a function, just click on the "-" button next to it. It is also possible to change the color of each function separately. |
|
||||||
</p> |
|
||||||
<p> |
|
||||||
History can review all the functions that have already been drawn. When you click on a function of history current function replaced by the function of history. |
|
||||||
</p> |
|
||||||
<p> |
|
||||||
"Drawing several functions simultaneously" mode is only possible with the display method "canvas" in two dimensions, but the history can be used with all methods of display. |
|
||||||
</p> |
|
||||||
<h2 id="MaJ">10. GraphMe update</h2> |
|
||||||
<p> |
|
||||||
The latest version of the widget can be downloaded from the following page: <a href="http://gyb.educanet2.ch/tm-widgets/.ws_gen/?15">http://gyb.educanet2.ch/tm-widgets/.ws_gen/?15</a>. To update GraphMe, you can also click on "Update" in the options menu. |
|
||||||
</p> |
|
||||||
<h2 id="Contact">11. Contact</h2> |
|
||||||
<p> |
|
||||||
If you want to report a bug, have a suggestion from the widget or just want to ask a question, please contact me by e-mail at: <a href="mailto:yannick.vessaz@gmail.com">yannick.vessaz@gmail.com</a>. |
|
||||||
</p> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,4 +0,0 @@ |
|||||||
[Dolphin] |
|
||||||
ShowPreview=true |
|
||||||
Timestamp=2010,9,5,0,30,37 |
|
||||||
ViewMode=0 |
|
Before Width: | Height: | Size: 77 KiB |