ace editor, markdown editor

This commit is contained in:
life
2015-01-08 00:36:28 +08:00
parent be01c9c3f7
commit 2cfc89ca5f
1233 changed files with 24568 additions and 10275 deletions
app
public
admin
blog
css
dist
images
js
libs
MathJax
MathJax.js
config
extensions
fonts
HTML-CSS
Asana-Math
Gyre-Pagella
Gyre-Termes
Latin-Modern
Neo-Euler
STIX-Web
woff
STIXMathJax_Alphabets-Bold.woffSTIXMathJax_Alphabets-BoldItalic.woffSTIXMathJax_Alphabets-Italic.woffSTIXMathJax_Alphabets-Regular.woffSTIXMathJax_Arrows-Bold.woffSTIXMathJax_Arrows-Regular.woffSTIXMathJax_DoubleStruck-Bold.woffSTIXMathJax_DoubleStruck-BoldItalic.woffSTIXMathJax_DoubleStruck-Italic.woffSTIXMathJax_DoubleStruck-Regular.woffSTIXMathJax_Fraktur-Bold.woffSTIXMathJax_Fraktur-Regular.woffSTIXMathJax_Latin-Bold.woffSTIXMathJax_Latin-BoldItalic.woffSTIXMathJax_Latin-Italic.woffSTIXMathJax_Latin-Regular.woffSTIXMathJax_Main-Bold.woffSTIXMathJax_Main-BoldItalic.woffSTIXMathJax_Main-Italic.woffSTIXMathJax_Main-Regular.woffSTIXMathJax_Marks-Bold.woffSTIXMathJax_Marks-BoldItalic.woffSTIXMathJax_Marks-Italic.woffSTIXMathJax_Marks-Regular.woffSTIXMathJax_Misc-Bold.woffSTIXMathJax_Misc-BoldItalic.woffSTIXMathJax_Misc-Italic.woffSTIXMathJax_Misc-Regular.woffSTIXMathJax_Monospace-Regular.woffSTIXMathJax_Normal-Bold.woffSTIXMathJax_Normal-BoldItalic.woffSTIXMathJax_Normal-Italic.woffSTIXMathJax_Operators-Bold.woffSTIXMathJax_Operators-Regular.woffSTIXMathJax_SansSerif-Bold.woffSTIXMathJax_SansSerif-BoldItalic.woffSTIXMathJax_SansSerif-Italic.woffSTIXMathJax_SansSerif-Regular.woffSTIXMathJax_Script-BoldItalic.woffSTIXMathJax_Script-Italic.woffSTIXMathJax_Script-Regular.woffSTIXMathJax_Shapes-Bold.woffSTIXMathJax_Shapes-BoldItalic.woffSTIXMathJax_Shapes-Regular.woffSTIXMathJax_Size1-Regular.woffSTIXMathJax_Size2-Regular.woffSTIXMathJax_Size3-Regular.woffSTIXMathJax_Size4-Regular.woffSTIXMathJax_Size5-Regular.woffSTIXMathJax_Symbols-Bold.woffSTIXMathJax_Symbols-Regular.woffSTIXMathJax_Variants-Bold.woffSTIXMathJax_Variants-BoldItalic.woffSTIXMathJax_Variants-Italic.woffSTIXMathJax_Variants-Regular.woff
TeX
jax
element
input
output
HTML-CSS
autoload
config.js
fonts
Asana-Math
Alphabets
Regular
Arrows
Regular
DoubleStruck
Regular
Fraktur
Regular
Latin
Regular
Main
Regular
Marks
Regular
Misc
Regular
Monospace
Regular
NonUnicode
Regular
Normal
Regular
Operators
Regular
SansSerif
Regular
Script
Regular
Shapes
Regular
Size1
Regular
Size2
Regular
Size3
Regular
Size4
Regular
Size5
Regular
Size6
Regular
Symbols
Regular
Variants
Regular
fontdata-extra.jsfontdata.js
Gyre-Pagella
Alphabets
Regular
Arrows
Regular
DoubleStruck
Regular
Fraktur
Regular
Latin
Regular
Main
Regular
Marks
Regular
Misc
Regular
Monospace
Regular
NonUnicode
Regular
Normal
Regular
Operators
Regular
SansSerif
Regular
Script
Regular
Shapes
Regular
Size1
Regular
Size2
Regular
Size3
Regular
Size4
Regular
Size5
Regular
Size6
Regular
Symbols
Regular
Variants
Regular
fontdata-extra.jsfontdata.js
Gyre-Termes
Alphabets
Regular
Arrows
Regular
DoubleStruck
Regular
Fraktur
Regular
Latin
Regular
Main
Regular
Marks
Regular
Misc
Regular
Monospace
Regular
NonUnicode
Regular
Normal
Regular
Operators
Regular
SansSerif
Regular
Script
Regular
Shapes
Regular
Size1
Regular
Size2
Regular
Size3
Regular
Size4
Regular
Size5
Regular
Size6
Regular
Symbols
Regular
Variants
Regular
fontdata-extra.jsfontdata.js
Latin-Modern
Alphabets
Regular
Arrows
Regular
DoubleStruck
Regular
Fraktur
Regular
Latin
Regular
Main
Regular
Marks
Regular
Misc
Regular
Monospace
Regular
NonUnicode
Regular
Normal
Regular
Operators
Regular
SansSerif
Regular
Script
Regular
Shapes
Regular
Size1
Regular
Size2
Regular
Size3
Regular
Size4
Regular
Size5
Regular
Size6
Regular
Size7
Regular
Symbols
Regular
Variants
Regular
fontdata-extra.jsfontdata.js
Neo-Euler
Alphabets
Regular
Arrows
Regular
Fraktur
Regular
Main
Regular
Marks
Regular
NonUnicode
Regular
Normal
Regular
Operators
Regular
Script
Regular
Shapes
Regular
Size1
Regular
Size2
Regular
Size3
Regular
Size4
Regular
Size5
Regular
Symbols
Regular
Variants
Regular
fontdata-extra.jsfontdata.js
STIX-Web
Alphabets
Bold
BoldItalic
Italic
Regular
Arrows
Bold
Regular
DoubleStruck
Bold
BoldItalic
Italic
Regular
Fraktur
Bold
Regular
Latin
Bold
BoldItalic
Italic
Regular
Main
Bold
BoldItalic
Italic
Regular
Marks
Bold
BoldItalic
Italic
Regular
Misc
Bold
BoldItalic
Italic
Regular
Monospace
Regular
Normal
Bold
BoldItalic
Italic
Operators
Bold
Regular
SansSerif
Bold
BoldItalic
Italic
Regular
Script
BoldItalic
Italic
Regular
Shapes
Bold
BoldItalic
Regular
Size1
Regular
Size2
Regular
Size3
Regular
Size4
Regular
Size5
Regular
Symbols
Bold
Regular
Variants
Bold
BoldItalic
Italic
Regular
fontdata-extra.jsfontdata.js
STIX
General
Bold
BoldItalic
Italic
Regular
IntegralsD
IntegralsSm
IntegralsUp
IntegralsUpD
IntegralsUpSm
NonUnicode
SizeFiveSym
SizeFourSym
SizeOneSym
SizeThreeSym
SizeTwoSym
Variants
fontdata-1.0.jsfontdata-beta.jsfontdata-extra.jsfontdata.js
TeX
imageFonts.jsjax.js
ace
ace.jsext-beautify.jsext-chromevox.jsext-elastic_tabstops_lite.jsext-emmet.jsext-error_marker.jsext-keybinding_menu.jsext-language_tools.jsext-linking.jsext-modelist.jsext-old_ie.jsext-searchbox.jsext-settings_menu.jsext-spellcheck.jsext-split.jsext-static_highlight.jsext-statusbar.jsext-textarea.jsext-themelist.jsext-whitespace.jskeybinding-emacs.jskeybinding-vim.jsmode-abap.jsmode-actionscript.jsmode-ada.jsmode-apache_conf.jsmode-applescript.jsmode-asciidoc.jsmode-assembly_x86.jsmode-autohotkey.jsmode-batchfile.jsmode-c9search.jsmode-c_cpp.jsmode-cirru.jsmode-clojure.jsmode-cobol.jsmode-coffee.jsmode-coldfusion.jsmode-csharp.jsmode-css.jsmode-curly.jsmode-d.jsmode-dart.jsmode-diff.jsmode-django.jsmode-dockerfile.jsmode-dot.jsmode-eiffel.jsmode-ejs.jsmode-erlang.jsmode-forth.jsmode-ftl.jsmode-gcode.jsmode-gherkin.jsmode-gitignore.jsmode-glsl.jsmode-golang.jsmode-groovy.jsmode-haml.jsmode-handlebars.jsmode-haskell.jsmode-haxe.jsmode-html.jsmode-html_ruby.jsmode-ini.jsmode-io.jsmode-jack.jsmode-jade.jsmode-java.jsmode-javascript.jsmode-json.jsmode-jsoniq.jsmode-jsp.jsmode-jsx.jsmode-julia.jsmode-latex.jsmode-less.jsmode-liquid.jsmode-lisp.jsmode-livescript.jsmode-logiql.jsmode-lsl.jsmode-lua.jsmode-luapage.jsmode-lucene.jsmode-makefile.jsmode-markdown.jsmode-matlab.jsmode-mel.jsmode-mushcode.jsmode-mysql.jsmode-nix.jsmode-objectivec.jsmode-ocaml.jsmode-pascal.jsmode-perl.jsmode-pgsql.jsmode-php.jsmode-plain_text.jsmode-powershell.jsmode-praat.jsmode-prolog.jsmode-properties.jsmode-protobuf.jsmode-python.jsmode-r.jsmode-rdoc.jsmode-rhtml.jsmode-ruby.jsmode-rust.jsmode-sass.jsmode-scad.jsmode-scala.jsmode-scheme.jsmode-scss.jsmode-sh.jsmode-sjs.jsmode-smarty.jsmode-snippets.jsmode-soy_template.jsmode-space.jsmode-sql.jsmode-stylus.jsmode-svg.jsmode-tcl.jsmode-tex.jsmode-text.jsmode-textile.jsmode-toml.jsmode-twig.jsmode-typescript.jsmode-vala.jsmode-vbscript.jsmode-velocity.jsmode-verilog.jsmode-vhdl.jsmode-xml.jsmode-xquery.jsmode-yaml.js
snippets
theme-ambiance.jstheme-chaos.jstheme-chrome.jstheme-clouds.jstheme-clouds_midnight.jstheme-cobalt.jstheme-crimson_editor.jstheme-dawn.jstheme-dreamweaver.jstheme-eclipse.jstheme-github.jstheme-idle_fingers.jstheme-katzenmilch.jstheme-kr.jstheme-kr_theme.jstheme-kuroir.jstheme-merbivore.jstheme-merbivore_soft.jstheme-mono_industrial.jstheme-monokai.jstheme-pastel_on_dark.jstheme-solarized_dark.jstheme-solarized_light.jstheme-terminal.jstheme-textmate.jstheme-tomorrow.jstheme-tomorrow_night.jstheme-tomorrow_night_blue.jstheme-tomorrow_night_bright.jstheme-tomorrow_night_eighties.jstheme-twilight.jstheme-vibrant_ink.jstheme-xcode.jsworker-coffee.jsworker-css.jsworker-html.jsworker-javascript.jsworker-json.jsworker-lua.jsworker-php.jsworker-xquery.js
mdeditor
member
tinymce

@ -286,7 +286,10 @@ define("tinymce/pasteplugin/Clipboard", [
// 纯HTML编辑也会
text = text.replace(/</g, "&lt;");
text = text.replace(/>/g, "&gt;");
// firefox下必须这个
editor.insertRawContent(text);
// 之前用insertRawContent()有问题, ace paste下, TODO
// editor.insertContent(text);
} else {
// life 这里得到图片img, 复制到leanote下
if(!self.copyImage) {
@ -448,6 +451,21 @@ define("tinymce/pasteplugin/Clipboard", [
return data;
}
function inAcePrevent() {
// 这个事件是从哪触发的? 浏览器自带的
// life ace 如果在pre中, 直接返回 TODO
var ace = LeaAce.nowIsInAce();
if(ace) {
// log("in aceEdiotr 2 paste");
// 原来这里focus了
setTimeout(function() {
ace[0].focus();
});
return true;
}
return false;
}
editor.on('keydown', function(e) {
if (e.isDefaultPrevented()) {
return;
@ -455,6 +473,11 @@ define("tinymce/pasteplugin/Clipboard", [
// Ctrl+V or Shift+Insert
if ((VK.metaKeyPressed(e) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) {
if(inAcePrevent()) {
return;
}
keyboardPastePlainTextState = e.shiftKey && e.keyCode == 86;
// Prevent undoManager keydown handler from making an undo level with the pastebin in it
@ -566,8 +589,10 @@ define("tinymce/pasteplugin/Clipboard", [
}
editor.on('paste', function(e) {
if(inAcePrevent()) {
return;
}
var clipboardContent = getClipboardContent(e);
var isKeyBoardPaste = new Date().getTime() - keyboardPasteTimeStamp < 100;
var plainTextMode = self.pasteFormat == "text" || keyboardPastePlainTextState;
@ -623,9 +648,11 @@ define("tinymce/pasteplugin/Clipboard", [
//-----------
// paste image
try {
/*
if(pasteImage(e)) {
return;
}
*/
} catch(e) {};
});