diff --git a/MrDoc/__init__.py b/MrDoc/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/MrDoc/settings.py b/MrDoc/settings.py new file mode 100644 index 0000000..a1e3dad --- /dev/null +++ b/MrDoc/settings.py @@ -0,0 +1,132 @@ +""" +Django settings for MrDoc project. + +Generated by 'django-admin startproject' using Django 2.1.3. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.1/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '5&71mt9@^58zdg*_!t(x6g14q*@84d%ptr%%s6e0l50zs0we3d' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = ['*'] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'app_admin', + 'app_doc', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'MrDoc.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + os.path.join(BASE_DIR,'template') + ], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'MrDoc.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/2.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/2.1/topics/i18n/ + +LANGUAGE_CODE = 'zh-hans' + +TIME_ZONE = 'Asia/Shanghai' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/2.1/howto/static-files/ + +STATIC_URL = '/static/' +STATICFILES_DIRS = [os.path.join(BASE_DIR,'static'),] + +# 媒体文件 +MEDIA_URL = '/media/' +MEDIA_ROOT = os.path.join(BASE_DIR,'media') + +# 日志配置 + diff --git a/MrDoc/urls.py b/MrDoc/urls.py new file mode 100644 index 0000000..40ec3a3 --- /dev/null +++ b/MrDoc/urls.py @@ -0,0 +1,26 @@ +"""MrDoc URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/2.1/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path,include,re_path +from django.views.static import serve +from django.conf import settings + +urlpatterns = [ + path('admin/', admin.site.urls), + path('',include('app_doc.urls')), + path('user/',include('app_admin.urls'),), + re_path('^media/(?P.*)$',serve,{'document_root':settings.MEDIA_ROOT}),# 媒体文件 +] diff --git a/MrDoc/wsgi.py b/MrDoc/wsgi.py new file mode 100644 index 0000000..6a23ecc --- /dev/null +++ b/MrDoc/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for MrDoc project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'MrDoc.settings') + +application = get_wsgi_application() diff --git a/app_admin/__init__.py b/app_admin/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app_admin/admin.py b/app_admin/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/app_admin/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/app_admin/apps.py b/app_admin/apps.py new file mode 100644 index 0000000..38fbfe1 --- /dev/null +++ b/app_admin/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class AppAdminConfig(AppConfig): + name = 'app_admin' diff --git a/app_admin/decorators.py b/app_admin/decorators.py new file mode 100644 index 0000000..e29a2c8 --- /dev/null +++ b/app_admin/decorators.py @@ -0,0 +1,14 @@ +from django.core.exceptions import PermissionDenied # 权限拒绝异常 + +# 超级管理员用户需求 +def superuser_only(function): + """限制视图只有超级管理员能够访问""" + def _inner(request, *args, **kwargs): + if request.user.is_authenticated: + if not request.user.is_superuser: + raise PermissionDenied + else: + raise PermissionDenied + return function(request, *args, **kwargs) + + return _inner \ No newline at end of file diff --git a/app_admin/migrations/__init__.py b/app_admin/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app_admin/models.py b/app_admin/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/app_admin/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/app_admin/tests.py b/app_admin/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/app_admin/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/app_admin/urls.py b/app_admin/urls.py new file mode 100644 index 0000000..43a1c5f --- /dev/null +++ b/app_admin/urls.py @@ -0,0 +1,10 @@ +from django.urls import path,re_path +from app_admin import views + +urlpatterns = [ + path('login/',views.log_in,name='login'),# 登录 + path('logout/',views.log_out,name='logout'),# 注销 + path('register/',views.register,name="register"), # 注册 + path('user_manage/',views.admin_user,name="user_manage"), # 用户管理 + path('create/',views.admin_create_user,name="create_user"), # 新建用户 +] \ No newline at end of file diff --git a/app_admin/views.py b/app_admin/views.py new file mode 100644 index 0000000..d58de97 --- /dev/null +++ b/app_admin/views.py @@ -0,0 +1,123 @@ +from django.shortcuts import render,redirect +from django.http.response import JsonResponse +from django.contrib.auth import authenticate,login,logout # 认证相关方法 +from django.contrib.auth.models import User # Django默认用户模型 +from django.contrib.auth.decorators import login_required # 登录需求装饰器 +from app_admin.decorators import superuser_only +import json +import datetime + +class DateEncoder(json.JSONEncoder): + def default(self, obj): + if isinstance(obj, datetime.datetime): + return obj.strftime('%Y-%m-%d %H:%M:%S') + elif isinstance(obj, datetime.date): + return obj.strftime("%Y-%m-%d") + else: + return json.JSONEncoder.default(self, obj) + +# 登录视图 +def log_in(request): + if request.method == 'GET': + if request.user.is_authenticated: + return redirect('/user/user_manage') + else: + return render(request,'login.html',locals()) + elif request.method == 'POST': + username = request.POST.get('username','') + pwd = request.POST.get('password','') + if username != '' and pwd != '': + user = authenticate(username=username,password=pwd) + if user is not None: + if user.is_active: + login(request,user) + return redirect('/user/user_manage') + else: + errormsg = '用户被禁用!' + return render(request, 'login.html', locals()) + else: + errormsg = '用户名或密码错误!' + return render(request, 'login.html', locals()) + else: + errormsg = '用户名或密码错误!' + return render(request, 'login.html', locals()) + + +# 注册视图 +def register(request): + pass + +# 注销 +def log_out(request): + try: + logout(request) + except Exception as e: + print(e) + # logger.error(e) + return redirect(request.META['HTTP_REFERER']) + +# 管理员后台首页 - 用户管理 +@superuser_only +def admin_user(request): + if request.method == 'GET': + # user_list = User.objects.all() + return render(request, 'app_admin/admin_user.html', locals()) + elif request.method == 'POST': + username = request.POST.get('username','') + if username == '': + user_data = User.objects.all().values_list( + 'id','last_login','is_superuser','username','email','date_joined','is_active' + ) + else: + user_data = User.objects.filter(username__icontains=username).values_list( + 'id','last_login','is_superuser','username','email','date_joined','is_active' + ) + table_data = [] + for i in list(user_data): + item = { + 'id':i[0], + 'last_login':i[1], + 'is_superuser':i[2], + 'username':i[3], + 'email':i[4], + 'date_joined':i[5], + 'is_active':i[6] + } + table_data.append(item) + return JsonResponse({'status':True,'data':table_data}) + +# 管理员后台首页 - 创建用户 +@superuser_only +def admin_create_user(request): + if request.method == 'POST': + username = request.POST.get('username','') # 接收用户名参数 + email = request.POST.get('email','') # 接收email参数 + password = request.POST.get('password','') # 接收密码参数 + if username != '' and password != '' and email != '' and '@' in email: + try: + user = User.objects.create_user( + username=username, + password=password, + email=email + ) + user.save() + return JsonResponse({'status':True}) + except Exception as e: + return JsonResponse({'status':False}) + else: + return JsonResponse({'status':False}) + + +# 管理员后台 - 修改密码 +@superuser_only +def admin_change_pwd(request): + pass + +# 管理员后台 - 删除用户 +@superuser_only +def admin_del_user(request): + pass + +# 普通用户修改密码 +def change_pwd(request): + pass \ No newline at end of file diff --git a/app_doc/__init__.py b/app_doc/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app_doc/admin.py b/app_doc/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/app_doc/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/app_doc/apps.py b/app_doc/apps.py new file mode 100644 index 0000000..bc3fd8c --- /dev/null +++ b/app_doc/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class AppDocConfig(AppConfig): + name = 'app_doc' diff --git a/app_doc/migrations/0001_initial.py b/app_doc/migrations/0001_initial.py new file mode 100644 index 0000000..0ad131b --- /dev/null +++ b/app_doc/migrations/0001_initial.py @@ -0,0 +1,64 @@ +# Generated by Django 2.1.3 on 2019-07-12 05:31 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Doc', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=50, verbose_name='文档标题')), + ('content', models.TextField(verbose_name='文档内容')), + ('parent_doc', models.IntegerField(default=0, verbose_name='上级文档')), + ('top_doc', models.IntegerField(default=0, verbose_name='所属项目')), + ('create_time', models.DateTimeField(auto_now_add=True)), + ('modify_time', models.DateTimeField(auto_now=True)), + ('create_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'verbose_name': '文档', + 'verbose_name_plural': '文档', + }, + ), + migrations.CreateModel( + name='DocTemp', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=50, verbose_name='模板名称')), + ('content', models.TextField(verbose_name='文档模板')), + ('create_time', models.DateTimeField(auto_now_add=True)), + ('modify_time', models.DateTimeField(auto_now=True)), + ('create_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'verbose_name': '文档模板', + 'verbose_name_plural': '文档模板', + }, + ), + migrations.CreateModel( + name='Project', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=50, verbose_name='文档名称')), + ('intro', models.TextField(verbose_name='介绍')), + ('create_time', models.DateTimeField(auto_now_add=True)), + ('modify_time', models.DateTimeField(auto_now=True)), + ('create_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'verbose_name': '文集', + 'verbose_name_plural': '文集', + }, + ), + ] diff --git a/app_doc/migrations/0002_doc_pre_content.py b/app_doc/migrations/0002_doc_pre_content.py new file mode 100644 index 0000000..5bd9f85 --- /dev/null +++ b/app_doc/migrations/0002_doc_pre_content.py @@ -0,0 +1,19 @@ +# Generated by Django 2.1.3 on 2019-07-15 09:00 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('app_doc', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='doc', + name='pre_content', + field=models.TextField(default=1, verbose_name='编辑内容'), + preserve_default=False, + ), + ] diff --git a/app_doc/migrations/0003_auto_20190717_0915.py b/app_doc/migrations/0003_auto_20190717_0915.py new file mode 100644 index 0000000..eacfa57 --- /dev/null +++ b/app_doc/migrations/0003_auto_20190717_0915.py @@ -0,0 +1,23 @@ +# Generated by Django 2.1.3 on 2019-07-17 01:15 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('app_doc', '0002_doc_pre_content'), + ] + + operations = [ + migrations.RemoveField( + model_name='doc', + name='parent_doc', + ), + migrations.AddField( + model_name='doc', + name='path', + field=models.CharField(default=1, max_length=50, verbose_name='文档路径'), + preserve_default=False, + ), + ] diff --git a/app_doc/migrations/0004_auto_20190717_0939.py b/app_doc/migrations/0004_auto_20190717_0939.py new file mode 100644 index 0000000..e479ed2 --- /dev/null +++ b/app_doc/migrations/0004_auto_20190717_0939.py @@ -0,0 +1,22 @@ +# Generated by Django 2.1.3 on 2019-07-17 01:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('app_doc', '0003_auto_20190717_0915'), + ] + + operations = [ + migrations.RemoveField( + model_name='doc', + name='path', + ), + migrations.AddField( + model_name='doc', + name='parent_doc', + field=models.IntegerField(default=0, verbose_name='上级文档'), + ), + ] diff --git a/app_doc/migrations/__init__.py b/app_doc/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app_doc/models.py b/app_doc/models.py new file mode 100644 index 0000000..ca41cd2 --- /dev/null +++ b/app_doc/models.py @@ -0,0 +1,50 @@ +from django.db import models +from django.contrib.auth.models import User + +# 文集模型 +class Project(models.Model): + name = models.CharField(verbose_name="文档名称",max_length=50) + intro = models.TextField(verbose_name="介绍") + create_user = models.ForeignKey(User,on_delete=models.CASCADE) + create_time = models.DateTimeField(auto_now_add=True) + modify_time = models.DateTimeField(auto_now=True) + + def __str__(self): + return self.name + + class Meta: + verbose_name = '文集' + verbose_name_plural = verbose_name + +# 文档模型 +class Doc(models.Model): + name = models.CharField(verbose_name="文档标题",max_length=50) + pre_content = models.TextField(verbose_name="编辑内容") + content = models.TextField(verbose_name="文档内容") + parent_doc = models.IntegerField(default=0,verbose_name="上级文档") + top_doc = models.IntegerField(default=0,verbose_name="所属项目") + create_user = models.ForeignKey(User,on_delete=models.CASCADE) + create_time = models.DateTimeField(auto_now_add=True) + modify_time = models.DateTimeField(auto_now=True) + + def __str__(self): + return self.name + + class Meta: + verbose_name = '文档' + verbose_name_plural = verbose_name + +# 文档模板模型 +class DocTemp(models.Model): + name = models.CharField(verbose_name="模板名称",max_length=50) + content = models.TextField(verbose_name="文档模板") + create_user = models.ForeignKey(User,on_delete=models.CASCADE) + create_time = models.DateTimeField(auto_now_add=True) + modify_time = models.DateTimeField(auto_now=True) + + def __str__(self): + self.name + + class Meta: + verbose_name = '文档模板' + verbose_name_plural = verbose_name diff --git a/app_doc/templatetags/__init__.py b/app_doc/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app_doc/templatetags/doc_filter.py b/app_doc/templatetags/doc_filter.py new file mode 100644 index 0000000..07025dd --- /dev/null +++ b/app_doc/templatetags/doc_filter.py @@ -0,0 +1,11 @@ +# coding:utf-8 +# 文档自定义模板过滤器 +from app_doc.models import * +from django import template + +register = template.Library() + +# 获取文档的子文档 +@register.filter(name='get_next_doc') +def get_next_doc(value): + return Doc.objects.filter(parent_doc=value) \ No newline at end of file diff --git a/app_doc/tests.py b/app_doc/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/app_doc/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/app_doc/urls.py b/app_doc/urls.py new file mode 100644 index 0000000..bdad221 --- /dev/null +++ b/app_doc/urls.py @@ -0,0 +1,21 @@ +from django.urls import path,re_path +from app_doc import views,util_upload_img + +urlpatterns = [ + path('',views.project_list,name='pro_list'),# 文档首页 + #################文集相关 + path('project//', views.project_index, name='pro_index'), # 文集浏览页 + path('create_project/', views.create_project, name='create_project'), # 新建文集 + path('get_pro_doc/', views.get_pro_doc, name="get_pro_doc"), # 获取某个文集的下级文档 + path('modify_pro/',views.modify_project,name='modify_project'), # 修改文集 + + #################文档相关 + path('project///', views.doc, name='doc'), # 文档浏览页 + path('create_doc/', views.create_doc, name="create_doc"), # 新建文档 + path('modify_doc//', views.modify_doc, name="modify_doc"), # 修改文档 + path('del_doc//',views.del_doc,name="del_doc"), # 删除文档 + #################文档模板相关 + path('create_doctemp/',views.create_doctemp,name="create_doctemp"), # 创建文档模板 + ################其他功能相关 + path('upload_doc_img/',util_upload_img.upload_img,name="upload_doc_img"), # 上传图片 +] \ No newline at end of file diff --git a/app_doc/util_upload_img.py b/app_doc/util_upload_img.py new file mode 100644 index 0000000..383d44c --- /dev/null +++ b/app_doc/util_upload_img.py @@ -0,0 +1,70 @@ +# coding:utf-8 +from django.http import HttpResponse +from django.conf import settings +from django.views.decorators.csrf import csrf_exempt +import os +import uuid +import json +import datetime as dt +import base64 + +@csrf_exempt +def upload_img(request): + ################## + # {"success": 0, "message": "出错信息"} + # {"success": 1, "url": "图片地址"} + ################## + files = request.FILES.get("editormd-image-file", None) + dir_name = request.POST.get('dirname','') + base_img = request.POST.get('base',None) + if files:# 上传普通图片文件 + result = file_upload(files, dir_name) + elif base_img: # 上传base64编码图片 + result = base_img_upload(base_img,dir_name) + else: + result = {"success": 0, "message": "出错信息"} + return HttpResponse(json.dumps(result), content_type="application/json") + +# 目录创建 +def upload_generation_dir(dir_name=''): + today = dt.datetime.today() + dir_name = dir_name + '/%d%02d/' %(today.year,today.month) + print("dir_name:",dir_name) + if not os.path.exists(settings.MEDIA_ROOT + dir_name): + print("创建目录") + os.makedirs(settings.MEDIA_ROOT + dir_name) + return dir_name + +# 普通图片上传 +def file_upload(files, dir_name): + #允许上传文件类型 + allow_suffix =["jpg", "jpeg", "gif", "png", "bmp", "webp"] + file_suffix = files.name.split(".")[-1] + if file_suffix not in allow_suffix: + return {"success": 0, "message": "图片格式不正确"} + relative_path = upload_generation_dir(dir_name) + file_name = str(dt.datetime.today()).replace(':','').replace(' ','').replace('.','')+files.name + path_file=os.path.join(relative_path, file_name) + path_file = settings.MEDIA_ROOT + path_file + print('文件路径:',path_file) + file_url = settings.MEDIA_URL + relative_path + file_name + print("文件URL:",file_url) + with open(path_file, 'wb') as f: + for chunk in files.chunks(): + f.write(chunk) # 保存文件 + return {"success": 1, "url": file_url,'message':'上传图片成功'} + +# base64编码图片上传 +def base_img_upload(files,dir_name): + files_str = files.split(';base64,')[-1] # 截取图片正文 + files_base = base64.b64decode(files_str) # 进行base64编码 + relative_path = upload_generation_dir(dir_name) + file_name = str(dt.datetime.today()).replace(':', '').replace(' ', '').replace('.', '') + '.png' + path_file = os.path.join(relative_path, file_name) + path_file = settings.MEDIA_ROOT + path_file + print('文件路径:', path_file) + file_url = settings.MEDIA_URL + relative_path + file_name + print("文件URL:", file_url) + with open(path_file, 'wb') as f: + f.write(files_base) # 保存文件 + return {"success": 1, "url": file_url, 'message': '上传图片成功'} \ No newline at end of file diff --git a/app_doc/views.py b/app_doc/views.py new file mode 100644 index 0000000..b87a9d9 --- /dev/null +++ b/app_doc/views.py @@ -0,0 +1,228 @@ +from django.shortcuts import render +from django.http.response import JsonResponse,Http404,HttpResponseNotAllowed,HttpResponse +from django.contrib.auth.decorators import login_required # 登录需求装饰器 +from app_doc.models import Project,Doc,DocTemp +from django.contrib.auth.models import User +from django.db.models import Q + + +# 文集列表 +def project_list(request): + project_list = Project.objects.all() + return render(request, 'app_doc/pro_list.html', locals()) + +# 创建文集 +@login_required() +def create_project(request): + if request.method == 'POST': + name = request.POST.get('pname','') + desc = request.POST.get('desc','') + if name != '': + project = Project.objects.create( + name=name, + intro=desc, + create_user=request.user + ) + project.save() + return JsonResponse({'status':True,'data':{'id':project.id,'name':project.name}}) + else: + return JsonResponse({'status':False}) + else: + return JsonResponse({'status':False}) + + +# 文集浏览页 +def project_index(request,pro_id): + # 获取文集 + if request.method == 'GET': + # 获取文集信息 + project = Project.objects.get(id=int(pro_id)) + doc = Doc.objects.filter(top_doc=int(pro_id)).order_by('id') + # 获取文集第一篇文档作为默认内容 + if doc.count() > 0: + doc = doc[0] + else: + doc = None + # 获取文集下所有一级文档 + project_docs = Doc.objects.filter(top_doc=int(pro_id),parent_doc=0) + return render(request,'app_doc/project.html',locals()) + # 更新文集 + elif request.method == 'PUT': + pass + # 删除文集 + elif request.method == 'DELETE': + pass + + +# 修改文集 +@login_required() +def modify_project(request): + if request.method == 'POST': + pro_id = request.POST.get('pro_id',None) + project = Project.objects.get(id=pro_id) + if request.user is project.create_user: + name = request.POST.get('name',None) + content = request.POST.get('desc',None) + project.name = name + project.intro = content + project.save() + else: + return JsonResponse({'status':False,'data':'非法请求'}) + else: + return JsonResponse({'status':False,'data':'方法不允许'}) + + +# 删除文集 +@login_required() +def del_project(request,pro_id): + pass + + +# 文档浏览页页 +def doc(request,pro_id,doc_id): + if request.method == 'GET': + if pro_id != '' and doc_id != '': + # 获取文集信息 + project = Project.objects.get(id=int(pro_id)) + # 获取文档内容 + doc = Doc.objects.get(id=int(doc_id)) + # 获取文集下一级文档 + project_docs = Doc.objects.filter(top_doc=doc.top_doc, parent_doc=0) + return render(request,'app_doc/project.html',locals()) + else: + pass + + +# 创建文档 +@login_required() +def create_doc(request): + if request.method == 'GET': + # doc_list = Doc.objects.filter(create_user=request.user) + project_list = Project.objects.filter(create_user=request.user) + doctemp_list = DocTemp.objects.filter(create_user=request.user) + return render(request,'app_doc/create_doc.html',locals()) + elif request.method == 'POST': + project = request.POST.get('project','') + parent_doc = request.POST.get('parent_doc','') + doc_name = request.POST.get('doc_name','') + doc_content = request.POST.get('content','') + pre_content = request.POST.get('pre_content','') + if project != '' and doc_name != '' and project != '-1': + doc = Doc.objects.create( + name=doc_name, + content = doc_content, + pre_content= pre_content, + parent_doc= int(parent_doc) if parent_doc != '' else 0, + top_doc= int(project), + create_user=request.user + ) + return JsonResponse({'status':True}) + else: + return JsonResponse({'status':False}) + + +# 修改文档 +@login_required() +def modify_doc(request,doc_id): + if request.method == 'GET': + doc = Doc.objects.get(id=doc_id) + if request.user == doc.create_user: + project = Project.objects.get(id=doc.top_doc) + doc_list = Doc.objects.filter(top_doc=project.id) + return render(request,'app_doc/modify_doc.html',locals()) + else: + return HttpResponse("非法请求") + elif request.method == 'POST': + doc_id = request.POST.get('doc_id','') # 文档ID + project = request.POST.get('project', '') # 文集ID + parent_doc = request.POST.get('parent_doc', '') # 上级文档ID + doc_name = request.POST.get('doc_name', '') # 文档名称 + doc_content = request.POST.get('content', '') # 文档内容 + pre_content = request.POST.get('pre_content', '') # 文档Markdown格式内容 + if doc_id != '' and project != '' and doc_name != '' and project != '-1': + # 更新文档内容 + Doc.objects.filter(id=int(doc_id)).update( + name=doc_name, + content=doc_content, + pre_content=pre_content, + parent_doc=int(parent_doc) if parent_doc != '' else 0, + ) + return JsonResponse({'status': True}) + else: + return JsonResponse({'status': False}) + + +# 删除文档 +@login_required() +def del_doc(request,doc_id): + doc = Doc.objects.get(id=doc_id) + if request.user == doc.create_user: + doc.delete() + return JsonResponse({'status': True, 'data': '删除完成'}) + else: + return JsonResponse({'status': False, 'data': '非法请求'}) + + +# 创建文档模板 +@login_required() +def create_doctemp(request): + if request.method == 'GET': + return render(request,'app_doc/create_doctemp.html',locals()) + elif request.method == 'POST': + name = request.POST.get('name',None) + content = request.POST.get('content','') + if name: + doctemp = DocTemp.objects.create( + name = name, + content = content, + create_user=request.user + ) + doctemp.save() + return JsonResponse({'status':True}) + else: + return JsonResponse({'status':False,'data':'模板标题不能为空'}) + + +# 修改文档模板 +@login_required() +def modify_doctemp(request,doctemp_id): + if request.method == 'GET': + doctemp = DocTemp.objects.get(id=doctemp_id) + if request.user.id == doctemp.create_user.id: + return render(request,'app_doc/midify_doctemp.html',locals()) + else: + return HttpResponse('非法请求') + elif request.method == 'POST': + pass + + +# 删除文档模板 +@login_required() +def del_doctemp(request,doctemp_id): + doctemp = DocTemp.objects.get(id=doctemp_id) + if request.user.id == doctemp.create_user.id: + doctemp.delete() + return JsonResponse({'status':True,'data':'删除完成'}) + else: + return JsonResponse({'status':False,'data':'非法请求'}) + + +# 获取文档模板列表 +@login_required() +def get_doctemp_list(request): + if request.method == 'POST': + doctemp_list = DocTemp.objects.filter(create_user=request.user) + + +# 获取指定文集的所有文档 +def get_pro_doc(request): + if request.method == 'POST': + pro_id = request.POST.get('pro_id','') + if pro_id != '': + doc_list = Doc.objects.filter(top_doc=int(pro_id)).values_list('id','name','parent_doc').order_by('parent_doc') + return JsonResponse({'status':True,'data':list(doc_list)}) + else: + return JsonResponse({'status':False,'data':'参数错误'}) + else: + pass + diff --git a/manage.py b/manage.py new file mode 100644 index 0000000..c555afe --- /dev/null +++ b/manage.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == '__main__': + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'MrDoc.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) diff --git a/media/201907/2019-07-19125449585664manuel-cosentino-670480-unsplash.jpg b/media/201907/2019-07-19125449585664manuel-cosentino-670480-unsplash.jpg new file mode 100644 index 0000000..18ceced Binary files /dev/null and b/media/201907/2019-07-19125449585664manuel-cosentino-670480-unsplash.jpg differ diff --git a/media/201907/2019-07-19130238995271site_banner_1500.webp b/media/201907/2019-07-19130238995271site_banner_1500.webp new file mode 100644 index 0000000..a4e5d9b Binary files /dev/null and b/media/201907/2019-07-19130238995271site_banner_1500.webp differ diff --git a/media/201907/2019-07-19135121674904.png b/media/201907/2019-07-19135121674904.png new file mode 100644 index 0000000..9757b24 Binary files /dev/null and b/media/201907/2019-07-19135121674904.png differ diff --git a/media/logo.png b/media/logo.png new file mode 100644 index 0000000..65e63c0 Binary files /dev/null and b/media/logo.png differ diff --git a/static/autoc/autoc.min.js b/static/autoc/autoc.min.js new file mode 100644 index 0000000..9a1b717 --- /dev/null +++ b/static/autoc/autoc.min.js @@ -0,0 +1,2 @@ +!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.AutocJs=t()}(this,function(){"use strict";function n(e,t){for(var i=0;i=o)return r.scrollTop=o,i.stop(),!1;i.timer=setTimeout(e,30)}(),this}},{key:"stop",value:function(){return clearTimeout(this.timer),this.timer=null,this}},{key:"show",value:function(){var e=this.getElements(),t=p.Utils.DOM;return t.addClass(e.modal,"outline-outside-modal-opened"),t.removeClass(e.overlay,"outline-hidden"),this}},{key:"hide",value:function(){var e=this.getElements(),t=p.Utils.DOM;return t.removeClass(e.modal,"outline-outside-modal-opened"),t.addClass(e.overlay,"outline-hidden"),this}},{key:"toggle",value:function(){return p.Utils.DOM.hasClass(this.getElements().modal,"outline-outside-modal-opened")?this.hide():this.show(),this}},{key:"remove",value:function(){var e=this.getElements(),t=e.wrap;return this.removeListeners(),this.get("isGenerateHeadingAnchor")&&e.anchors.forEach(function(e){e.parentNode.removeChild(e)}),t.parentNode.removeChild(t),this}},{key:"destroy",value:function(){return this.remove(),this.attributes={},this.elements={article:null,wrap:null,modal:null,header:null,title:null,body:null,list:null,footer:null,switcher:null,top:null,overlay:null,anchors:[]},this.data={headings:[],chapters:[]},this.timer=null,this}},{key:"removeListeners",value:function(){var e=this.getElements(),t=e.article,i=e.wrap,n=p.Utils.Events.off,r=this.get("position").toLowerCase();return n(t,"mouseenter",this._handleArticleHeadingMouseEnter),n(t,"mouseleave",this._handleArticleHeadingMouseLeave),"outside"===r&&(n(i,"click",this._handleSwitcherClick),n(i,"click",this._handleTopClick),n(i,"click",this._handleOverlayClick)),n(i,"click",this._handleChapterClick),this.get("isGenerateHeadingAnchor")&&n(t,"click",this._handleHeadingAnchorClick),this}},{key:"addListeners",value:function(){var e=this.getElements(),t=e.article,i=e.wrap,n=p.Utils.Events.delegate,r=this.get("position").toLowerCase();return n(t,".outline-heading","mouseenter",this._handleArticleHeadingMouseEnter,this),n(t,".outline-heading","mouseleave",this._handleArticleHeadingMouseLeave,this),"outside"===r&&(n(i,".outline-outside-switcher","click",this._handleSwitcherClick,this),n(i,".outline-outside-top","click",this._handleTopClick,this),n(i,".outline-outside-overlay","click",this._handleOverlayClick,this)),n(i,".outline-link","click",this._handleChapterClick,this),this.get("isGenerateHeadingAnchor")&&n(t,".outline-heading-anchor","click",this._handleHeadingAnchorClick,this),this}},{key:"_handleArticleHeadingMouseEnter",value:function(e){var t=e.delegateTarget.querySelector(".outline-heading-anchor");return t&&p.Utils.DOM.removeClass(t,"outline-hidden"),this}},{key:"_handleArticleHeadingMouseLeave",value:function(e){var t=e.delegateTarget.querySelector(".outline-heading-anchor");return t&&p.Utils.DOM.addClass(t,"outline-hidden"),this}},{key:"_handleHeadingAnchorClick",value:function(e){var t=e.delegateTarget.getAttribute("rel"),i=document.querySelector("#"+t),n=p.Utils,r=n.DOM,a=n.Events,l=r.offset(i).top;return n.isEmpty(this.get("anchorURL"))&&(this.stop().scrollTo(l),a.stop(e)),this}},{key:"_handleChapterClick",value:function(e){var t=e.delegateTarget.getAttribute("rel"),i=document.querySelector("#"+t),n=p.Utils,r=n.DOM,a=n.Events,l=r.offset(i).top;return"outside"===this.get("position")&&this.hide(),this.stop().scrollTo(l),a.stop(e),this}},{key:"_handleSwitcherClick",value:function(){return this.toggle(),this}},{key:"_handleTopClick",value:function(e){var t=p.Utils.Events;return this.stop().scrollTo(0),t.stop(e),this}},{key:"_handleOverlayClick",value:function(){return this.hide(),this}}]),p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),this.attributes={},this.elements={article:null,wrap:null,modal:null,header:null,title:null,body:null,list:null,footer:null,switcher:null,top:null,overlay:null,anchors:[]},this.data={headings:[],chapters:[]},this.timer=null,this.initialize(e).render().addListeners(),this}return s.defaults={article:"#article",selector:"h1,h2,h3,h4,h5,h6",title:"文章导读",position:"outside",anchorURL:"",anchorAt:"front",isGenerateOutline:!0,isGenerateOutlineChapterCode:!0,isGenerateHeadingChapterCode:!1,isGenerateHeadingAnchor:!0},s.Utils={uuid:0,isObject:function(e){return"[object Object]"===Object.prototype.toString.apply(e)&&null!==e},isArray:function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.apply(e)},isElement:function(e){return e&&e.nodeName&&e.tagName&&1===e.nodeType},isEmpty:function(e){return"string"==typeof e&&""===e},guid:function(e){var t=s.Utils;return t.uuid+=1,e?e+"-"+t.uuid:"guid-"+t.uuid},trim:function(e){return e.replace(/^\s+/g,"").replace(/\s+$/g,"")},stripTags:function(e){return e.replace(/<\/?[^>]+(>|$)/g,"")},groupBy:function(e,i){var n={};return e.forEach(function(e){var t=JSON.stringify(function(e){return[e[i]]}(e));n[t]=n[t]||[],n[t].push(e)}),Object.keys(n).map(function(e){return n[e]})},easeInQuad:function(e){return e*e},extend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}},s.Utils.DOM={createElement:function(e,t,i){var n=s.Utils,r=n.DOM,a=document.createElement(e);for(var l in t)t.hasOwnProperty(l)&&r.setAttribute(a,l,t[l]);return n.isArray(i)&&i.forEach(function(e){var t=n.isElement(e)?e:document.createTextNode(e);a.appendChild(t)}),a},setAttribute:function(e,t,i){var n=e.tagName.toLowerCase();switch(t){case"style":e.style.cssText=i;break;case"value":"input"===n||"textarea"===n?e.value=i:e.setAttribute(t,i);break;case"className":e.className=i;break;default:e.setAttribute(t,i)}},hasClass:function(e,t){var i=e.className;return!!i&&i.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},addClass:function(e,t){var i=e.className;if(s.Utils.DOM.hasClass(e,t))return!1;i+=0", + " *", + " * @file <%= fileName(file) %> ", + " * @version v<%= pkg.version %> ", + " * @description <%= pkg.description %>", + " * @license MIT License", + " * @author <%= pkg.author %>", + " * {@link <%= pkg.homepage %>}", + " * @updateTime <%= pkg.today('Y-m-d') %>", + " */", + "\r\n"].join("\r\n"); + +var headerMiniComment = "/*! <%= pkg.name %> v<%= pkg.version %> | <%= fileName(file) %> | <%= pkg.description %> | MIT License | By: <%= pkg.author %> | <%= pkg.homepage %> | <%=pkg.today('Y-m-d') %> */\r\n"; + +var scssTask = function(fileName, path) { + + path = path || "scss/"; + + var distPath = "css"; + + return sass(path + fileName + ".scss", { style: "expanded", sourcemap: false, noCache : true }) + .pipe(gulp.dest(distPath)) + .pipe(header(headerComment, {pkg : pkg, fileName : function(file) { + var name = file.path.split(file.base); + return name[1].replace("\\", ""); + }})) + .pipe(gulp.dest(distPath)) + .pipe(rename({ suffix: ".min" })) + .pipe(gulp.dest(distPath)) + .pipe(minifycss()) + .pipe(gulp.dest(distPath)) + .pipe(header(headerMiniComment, {pkg : pkg, fileName : function(file) { + var name = file.path.split(file.base); + return name[1].replace("\\", ""); + }})) + .pipe(gulp.dest(distPath)) + .pipe(notify({ message: fileName + ".scss task completed!" })); +}; + +gulp.task("scss", function() { + return scssTask("editormd"); +}); + +gulp.task("scss2", function() { + return scssTask("editormd.preview"); +}); + +gulp.task("scss3", function() { + return scssTask("editormd.logo"); +}); + +gulp.task("js", function() { + return gulp.src("./src/editormd.js") + .pipe(jshint("./.jshintrc")) + .pipe(jshint.reporter("default")) + .pipe(header(headerComment, {pkg : pkg, fileName : function(file) { + var name = file.path.split(file.base); + return name[1].replace(/[\\\/]?/, ""); + }})) + .pipe(gulp.dest("./")) + .pipe(rename({ suffix: ".min" })) + .pipe(uglify()) // {outSourceMap: true, sourceRoot: './'} + .pipe(gulp.dest("./")) + .pipe(header(headerMiniComment, {pkg : pkg, fileName : function(file) { + var name = file.path.split(file.base + ( (os.platform() === "win32") ? "\\" : "/") ); + return name[1].replace(/[\\\/]?/, ""); + }})) + .pipe(gulp.dest("./")) + .pipe(notify({ message: "editormd.js task complete" })); +}); + +gulp.task("amd", function() { + var replaceText1 = [ + 'var cmModePath = "codemirror/mode/";', + ' var cmAddonPath = "codemirror/addon/";', + '', + ' var codeMirrorModules = [', + ' "jquery", "marked", "prettify",', + ' "katex", "raphael", "underscore", "flowchart", "jqueryflowchart", "sequenceDiagram",', + '', + ' "codemirror/lib/codemirror",', + ' cmModePath + "css/css",', + ' cmModePath + "sass/sass",', + ' cmModePath + "shell/shell",', + ' cmModePath + "sql/sql",', + ' cmModePath + "clike/clike",', + ' cmModePath + "php/php",', + ' cmModePath + "xml/xml",', + ' cmModePath + "markdown/markdown",', + ' cmModePath + "javascript/javascript",', + ' cmModePath + "htmlmixed/htmlmixed",', + ' cmModePath + "gfm/gfm",', + ' cmModePath + "http/http",', + ' cmModePath + "go/go",', + ' cmModePath + "dart/dart",', + ' cmModePath + "coffeescript/coffeescript",', + ' cmModePath + "nginx/nginx",', + ' cmModePath + "python/python",', + ' cmModePath + "perl/perl",', + ' cmModePath + "lua/lua",', + ' cmModePath + "r/r", ', + ' cmModePath + "ruby/ruby", ', + ' cmModePath + "rst/rst",', + ' cmModePath + "smartymixed/smartymixed",', + ' cmModePath + "vb/vb",', + ' cmModePath + "vbscript/vbscript",', + ' cmModePath + "velocity/velocity",', + ' cmModePath + "xquery/xquery",', + ' cmModePath + "yaml/yaml",', + ' cmModePath + "erlang/erlang",', + ' cmModePath + "jade/jade",', + '', + ' cmAddonPath + "edit/trailingspace", ', + ' cmAddonPath + "dialog/dialog", ', + ' cmAddonPath + "search/searchcursor", ', + ' cmAddonPath + "search/search", ', + ' cmAddonPath + "scroll/annotatescrollbar", ', + ' cmAddonPath + "search/matchesonscrollbar", ', + ' cmAddonPath + "display/placeholder", ', + ' cmAddonPath + "edit/closetag", ', + ' cmAddonPath + "fold/foldcode",', + ' cmAddonPath + "fold/foldgutter",', + ' cmAddonPath + "fold/indent-fold",', + ' cmAddonPath + "fold/brace-fold",', + ' cmAddonPath + "fold/xml-fold", ', + ' cmAddonPath + "fold/markdown-fold",', + ' cmAddonPath + "fold/comment-fold", ', + ' cmAddonPath + "mode/overlay", ', + ' cmAddonPath + "selection/active-line", ', + ' cmAddonPath + "edit/closebrackets", ', + ' cmAddonPath + "display/fullscreen",', + ' cmAddonPath + "search/match-highlighter"', + ' ];', + '', + ' define(codeMirrorModules, factory);' + ].join("\r\n"); + + var replaceText2 = [ + "if (typeof define == \"function\" && define.amd) {", + " $ = arguments[0];", + " marked = arguments[1];", + " prettify = arguments[2];", + " katex = arguments[3];", + " Raphael = arguments[4];", + " _ = arguments[5];", + " flowchart = arguments[6];", + " CodeMirror = arguments[9];", + " }" + ].join("\r\n"); + + gulp.src("src/editormd.js") + .pipe(rename({ suffix: ".amd" })) + .pipe(gulp.dest('./')) + .pipe(header(headerComment, {pkg : pkg, fileName : function(file) { + var name = file.path.split(file.base); + return name[1].replace(/[\\\/]?/, ""); + }})) + .pipe(gulp.dest("./")) + .pipe(replace("/* Require.js define replace */", replaceText1)) + .pipe(gulp.dest('./')) + .pipe(replace("/* Require.js assignment replace */", replaceText2)) + .pipe(gulp.dest('./')) + .pipe(rename({ suffix: ".min" })) + .pipe(uglify()) //{outSourceMap: true, sourceRoot: './'} + .pipe(gulp.dest("./")) + .pipe(header(headerMiniComment, {pkg : pkg, fileName : function(file) { + var name = file.path.split(file.base + ( (os.platform() === "win32") ? "\\" : "/") ); + return name[1].replace(/[\\\/]?/, ""); + }})) + .pipe(gulp.dest("./")) + .pipe(notify({ message: "amd version task complete"})); +}); + + +var codeMirror = { + path : { + src : { + mode : "lib/codemirror/mode", + addon : "lib/codemirror/addon" + }, + dist : "lib/codemirror" + }, + modes : [ + "css", + "sass", + "shell", + "sql", + "clike", + "php", + "xml", + "markdown", + "javascript", + "htmlmixed", + "gfm", + "http", + "go", + "dart", + "coffeescript", + "nginx", + "python", + "perl", + "lua", + "r", + "ruby", + "rst", + "smartymixed", + "vb", + "vbscript", + "velocity", + "xquery", + "yaml", + "erlang", + "jade", + ], + + addons : [ + "edit/trailingspace", + "dialog/dialog", + "search/searchcursor", + "search/search", + "scroll/annotatescrollbar", + "search/matchesonscrollbar", + "display/placeholder", + "edit/closetag", + "fold/foldcode", + "fold/foldgutter", + "fold/indent-fold", + "fold/brace-fold", + "fold/xml-fold", + "fold/markdown-fold", + "fold/comment-fold", + "mode/overlay", + "selection/active-line", + "edit/closebrackets", + "display/fullscreen", + "search/match-highlighter" + ] +}; + +gulp.task("cm-mode", function() { + + var modes = [ + codeMirror.path.src.mode + "/meta.js" + ]; + + for(var i in codeMirror.modes) { + var mode = codeMirror.modes[i]; + modes.push(codeMirror.path.src.mode + "/" + mode + "/" + mode + ".js"); + } + + return gulp.src(modes) + .pipe(concat("modes.min.js")) + .pipe(gulp.dest(codeMirror.path.dist)) + .pipe(uglify()) // {outSourceMap: true, sourceRoot: codeMirror.path.dist} + .pipe(gulp.dest(codeMirror.path.dist)) + .pipe(header(headerMiniComment, {pkg : pkg, fileName : function(file) { + var name = file.path.split(file.base + "\\"); + return (name[1]?name[1]:name[0]).replace(/\\/g, ""); + }})) + .pipe(gulp.dest(codeMirror.path.dist)) + .pipe(notify({ message: "codemirror-mode task complete!" })); +}); + +gulp.task("cm-addon", function() { + + var addons = []; + + for(var i in codeMirror.addons) { + var addon = codeMirror.addons[i]; + addons.push(codeMirror.path.src.addon + "/" + addon + ".js"); + } + + return gulp.src(addons) + .pipe(concat("addons.min.js")) + .pipe(gulp.dest(codeMirror.path.dist)) + .pipe(uglify()) //{outSourceMap: true, sourceRoot: codeMirror.path.dist} + .pipe(gulp.dest(codeMirror.path.dist)) + .pipe(header(headerMiniComment, {pkg : pkg, fileName : function(file) { + var name = file.path.split(file.base + "\\"); + return (name[1]?name[1]:name[0]).replace(/\\/g, ""); + }})) + .pipe(gulp.dest(codeMirror.path.dist)) + .pipe(notify({ message: "codemirror-addon.js task complete" })); +}); +/* +gulp.task("jsdoc", function(){ + return gulp.src(["./src/editormd.js", "README.md"]) + .pipe(jsdoc.parser()) + .pipe(jsdoc.generator("./docs/html")); +}); + +gulp.task("jsdoc2md", function() { + return gulp.src("src/js/editormd.js") + .pipe(jsdoc2md()) + .on("error", function(err){ + gutil.log(gutil.colors.red("jsdoc2md failed"), err.message); + }) + .pipe(rename(function(path) { + path.extname = ".md"; + })) + .pipe(gulp.dest("docs/markdown")); +}); +*/ +gulp.task("watch", function() { + gulp.watch("scss/editormd.scss", ["scss"]); + gulp.watch("scss/editormd.preview.scss", ["scss", "scss2"]); + gulp.watch("scss/editormd.logo.scss", ["scss", "scss3"]); + gulp.watch("src/editormd.js", ["js", "amd"]); +}); + +gulp.task("default", function() { + gulp.run("scss"); + gulp.run("scss2"); + gulp.run("scss3"); + gulp.run("js"); + gulp.run("amd"); + gulp.run("cm-addon"); + gulp.run("cm-mode"); +}); \ No newline at end of file diff --git a/static/editor.md/LICENSE b/static/editor.md/LICENSE new file mode 100644 index 0000000..aab56ca --- /dev/null +++ b/static/editor.md/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 pandao + +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. + diff --git a/static/editor.md/bower.json b/static/editor.md/bower.json new file mode 100644 index 0000000..86710e2 --- /dev/null +++ b/static/editor.md/bower.json @@ -0,0 +1,24 @@ +{ + "name": "editor.md", + "version": "1.5.0", + "homepage": "https://github.com/pandao/editor.md", + "authors": [ + "Pandao " + ], + "description": "Open source online markdown editor.", + "keywords": [ + "editor.md", + "markdown", + "editor" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "research", + "docs", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/static/editor.md/css/editormd.css b/static/editor.md/css/editormd.css new file mode 100644 index 0000000..73cbfbe --- /dev/null +++ b/static/editor.md/css/editormd.css @@ -0,0 +1,4450 @@ +/* + * Editor.md + * + * @file editormd.css + * @version v1.5.0 + * @description Open source online markdown editor. + * @license MIT License + * @author Pandao + * {@link https://github.com/pandao/editor.md} + * @updateTime 2015-06-09 + */ + +@charset "UTF-8"; +/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ +.editormd { + width: 90%; + height: 640px; + margin: 0 auto; + text-align: left; + overflow: hidden; + position: relative; + margin-bottom: 15px; + border: 1px solid #ddd; + font-family: "Meiryo UI", "Microsoft YaHei", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, "Monaco", monospace, Tahoma, STXihei, "华文细黑", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "宋体", Heiti, "黑体", sans-serif; +} +.editormd *, .editormd *:before, .editormd *:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.editormd a { + text-decoration: none; +} +.editormd img { + border: none; + vertical-align: middle; +} +.editormd > textarea, +.editormd .editormd-html-textarea, +.editormd .editormd-markdown-textarea { + width: 0; + height: 0; + outline: 0; + resize: none; +} +.editormd .editormd-html-textarea, +.editormd .editormd-markdown-textarea { + display: none; +} +.editormd input[type="text"], +.editormd input[type="button"], +.editormd input[type="submit"], +.editormd select, .editormd textarea, .editormd button { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; +} +.editormd ::-webkit-scrollbar { + height: 10px; + width: 7px; + background: rgba(0, 0, 0, 0.1); +} +.editormd ::-webkit-scrollbar:hover { + background: rgba(0, 0, 0, 0.2); +} +.editormd ::-webkit-scrollbar-thumb { + background: rgba(0, 0, 0, 0.3); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + -ms-border-radius: 6px; + -o-border-radius: 6px; + border-radius: 6px; +} +.editormd ::-webkit-scrollbar-thumb:hover { + -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); + /* Webkit browsers */ + -moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); + /* Firefox */ + -ms-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); + /* IE9 */ + -o-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); + /* Opera(Old) */ + box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25); + /* IE9+, News */ + background-color: rgba(0, 0, 0, 0.4); +} + +.editormd-user-unselect { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; +} + +.editormd-toolbar { + width: 100%; + min-height: 37px; + background: #fff; + display: none; + position: absolute; + top: 0; + left: 0; + z-index: 10; + border-bottom: 1px solid #ddd; +} + +.editormd-toolbar-container { + padding: 0 8px; + min-height: 35px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; +} + +.editormd-menu { + margin: 0; + padding: 0; + list-style: none; +} +.editormd-menu > li { + margin: 0; + padding: 5px 1px; + display: inline-block; + position: relative; +} +.editormd-menu > li.divider { + display: inline-block; + text-indent: -9999px; + margin: 0 5px; + height: 65%; + border-right: 1px solid #ddd; +} +.editormd-menu > li > a { + outline: 0; + color: #666; + display: inline-block; + min-width: 24px; + font-size: 16px; + text-decoration: none; + text-align: center; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + border: 1px solid #fff; + -webkit-transition: all 300ms ease-out; + /* Safari, Chrome */ + -moz-transition: all 300ms ease-out; + /* Firefox 4.0~16.0 */ + transition: all 300ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-menu > li > a:hover, .editormd-menu > li > a.active { + border: 1px solid #ddd; + background: #eee; +} +.editormd-menu > li > a > .fa { + text-align: center; + display: block; + padding: 5px; +} +.editormd-menu > li > a > .editormd-bold { + padding: 5px 2px; + display: inline-block; + font-weight: bold; +} +.editormd-menu > li:hover .editormd-dropdown-menu { + display: block; +} +.editormd-menu > li + li > a { + margin-left: 3px; +} + +.editormd-dropdown-menu { + display: none; + background: #fff; + border: 1px solid #ddd; + width: 148px; + list-style: none; + position: absolute; + top: 33px; + left: 0; + z-index: 100; + -webkit-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); + /* Webkit browsers */ + -moz-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); + /* Firefox */ + -ms-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); + /* IE9 */ + -o-box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); + /* Opera(Old) */ + box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15); + /* IE9+, News */ +} +.editormd-dropdown-menu:before, .editormd-dropdown-menu:after { + width: 0; + height: 0; + display: block; + content: ""; + position: absolute; + top: -11px; + left: 8px; + border: 5px solid transparent; +} +.editormd-dropdown-menu:before { + border-bottom-color: #ccc; +} +.editormd-dropdown-menu:after { + border-bottom-color: #ffffff; + top: -10px; +} +.editormd-dropdown-menu > li > a { + color: #666; + display: block; + text-decoration: none; + padding: 8px 10px; +} +.editormd-dropdown-menu > li > a:hover { + background: #f6f6f6; + -webkit-transition: all 300ms ease-out; + /* Safari, Chrome */ + -moz-transition: all 300ms ease-out; + /* Firefox 4.0~16.0 */ + transition: all 300ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-dropdown-menu > li + li { + border-top: 1px solid #ddd; +} + +.editormd-container { + margin: 0; + width: 100%; + height: 100%; + overflow: hidden; + padding: 35px 0 0; + position: relative; + background: #fff; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.editormd-dialog { + color: #666; + position: fixed; + z-index: 99999; + display: none; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + /* Webkit browsers */ + -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + /* Firefox */ + -ms-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + /* IE9 */ + -o-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + /* Opera(Old) */ + box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + /* IE9+, News */ + background: #fff; + font-size: 14px; +} + +.editormd-dialog-container { + position: relative; + padding: 20px; + line-height: 1.4; +} +.editormd-dialog-container h1 { + font-size: 24px; + margin-bottom: 10px; +} +.editormd-dialog-container h1 .fa { + color: #2C7EEA; + padding-right: 5px; +} +.editormd-dialog-container h1 small { + padding-left: 5px; + font-weight: normal; + font-size: 12px; + color: #999; +} +.editormd-dialog-container select { + color: #999; + padding: 3px 8px; + border: 1px solid #ddd; +} + +.editormd-dialog-close { + position: absolute; + top: 12px; + right: 15px; + font-size: 18px; + color: #ccc; + -webkit-transition: color 300ms ease-out; + /* Safari, Chrome */ + -moz-transition: color 300ms ease-out; + /* Firefox 4.0~16.0 */ + transition: color 300ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-dialog-close:hover { + color: #999; +} + +.editormd-dialog-header { + padding: 11px 20px; + border-bottom: 1px solid #eee; + -webkit-transition: background 300ms ease-out; + /* Safari, Chrome */ + -moz-transition: background 300ms ease-out; + /* Firefox 4.0~16.0 */ + transition: background 300ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-dialog-header:hover { + background: #f6f6f6; +} + +.editormd-dialog-title { + font-size: 14px; +} + +.editormd-dialog-footer { + padding: 10px 0 0 0; + text-align: right; +} + +.editormd-dialog-info { + width: 420px; +} +.editormd-dialog-info h1 { + font-weight: normal; +} +.editormd-dialog-info .editormd-dialog-container { + padding: 20px 25px 25px; +} +.editormd-dialog-info .editormd-dialog-close { + top: 10px; + right: 10px; +} +.editormd-dialog-info p > a, .editormd-dialog-info .hover-link:hover { + color: #2196F3; +} +.editormd-dialog-info .hover-link { + color: #666; +} +.editormd-dialog-info a .fa-external-link { + display: none; +} +.editormd-dialog-info a:hover { + color: #2196F3; +} +.editormd-dialog-info a:hover .fa-external-link { + display: inline-block; +} + +.editormd-mask, +.editormd-container-mask, +.editormd-dialog-mask { + display: none; + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; +} + +.editormd-mask, +.editormd-dialog-mask-bg { + background: #fff; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.editormd-mask { + position: fixed; + background: #000; + opacity: 0.2; + /* W3C */ + filter: alpha(opacity=20); + /* IE */ + z-index: 99998; +} + +.editormd-container-mask, +.editormd-dialog-mask-con { + background: url(../images/loading.gif) no-repeat center center; + -webkit-background-size: 32px 32px; + /* Chrome, iOS, Safari */ + -moz-background-size: 32px 32px; + /* Firefox 3.6~4.0 */ + -o-background-size: 32px 32px; + /* Opera 9.5 */ + background-size: 32px 32px; + /* IE9+, New */ +} + +.editormd-container-mask { + z-index: 20; + display: block; + background-color: #fff; +} + +@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) { + .editormd-container-mask, + .editormd-dialog-mask-con { + background-image: url(../images/loading@2x.gif); + } +} +@media only screen and (-webkit-min-device-pixel-ratio: 3), only screen and (min-device-pixel-ratio: 3) { + .editormd-container-mask, + .editormd-dialog-mask-con { + background-image: url(../images/loading@3x.gif); + } +} +.editormd-code-block-dialog textarea, +.editormd-preformatted-text-dialog textarea { + width: 100%; + height: 400px; + margin-bottom: 6px; + overflow: auto; + border: 1px solid #eee; + background: #fff; + padding: 15px; + resize: none; +} + +.editormd-code-toolbar { + color: #999; + font-size: 14px; + margin: -5px 0 10px; +} + +.editormd-grid-table { + width: 99%; + display: table; + border: 1px solid #ddd; + border-collapse: collapse; +} + +.editormd-grid-table-row { + width: 100%; + display: table-row; +} +.editormd-grid-table-row a { + font-size: 1.4em; + width: 5%; + height: 36px; + color: #999; + text-align: center; + display: table-cell; + vertical-align: middle; + border: 1px solid #ddd; + text-decoration: none; + -webkit-transition: background-color 300ms ease-out, color 100ms ease-in; + /* Safari, Chrome */ + -moz-transition: background-color 300ms ease-out, color 100ms ease-in; + /* Firefox 4.0~16.0 */ + transition: background-color 300ms ease-out, color 100ms ease-in; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-grid-table-row a.selected { + color: #666; + background-color: #eee; +} +.editormd-grid-table-row a:hover { + color: #777; + background-color: #f6f6f6; +} + +.editormd-tab-head { + list-style: none; + border-bottom: 1px solid #ddd; +} +.editormd-tab-head li { + display: inline-block; +} +.editormd-tab-head li a { + color: #999; + display: block; + padding: 6px 12px 5px; + text-align: center; + text-decoration: none; + margin-bottom: -1px; + border: 1px solid #ddd; + -webkit-border-top-left-radius: 3px; + -moz-border-top-left-radius: 3px; + -ms-border-top-left-radius: 3px; + -o-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -webkit-border-top-right-radius: 3px; + -moz-border-top-right-radius: 3px; + -ms-border-top-right-radius: 3px; + -o-border-top-right-radius: 3px; + border-top-right-radius: 3px; + background: #f6f6f6; + -webkit-transition: all 300ms ease-out; + /* Safari, Chrome */ + -moz-transition: all 300ms ease-out; + /* Firefox 4.0~16.0 */ + transition: all 300ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-tab-head li a:hover { + color: #666; + background: #eee; +} +.editormd-tab-head li.active a { + color: #666; + background: #fff; + border-bottom-color: #fff; +} +.editormd-tab-head li + li { + margin-left: 3px; +} + +.editormd-tab-box { + padding: 20px 0; +} + +.editormd-form { + color: #666; +} +.editormd-form label { + float: left; + display: block; + width: 75px; + text-align: left; + padding: 7px 0 15px 5px; + margin: 0 0 2px; + font-weight: normal; +} +.editormd-form br { + clear: both; +} +.editormd-form iframe { + display: none; +} +.editormd-form input:focus { + outline: 0; +} +.editormd-form input[type="text"], .editormd-form input[type="number"] { + color: #999; + padding: 8px; + border: 1px solid #ddd; +} +.editormd-form input[type="number"] { + width: 40px; + display: inline-block; + padding: 6px 8px; +} +.editormd-form input[type="text"] { + display: inline-block; + width: 264px; +} +.editormd-form .fa-btns { + display: inline-block; +} +.editormd-form .fa-btns a { + color: #999; + padding: 7px 10px 0 0; + display: inline-block; + text-decoration: none; + text-align: center; +} +.editormd-form .fa-btns .fa { + font-size: 1.3em; +} +.editormd-form .fa-btns label { + float: none; + display: inline-block; + width: auto; + text-align: left; + padding: 0 0 0 5px; + cursor: pointer; +} + +.editormd-form input[type="submit"], .editormd-form .editormd-btn, .editormd-form button, +.editormd-dialog-container input[type="submit"], +.editormd-dialog-container .editormd-btn, +.editormd-dialog-container button, +.editormd-dialog-footer input[type="submit"], +.editormd-dialog-footer .editormd-btn, +.editormd-dialog-footer button { + color: #666; + min-width: 75px; + cursor: pointer; + background: #fff; + padding: 7px 10px; + border: 1px solid #ddd; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + -webkit-transition: background 300ms ease-out; + /* Safari, Chrome */ + -moz-transition: background 300ms ease-out; + /* Firefox 4.0~16.0 */ + transition: background 300ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-form input[type="submit"]:hover, .editormd-form .editormd-btn:hover, .editormd-form button:hover, +.editormd-dialog-container input[type="submit"]:hover, +.editormd-dialog-container .editormd-btn:hover, +.editormd-dialog-container button:hover, +.editormd-dialog-footer input[type="submit"]:hover, +.editormd-dialog-footer .editormd-btn:hover, +.editormd-dialog-footer button:hover { + background: #eee; +} +.editormd-form .editormd-btn, +.editormd-dialog-container .editormd-btn, +.editormd-dialog-footer .editormd-btn { + padding: 5px 8px 4px\0; +} +.editormd-form .editormd-btn + .editormd-btn, +.editormd-dialog-container .editormd-btn + .editormd-btn, +.editormd-dialog-footer .editormd-btn + .editormd-btn { + margin-left: 8px; +} + +.editormd-file-input { + width: 75px; + height: 32px; + margin-left: 8px; + position: relative; + display: inline-block; +} +.editormd-file-input input[type="file"] { + width: 75px; + height: 32px; + opacity: 0; + cursor: pointer; + background: #000; + display: inline-block; + position: absolute; + top: 0; + right: 0; +} +.editormd-file-input input[type="file"]::-webkit-file-upload-button { + visibility: hidden; +} +.editormd-file-input:hover input[type="submit"] { + background: #eee; +} + +.editormd .CodeMirror, .editormd-preview { + display: inline-block; + width: 50%; + height: 100%; + vertical-align: top; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin: 0; +} + +.editormd-preview { + position: absolute; + top: 35px; + right: 0; + right: -1px\0; + overflow: auto; + line-height: 1.6; + display: none; + background: #fff; +} + +.editormd .CodeMirror { + z-index: 10; + float: left; + border-right: 1px solid #ddd; + font-size: 14px; + font-family: "YaHei Consolas Hybrid", Consolas, "微软雅黑", "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, "Monaco", courier, monospace; + line-height: 1.6; + margin-top: 35px; +} +.editormd .CodeMirror pre { + font-size: 14px; + padding: 0 12px; +} +.editormd .CodeMirror-linenumbers { + padding: 0 5px; +} +.editormd .CodeMirror-selected { + background: #70B7FF; +} +.editormd .CodeMirror-focused .CodeMirror-selected { + background: #70B7FF; +} +.editormd .CodeMirror, .editormd .CodeMirror-scroll, .editormd .editormd-preview { + -webkit-overflow-scrolling: touch; +} +.editormd .styled-background { + background-color: #ff7; +} +.editormd .CodeMirror-focused .cm-matchhighlight { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==); + background-position: bottom; + background-repeat: repeat-x; +} +.editormd .CodeMirror-empty.CodeMirror-focused { + outline: none; +} +.editormd .CodeMirror pre.CodeMirror-placeholder { + color: #999; +} +.editormd .cm-trailingspace { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==); + background-position: bottom left; + background-repeat: repeat-x; +} +.editormd .cm-tab { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=); + background-position: right; + background-repeat: no-repeat; +} + +/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ +/*! + * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'FontAwesome'; + src: url("../fonts/fontawesome-webfont.eot?v=4.3.0"); + src: url("../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0") format("embedded-opentype"), url("../fonts/fontawesome-webfont.woff2?v=4.3.0") format("woff2"), url("../fonts/fontawesome-webfont.woff?v=4.3.0") format("woff"), url("../fonts/fontawesome-webfont.ttf?v=4.3.0") format("truetype"), url("../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular") format("svg"); + font-weight: normal; + font-style: normal; +} +.fa { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + transform: translate(0, 0); +} + +/* makes the font 33% larger relative to the icon container */ +.fa-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} + +.fa-2x { + font-size: 2em; +} + +.fa-3x { + font-size: 3em; +} + +.fa-4x { + font-size: 4em; +} + +.fa-5x { + font-size: 5em; +} + +.fa-fw { + width: 1.28571429em; + text-align: center; +} + +.fa-ul { + padding-left: 0; + margin-left: 2.14285714em; + list-style-type: none; +} + +.fa-ul > li { + position: relative; +} + +.fa-li { + position: absolute; + left: -2.14285714em; + width: 2.14285714em; + top: 0.14285714em; + text-align: center; +} + +.fa-li.fa-lg { + left: -1.85714286em; +} + +.fa-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.fa.pull-left { + margin-right: .3em; +} + +.fa.pull-right { + margin-left: .3em; +} + +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} + +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); +} + +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +.fa-rotate-90 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} + +.fa-rotate-180 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.fa-rotate-270 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); +} + +.fa-flip-horizontal { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); +} + +.fa-flip-vertical { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); +} + +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + filter: none; +} + +.fa-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} + +.fa-stack-1x, +.fa-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} + +.fa-stack-1x { + line-height: inherit; +} + +.fa-stack-2x { + font-size: 2em; +} + +.fa-inverse { + color: #ffffff; +} + +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.fa-glass:before { + content: "\f000"; +} + +.fa-music:before { + content: "\f001"; +} + +.fa-search:before { + content: "\f002"; +} + +.fa-envelope-o:before { + content: "\f003"; +} + +.fa-heart:before { + content: "\f004"; +} + +.fa-star:before { + content: "\f005"; +} + +.fa-star-o:before { + content: "\f006"; +} + +.fa-user:before { + content: "\f007"; +} + +.fa-film:before { + content: "\f008"; +} + +.fa-th-large:before { + content: "\f009"; +} + +.fa-th:before { + content: "\f00a"; +} + +.fa-th-list:before { + content: "\f00b"; +} + +.fa-check:before { + content: "\f00c"; +} + +.fa-remove:before, +.fa-close:before, +.fa-times:before { + content: "\f00d"; +} + +.fa-search-plus:before { + content: "\f00e"; +} + +.fa-search-minus:before { + content: "\f010"; +} + +.fa-power-off:before { + content: "\f011"; +} + +.fa-signal:before { + content: "\f012"; +} + +.fa-gear:before, +.fa-cog:before { + content: "\f013"; +} + +.fa-trash-o:before { + content: "\f014"; +} + +.fa-home:before { + content: "\f015"; +} + +.fa-file-o:before { + content: "\f016"; +} + +.fa-clock-o:before { + content: "\f017"; +} + +.fa-road:before { + content: "\f018"; +} + +.fa-download:before { + content: "\f019"; +} + +.fa-arrow-circle-o-down:before { + content: "\f01a"; +} + +.fa-arrow-circle-o-up:before { + content: "\f01b"; +} + +.fa-inbox:before { + content: "\f01c"; +} + +.fa-play-circle-o:before { + content: "\f01d"; +} + +.fa-rotate-right:before, +.fa-repeat:before { + content: "\f01e"; +} + +.fa-refresh:before { + content: "\f021"; +} + +.fa-list-alt:before { + content: "\f022"; +} + +.fa-lock:before { + content: "\f023"; +} + +.fa-flag:before { + content: "\f024"; +} + +.fa-headphones:before { + content: "\f025"; +} + +.fa-volume-off:before { + content: "\f026"; +} + +.fa-volume-down:before { + content: "\f027"; +} + +.fa-volume-up:before { + content: "\f028"; +} + +.fa-qrcode:before { + content: "\f029"; +} + +.fa-barcode:before { + content: "\f02a"; +} + +.fa-tag:before { + content: "\f02b"; +} + +.fa-tags:before { + content: "\f02c"; +} + +.fa-book:before { + content: "\f02d"; +} + +.fa-bookmark:before { + content: "\f02e"; +} + +.fa-print:before { + content: "\f02f"; +} + +.fa-camera:before { + content: "\f030"; +} + +.fa-font:before { + content: "\f031"; +} + +.fa-bold:before { + content: "\f032"; +} + +.fa-italic:before { + content: "\f033"; +} + +.fa-text-height:before { + content: "\f034"; +} + +.fa-text-width:before { + content: "\f035"; +} + +.fa-align-left:before { + content: "\f036"; +} + +.fa-align-center:before { + content: "\f037"; +} + +.fa-align-right:before { + content: "\f038"; +} + +.fa-align-justify:before { + content: "\f039"; +} + +.fa-list:before { + content: "\f03a"; +} + +.fa-dedent:before, +.fa-outdent:before { + content: "\f03b"; +} + +.fa-indent:before { + content: "\f03c"; +} + +.fa-video-camera:before { + content: "\f03d"; +} + +.fa-photo:before, +.fa-image:before, +.fa-picture-o:before { + content: "\f03e"; +} + +.fa-pencil:before { + content: "\f040"; +} + +.fa-map-marker:before { + content: "\f041"; +} + +.fa-adjust:before { + content: "\f042"; +} + +.fa-tint:before { + content: "\f043"; +} + +.fa-edit:before, +.fa-pencil-square-o:before { + content: "\f044"; +} + +.fa-share-square-o:before { + content: "\f045"; +} + +.fa-check-square-o:before { + content: "\f046"; +} + +.fa-arrows:before { + content: "\f047"; +} + +.fa-step-backward:before { + content: "\f048"; +} + +.fa-fast-backward:before { + content: "\f049"; +} + +.fa-backward:before { + content: "\f04a"; +} + +.fa-play:before { + content: "\f04b"; +} + +.fa-pause:before { + content: "\f04c"; +} + +.fa-stop:before { + content: "\f04d"; +} + +.fa-forward:before { + content: "\f04e"; +} + +.fa-fast-forward:before { + content: "\f050"; +} + +.fa-step-forward:before { + content: "\f051"; +} + +.fa-eject:before { + content: "\f052"; +} + +.fa-chevron-left:before { + content: "\f053"; +} + +.fa-chevron-right:before { + content: "\f054"; +} + +.fa-plus-circle:before { + content: "\f055"; +} + +.fa-minus-circle:before { + content: "\f056"; +} + +.fa-times-circle:before { + content: "\f057"; +} + +.fa-check-circle:before { + content: "\f058"; +} + +.fa-question-circle:before { + content: "\f059"; +} + +.fa-info-circle:before { + content: "\f05a"; +} + +.fa-crosshairs:before { + content: "\f05b"; +} + +.fa-times-circle-o:before { + content: "\f05c"; +} + +.fa-check-circle-o:before { + content: "\f05d"; +} + +.fa-ban:before { + content: "\f05e"; +} + +.fa-arrow-left:before { + content: "\f060"; +} + +.fa-arrow-right:before { + content: "\f061"; +} + +.fa-arrow-up:before { + content: "\f062"; +} + +.fa-arrow-down:before { + content: "\f063"; +} + +.fa-mail-forward:before, +.fa-share:before { + content: "\f064"; +} + +.fa-expand:before { + content: "\f065"; +} + +.fa-compress:before { + content: "\f066"; +} + +.fa-plus:before { + content: "\f067"; +} + +.fa-minus:before { + content: "\f068"; +} + +.fa-asterisk:before { + content: "\f069"; +} + +.fa-exclamation-circle:before { + content: "\f06a"; +} + +.fa-gift:before { + content: "\f06b"; +} + +.fa-leaf:before { + content: "\f06c"; +} + +.fa-fire:before { + content: "\f06d"; +} + +.fa-eye:before { + content: "\f06e"; +} + +.fa-eye-slash:before { + content: "\f070"; +} + +.fa-warning:before, +.fa-exclamation-triangle:before { + content: "\f071"; +} + +.fa-plane:before { + content: "\f072"; +} + +.fa-calendar:before { + content: "\f073"; +} + +.fa-random:before { + content: "\f074"; +} + +.fa-comment:before { + content: "\f075"; +} + +.fa-magnet:before { + content: "\f076"; +} + +.fa-chevron-up:before { + content: "\f077"; +} + +.fa-chevron-down:before { + content: "\f078"; +} + +.fa-retweet:before { + content: "\f079"; +} + +.fa-shopping-cart:before { + content: "\f07a"; +} + +.fa-folder:before { + content: "\f07b"; +} + +.fa-folder-open:before { + content: "\f07c"; +} + +.fa-arrows-v:before { + content: "\f07d"; +} + +.fa-arrows-h:before { + content: "\f07e"; +} + +.fa-bar-chart-o:before, +.fa-bar-chart:before { + content: "\f080"; +} + +.fa-twitter-square:before { + content: "\f081"; +} + +.fa-facebook-square:before { + content: "\f082"; +} + +.fa-camera-retro:before { + content: "\f083"; +} + +.fa-key:before { + content: "\f084"; +} + +.fa-gears:before, +.fa-cogs:before { + content: "\f085"; +} + +.fa-comments:before { + content: "\f086"; +} + +.fa-thumbs-o-up:before { + content: "\f087"; +} + +.fa-thumbs-o-down:before { + content: "\f088"; +} + +.fa-star-half:before { + content: "\f089"; +} + +.fa-heart-o:before { + content: "\f08a"; +} + +.fa-sign-out:before { + content: "\f08b"; +} + +.fa-linkedin-square:before { + content: "\f08c"; +} + +.fa-thumb-tack:before { + content: "\f08d"; +} + +.fa-external-link:before { + content: "\f08e"; +} + +.fa-sign-in:before { + content: "\f090"; +} + +.fa-trophy:before { + content: "\f091"; +} + +.fa-github-square:before { + content: "\f092"; +} + +.fa-upload:before { + content: "\f093"; +} + +.fa-lemon-o:before { + content: "\f094"; +} + +.fa-phone:before { + content: "\f095"; +} + +.fa-square-o:before { + content: "\f096"; +} + +.fa-bookmark-o:before { + content: "\f097"; +} + +.fa-phone-square:before { + content: "\f098"; +} + +.fa-twitter:before { + content: "\f099"; +} + +.fa-facebook-f:before, +.fa-facebook:before { + content: "\f09a"; +} + +.fa-github:before { + content: "\f09b"; +} + +.fa-unlock:before { + content: "\f09c"; +} + +.fa-credit-card:before { + content: "\f09d"; +} + +.fa-rss:before { + content: "\f09e"; +} + +.fa-hdd-o:before { + content: "\f0a0"; +} + +.fa-bullhorn:before { + content: "\f0a1"; +} + +.fa-bell:before { + content: "\f0f3"; +} + +.fa-certificate:before { + content: "\f0a3"; +} + +.fa-hand-o-right:before { + content: "\f0a4"; +} + +.fa-hand-o-left:before { + content: "\f0a5"; +} + +.fa-hand-o-up:before { + content: "\f0a6"; +} + +.fa-hand-o-down:before { + content: "\f0a7"; +} + +.fa-arrow-circle-left:before { + content: "\f0a8"; +} + +.fa-arrow-circle-right:before { + content: "\f0a9"; +} + +.fa-arrow-circle-up:before { + content: "\f0aa"; +} + +.fa-arrow-circle-down:before { + content: "\f0ab"; +} + +.fa-globe:before { + content: "\f0ac"; +} + +.fa-wrench:before { + content: "\f0ad"; +} + +.fa-tasks:before { + content: "\f0ae"; +} + +.fa-filter:before { + content: "\f0b0"; +} + +.fa-briefcase:before { + content: "\f0b1"; +} + +.fa-arrows-alt:before { + content: "\f0b2"; +} + +.fa-group:before, +.fa-users:before { + content: "\f0c0"; +} + +.fa-chain:before, +.fa-link:before { + content: "\f0c1"; +} + +.fa-cloud:before { + content: "\f0c2"; +} + +.fa-flask:before { + content: "\f0c3"; +} + +.fa-cut:before, +.fa-scissors:before { + content: "\f0c4"; +} + +.fa-copy:before, +.fa-files-o:before { + content: "\f0c5"; +} + +.fa-paperclip:before { + content: "\f0c6"; +} + +.fa-save:before, +.fa-floppy-o:before { + content: "\f0c7"; +} + +.fa-square:before { + content: "\f0c8"; +} + +.fa-navicon:before, +.fa-reorder:before, +.fa-bars:before { + content: "\f0c9"; +} + +.fa-list-ul:before { + content: "\f0ca"; +} + +.fa-list-ol:before { + content: "\f0cb"; +} + +.fa-strikethrough:before { + content: "\f0cc"; +} + +.fa-underline:before { + content: "\f0cd"; +} + +.fa-table:before { + content: "\f0ce"; +} + +.fa-magic:before { + content: "\f0d0"; +} + +.fa-truck:before { + content: "\f0d1"; +} + +.fa-pinterest:before { + content: "\f0d2"; +} + +.fa-pinterest-square:before { + content: "\f0d3"; +} + +.fa-google-plus-square:before { + content: "\f0d4"; +} + +.fa-google-plus:before { + content: "\f0d5"; +} + +.fa-money:before { + content: "\f0d6"; +} + +.fa-caret-down:before { + content: "\f0d7"; +} + +.fa-caret-up:before { + content: "\f0d8"; +} + +.fa-caret-left:before { + content: "\f0d9"; +} + +.fa-caret-right:before { + content: "\f0da"; +} + +.fa-columns:before { + content: "\f0db"; +} + +.fa-unsorted:before, +.fa-sort:before { + content: "\f0dc"; +} + +.fa-sort-down:before, +.fa-sort-desc:before { + content: "\f0dd"; +} + +.fa-sort-up:before, +.fa-sort-asc:before { + content: "\f0de"; +} + +.fa-envelope:before { + content: "\f0e0"; +} + +.fa-linkedin:before { + content: "\f0e1"; +} + +.fa-rotate-left:before, +.fa-undo:before { + content: "\f0e2"; +} + +.fa-legal:before, +.fa-gavel:before { + content: "\f0e3"; +} + +.fa-dashboard:before, +.fa-tachometer:before { + content: "\f0e4"; +} + +.fa-comment-o:before { + content: "\f0e5"; +} + +.fa-comments-o:before { + content: "\f0e6"; +} + +.fa-flash:before, +.fa-bolt:before { + content: "\f0e7"; +} + +.fa-sitemap:before { + content: "\f0e8"; +} + +.fa-umbrella:before { + content: "\f0e9"; +} + +.fa-paste:before, +.fa-clipboard:before { + content: "\f0ea"; +} + +.fa-lightbulb-o:before { + content: "\f0eb"; +} + +.fa-exchange:before { + content: "\f0ec"; +} + +.fa-cloud-download:before { + content: "\f0ed"; +} + +.fa-cloud-upload:before { + content: "\f0ee"; +} + +.fa-user-md:before { + content: "\f0f0"; +} + +.fa-stethoscope:before { + content: "\f0f1"; +} + +.fa-suitcase:before { + content: "\f0f2"; +} + +.fa-bell-o:before { + content: "\f0a2"; +} + +.fa-coffee:before { + content: "\f0f4"; +} + +.fa-cutlery:before { + content: "\f0f5"; +} + +.fa-file-text-o:before { + content: "\f0f6"; +} + +.fa-building-o:before { + content: "\f0f7"; +} + +.fa-hospital-o:before { + content: "\f0f8"; +} + +.fa-ambulance:before { + content: "\f0f9"; +} + +.fa-medkit:before { + content: "\f0fa"; +} + +.fa-fighter-jet:before { + content: "\f0fb"; +} + +.fa-beer:before { + content: "\f0fc"; +} + +.fa-h-square:before { + content: "\f0fd"; +} + +.fa-plus-square:before { + content: "\f0fe"; +} + +.fa-angle-double-left:before { + content: "\f100"; +} + +.fa-angle-double-right:before { + content: "\f101"; +} + +.fa-angle-double-up:before { + content: "\f102"; +} + +.fa-angle-double-down:before { + content: "\f103"; +} + +.fa-angle-left:before { + content: "\f104"; +} + +.fa-angle-right:before { + content: "\f105"; +} + +.fa-angle-up:before { + content: "\f106"; +} + +.fa-angle-down:before { + content: "\f107"; +} + +.fa-desktop:before { + content: "\f108"; +} + +.fa-laptop:before { + content: "\f109"; +} + +.fa-tablet:before { + content: "\f10a"; +} + +.fa-mobile-phone:before, +.fa-mobile:before { + content: "\f10b"; +} + +.fa-circle-o:before { + content: "\f10c"; +} + +.fa-quote-left:before { + content: "\f10d"; +} + +.fa-quote-right:before { + content: "\f10e"; +} + +.fa-spinner:before { + content: "\f110"; +} + +.fa-circle:before { + content: "\f111"; +} + +.fa-mail-reply:before, +.fa-reply:before { + content: "\f112"; +} + +.fa-github-alt:before { + content: "\f113"; +} + +.fa-folder-o:before { + content: "\f114"; +} + +.fa-folder-open-o:before { + content: "\f115"; +} + +.fa-smile-o:before { + content: "\f118"; +} + +.fa-frown-o:before { + content: "\f119"; +} + +.fa-meh-o:before { + content: "\f11a"; +} + +.fa-gamepad:before { + content: "\f11b"; +} + +.fa-keyboard-o:before { + content: "\f11c"; +} + +.fa-flag-o:before { + content: "\f11d"; +} + +.fa-flag-checkered:before { + content: "\f11e"; +} + +.fa-terminal:before { + content: "\f120"; +} + +.fa-code:before { + content: "\f121"; +} + +.fa-mail-reply-all:before, +.fa-reply-all:before { + content: "\f122"; +} + +.fa-star-half-empty:before, +.fa-star-half-full:before, +.fa-star-half-o:before { + content: "\f123"; +} + +.fa-location-arrow:before { + content: "\f124"; +} + +.fa-crop:before { + content: "\f125"; +} + +.fa-code-fork:before { + content: "\f126"; +} + +.fa-unlink:before, +.fa-chain-broken:before { + content: "\f127"; +} + +.fa-question:before { + content: "\f128"; +} + +.fa-info:before { + content: "\f129"; +} + +.fa-exclamation:before { + content: "\f12a"; +} + +.fa-superscript:before { + content: "\f12b"; +} + +.fa-subscript:before { + content: "\f12c"; +} + +.fa-eraser:before { + content: "\f12d"; +} + +.fa-puzzle-piece:before { + content: "\f12e"; +} + +.fa-microphone:before { + content: "\f130"; +} + +.fa-microphone-slash:before { + content: "\f131"; +} + +.fa-shield:before { + content: "\f132"; +} + +.fa-calendar-o:before { + content: "\f133"; +} + +.fa-fire-extinguisher:before { + content: "\f134"; +} + +.fa-rocket:before { + content: "\f135"; +} + +.fa-maxcdn:before { + content: "\f136"; +} + +.fa-chevron-circle-left:before { + content: "\f137"; +} + +.fa-chevron-circle-right:before { + content: "\f138"; +} + +.fa-chevron-circle-up:before { + content: "\f139"; +} + +.fa-chevron-circle-down:before { + content: "\f13a"; +} + +.fa-html5:before { + content: "\f13b"; +} + +.fa-css3:before { + content: "\f13c"; +} + +.fa-anchor:before { + content: "\f13d"; +} + +.fa-unlock-alt:before { + content: "\f13e"; +} + +.fa-bullseye:before { + content: "\f140"; +} + +.fa-ellipsis-h:before { + content: "\f141"; +} + +.fa-ellipsis-v:before { + content: "\f142"; +} + +.fa-rss-square:before { + content: "\f143"; +} + +.fa-play-circle:before { + content: "\f144"; +} + +.fa-ticket:before { + content: "\f145"; +} + +.fa-minus-square:before { + content: "\f146"; +} + +.fa-minus-square-o:before { + content: "\f147"; +} + +.fa-level-up:before { + content: "\f148"; +} + +.fa-level-down:before { + content: "\f149"; +} + +.fa-check-square:before { + content: "\f14a"; +} + +.fa-pencil-square:before { + content: "\f14b"; +} + +.fa-external-link-square:before { + content: "\f14c"; +} + +.fa-share-square:before { + content: "\f14d"; +} + +.fa-compass:before { + content: "\f14e"; +} + +.fa-toggle-down:before, +.fa-caret-square-o-down:before { + content: "\f150"; +} + +.fa-toggle-up:before, +.fa-caret-square-o-up:before { + content: "\f151"; +} + +.fa-toggle-right:before, +.fa-caret-square-o-right:before { + content: "\f152"; +} + +.fa-euro:before, +.fa-eur:before { + content: "\f153"; +} + +.fa-gbp:before { + content: "\f154"; +} + +.fa-dollar:before, +.fa-usd:before { + content: "\f155"; +} + +.fa-rupee:before, +.fa-inr:before { + content: "\f156"; +} + +.fa-cny:before, +.fa-rmb:before, +.fa-yen:before, +.fa-jpy:before { + content: "\f157"; +} + +.fa-ruble:before, +.fa-rouble:before, +.fa-rub:before { + content: "\f158"; +} + +.fa-won:before, +.fa-krw:before { + content: "\f159"; +} + +.fa-bitcoin:before, +.fa-btc:before { + content: "\f15a"; +} + +.fa-file:before { + content: "\f15b"; +} + +.fa-file-text:before { + content: "\f15c"; +} + +.fa-sort-alpha-asc:before { + content: "\f15d"; +} + +.fa-sort-alpha-desc:before { + content: "\f15e"; +} + +.fa-sort-amount-asc:before { + content: "\f160"; +} + +.fa-sort-amount-desc:before { + content: "\f161"; +} + +.fa-sort-numeric-asc:before { + content: "\f162"; +} + +.fa-sort-numeric-desc:before { + content: "\f163"; +} + +.fa-thumbs-up:before { + content: "\f164"; +} + +.fa-thumbs-down:before { + content: "\f165"; +} + +.fa-youtube-square:before { + content: "\f166"; +} + +.fa-youtube:before { + content: "\f167"; +} + +.fa-xing:before { + content: "\f168"; +} + +.fa-xing-square:before { + content: "\f169"; +} + +.fa-youtube-play:before { + content: "\f16a"; +} + +.fa-dropbox:before { + content: "\f16b"; +} + +.fa-stack-overflow:before { + content: "\f16c"; +} + +.fa-instagram:before { + content: "\f16d"; +} + +.fa-flickr:before { + content: "\f16e"; +} + +.fa-adn:before { + content: "\f170"; +} + +.fa-bitbucket:before { + content: "\f171"; +} + +.fa-bitbucket-square:before { + content: "\f172"; +} + +.fa-tumblr:before { + content: "\f173"; +} + +.fa-tumblr-square:before { + content: "\f174"; +} + +.fa-long-arrow-down:before { + content: "\f175"; +} + +.fa-long-arrow-up:before { + content: "\f176"; +} + +.fa-long-arrow-left:before { + content: "\f177"; +} + +.fa-long-arrow-right:before { + content: "\f178"; +} + +.fa-apple:before { + content: "\f179"; +} + +.fa-windows:before { + content: "\f17a"; +} + +.fa-android:before { + content: "\f17b"; +} + +.fa-linux:before { + content: "\f17c"; +} + +.fa-dribbble:before { + content: "\f17d"; +} + +.fa-skype:before { + content: "\f17e"; +} + +.fa-foursquare:before { + content: "\f180"; +} + +.fa-trello:before { + content: "\f181"; +} + +.fa-female:before { + content: "\f182"; +} + +.fa-male:before { + content: "\f183"; +} + +.fa-gittip:before, +.fa-gratipay:before { + content: "\f184"; +} + +.fa-sun-o:before { + content: "\f185"; +} + +.fa-moon-o:before { + content: "\f186"; +} + +.fa-archive:before { + content: "\f187"; +} + +.fa-bug:before { + content: "\f188"; +} + +.fa-vk:before { + content: "\f189"; +} + +.fa-weibo:before { + content: "\f18a"; +} + +.fa-renren:before { + content: "\f18b"; +} + +.fa-pagelines:before { + content: "\f18c"; +} + +.fa-stack-exchange:before { + content: "\f18d"; +} + +.fa-arrow-circle-o-right:before { + content: "\f18e"; +} + +.fa-arrow-circle-o-left:before { + content: "\f190"; +} + +.fa-toggle-left:before, +.fa-caret-square-o-left:before { + content: "\f191"; +} + +.fa-dot-circle-o:before { + content: "\f192"; +} + +.fa-wheelchair:before { + content: "\f193"; +} + +.fa-vimeo-square:before { + content: "\f194"; +} + +.fa-turkish-lira:before, +.fa-try:before { + content: "\f195"; +} + +.fa-plus-square-o:before { + content: "\f196"; +} + +.fa-space-shuttle:before { + content: "\f197"; +} + +.fa-slack:before { + content: "\f198"; +} + +.fa-envelope-square:before { + content: "\f199"; +} + +.fa-wordpress:before { + content: "\f19a"; +} + +.fa-openid:before { + content: "\f19b"; +} + +.fa-institution:before, +.fa-bank:before, +.fa-university:before { + content: "\f19c"; +} + +.fa-mortar-board:before, +.fa-graduation-cap:before { + content: "\f19d"; +} + +.fa-yahoo:before { + content: "\f19e"; +} + +.fa-google:before { + content: "\f1a0"; +} + +.fa-reddit:before { + content: "\f1a1"; +} + +.fa-reddit-square:before { + content: "\f1a2"; +} + +.fa-stumbleupon-circle:before { + content: "\f1a3"; +} + +.fa-stumbleupon:before { + content: "\f1a4"; +} + +.fa-delicious:before { + content: "\f1a5"; +} + +.fa-digg:before { + content: "\f1a6"; +} + +.fa-pied-piper:before { + content: "\f1a7"; +} + +.fa-pied-piper-alt:before { + content: "\f1a8"; +} + +.fa-drupal:before { + content: "\f1a9"; +} + +.fa-joomla:before { + content: "\f1aa"; +} + +.fa-language:before { + content: "\f1ab"; +} + +.fa-fax:before { + content: "\f1ac"; +} + +.fa-building:before { + content: "\f1ad"; +} + +.fa-child:before { + content: "\f1ae"; +} + +.fa-paw:before { + content: "\f1b0"; +} + +.fa-spoon:before { + content: "\f1b1"; +} + +.fa-cube:before { + content: "\f1b2"; +} + +.fa-cubes:before { + content: "\f1b3"; +} + +.fa-behance:before { + content: "\f1b4"; +} + +.fa-behance-square:before { + content: "\f1b5"; +} + +.fa-steam:before { + content: "\f1b6"; +} + +.fa-steam-square:before { + content: "\f1b7"; +} + +.fa-recycle:before { + content: "\f1b8"; +} + +.fa-automobile:before, +.fa-car:before { + content: "\f1b9"; +} + +.fa-cab:before, +.fa-taxi:before { + content: "\f1ba"; +} + +.fa-tree:before { + content: "\f1bb"; +} + +.fa-spotify:before { + content: "\f1bc"; +} + +.fa-deviantart:before { + content: "\f1bd"; +} + +.fa-soundcloud:before { + content: "\f1be"; +} + +.fa-database:before { + content: "\f1c0"; +} + +.fa-file-pdf-o:before { + content: "\f1c1"; +} + +.fa-file-word-o:before { + content: "\f1c2"; +} + +.fa-file-excel-o:before { + content: "\f1c3"; +} + +.fa-file-powerpoint-o:before { + content: "\f1c4"; +} + +.fa-file-photo-o:before, +.fa-file-picture-o:before, +.fa-file-image-o:before { + content: "\f1c5"; +} + +.fa-file-zip-o:before, +.fa-file-archive-o:before { + content: "\f1c6"; +} + +.fa-file-sound-o:before, +.fa-file-audio-o:before { + content: "\f1c7"; +} + +.fa-file-movie-o:before, +.fa-file-video-o:before { + content: "\f1c8"; +} + +.fa-file-code-o:before { + content: "\f1c9"; +} + +.fa-vine:before { + content: "\f1ca"; +} + +.fa-codepen:before { + content: "\f1cb"; +} + +.fa-jsfiddle:before { + content: "\f1cc"; +} + +.fa-life-bouy:before, +.fa-life-buoy:before, +.fa-life-saver:before, +.fa-support:before, +.fa-life-ring:before { + content: "\f1cd"; +} + +.fa-circle-o-notch:before { + content: "\f1ce"; +} + +.fa-ra:before, +.fa-rebel:before { + content: "\f1d0"; +} + +.fa-ge:before, +.fa-empire:before { + content: "\f1d1"; +} + +.fa-git-square:before { + content: "\f1d2"; +} + +.fa-git:before { + content: "\f1d3"; +} + +.fa-hacker-news:before { + content: "\f1d4"; +} + +.fa-tencent-weibo:before { + content: "\f1d5"; +} + +.fa-qq:before { + content: "\f1d6"; +} + +.fa-wechat:before, +.fa-weixin:before { + content: "\f1d7"; +} + +.fa-send:before, +.fa-paper-plane:before { + content: "\f1d8"; +} + +.fa-send-o:before, +.fa-paper-plane-o:before { + content: "\f1d9"; +} + +.fa-history:before { + content: "\f1da"; +} + +.fa-genderless:before, +.fa-circle-thin:before { + content: "\f1db"; +} + +.fa-header:before { + content: "\f1dc"; +} + +.fa-paragraph:before { + content: "\f1dd"; +} + +.fa-sliders:before { + content: "\f1de"; +} + +.fa-share-alt:before { + content: "\f1e0"; +} + +.fa-share-alt-square:before { + content: "\f1e1"; +} + +.fa-bomb:before { + content: "\f1e2"; +} + +.fa-soccer-ball-o:before, +.fa-futbol-o:before { + content: "\f1e3"; +} + +.fa-tty:before { + content: "\f1e4"; +} + +.fa-binoculars:before { + content: "\f1e5"; +} + +.fa-plug:before { + content: "\f1e6"; +} + +.fa-slideshare:before { + content: "\f1e7"; +} + +.fa-twitch:before { + content: "\f1e8"; +} + +.fa-yelp:before { + content: "\f1e9"; +} + +.fa-newspaper-o:before { + content: "\f1ea"; +} + +.fa-wifi:before { + content: "\f1eb"; +} + +.fa-calculator:before { + content: "\f1ec"; +} + +.fa-paypal:before { + content: "\f1ed"; +} + +.fa-google-wallet:before { + content: "\f1ee"; +} + +.fa-cc-visa:before { + content: "\f1f0"; +} + +.fa-cc-mastercard:before { + content: "\f1f1"; +} + +.fa-cc-discover:before { + content: "\f1f2"; +} + +.fa-cc-amex:before { + content: "\f1f3"; +} + +.fa-cc-paypal:before { + content: "\f1f4"; +} + +.fa-cc-stripe:before { + content: "\f1f5"; +} + +.fa-bell-slash:before { + content: "\f1f6"; +} + +.fa-bell-slash-o:before { + content: "\f1f7"; +} + +.fa-trash:before { + content: "\f1f8"; +} + +.fa-copyright:before { + content: "\f1f9"; +} + +.fa-at:before { + content: "\f1fa"; +} + +.fa-eyedropper:before { + content: "\f1fb"; +} + +.fa-paint-brush:before { + content: "\f1fc"; +} + +.fa-birthday-cake:before { + content: "\f1fd"; +} + +.fa-area-chart:before { + content: "\f1fe"; +} + +.fa-pie-chart:before { + content: "\f200"; +} + +.fa-line-chart:before { + content: "\f201"; +} + +.fa-lastfm:before { + content: "\f202"; +} + +.fa-lastfm-square:before { + content: "\f203"; +} + +.fa-toggle-off:before { + content: "\f204"; +} + +.fa-toggle-on:before { + content: "\f205"; +} + +.fa-bicycle:before { + content: "\f206"; +} + +.fa-bus:before { + content: "\f207"; +} + +.fa-ioxhost:before { + content: "\f208"; +} + +.fa-angellist:before { + content: "\f209"; +} + +.fa-cc:before { + content: "\f20a"; +} + +.fa-shekel:before, +.fa-sheqel:before, +.fa-ils:before { + content: "\f20b"; +} + +.fa-meanpath:before { + content: "\f20c"; +} + +.fa-buysellads:before { + content: "\f20d"; +} + +.fa-connectdevelop:before { + content: "\f20e"; +} + +.fa-dashcube:before { + content: "\f210"; +} + +.fa-forumbee:before { + content: "\f211"; +} + +.fa-leanpub:before { + content: "\f212"; +} + +.fa-sellsy:before { + content: "\f213"; +} + +.fa-shirtsinbulk:before { + content: "\f214"; +} + +.fa-simplybuilt:before { + content: "\f215"; +} + +.fa-skyatlas:before { + content: "\f216"; +} + +.fa-cart-plus:before { + content: "\f217"; +} + +.fa-cart-arrow-down:before { + content: "\f218"; +} + +.fa-diamond:before { + content: "\f219"; +} + +.fa-ship:before { + content: "\f21a"; +} + +.fa-user-secret:before { + content: "\f21b"; +} + +.fa-motorcycle:before { + content: "\f21c"; +} + +.fa-street-view:before { + content: "\f21d"; +} + +.fa-heartbeat:before { + content: "\f21e"; +} + +.fa-venus:before { + content: "\f221"; +} + +.fa-mars:before { + content: "\f222"; +} + +.fa-mercury:before { + content: "\f223"; +} + +.fa-transgender:before { + content: "\f224"; +} + +.fa-transgender-alt:before { + content: "\f225"; +} + +.fa-venus-double:before { + content: "\f226"; +} + +.fa-mars-double:before { + content: "\f227"; +} + +.fa-venus-mars:before { + content: "\f228"; +} + +.fa-mars-stroke:before { + content: "\f229"; +} + +.fa-mars-stroke-v:before { + content: "\f22a"; +} + +.fa-mars-stroke-h:before { + content: "\f22b"; +} + +.fa-neuter:before { + content: "\f22c"; +} + +.fa-facebook-official:before { + content: "\f230"; +} + +.fa-pinterest-p:before { + content: "\f231"; +} + +.fa-whatsapp:before { + content: "\f232"; +} + +.fa-server:before { + content: "\f233"; +} + +.fa-user-plus:before { + content: "\f234"; +} + +.fa-user-times:before { + content: "\f235"; +} + +.fa-hotel:before, +.fa-bed:before { + content: "\f236"; +} + +.fa-viacoin:before { + content: "\f237"; +} + +.fa-train:before { + content: "\f238"; +} + +.fa-subway:before { + content: "\f239"; +} + +.fa-medium:before { + content: "\f23a"; +} + +/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ +@font-face { + font-family: 'editormd-logo'; + src: url("../fonts/editormd-logo.eot?-5y8q6h"); + src: url(".../fonts/editormd-logo.eot?#iefix-5y8q6h") format("embedded-opentype"), url("../fonts/editormd-logo.woff?-5y8q6h") format("woff"), url("../fonts/editormd-logo.ttf?-5y8q6h") format("truetype"), url("../fonts/editormd-logo.svg?-5y8q6h#icomoon") format("svg"); + font-weight: normal; + font-style: normal; +} +.editormd-logo, +.editormd-logo-1x, +.editormd-logo-2x, +.editormd-logo-3x, +.editormd-logo-4x, +.editormd-logo-5x, +.editormd-logo-6x, +.editormd-logo-7x, +.editormd-logo-8x { + font-family: 'editormd-logo'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + font-size: inherit; + line-height: 1; + display: inline-block; + text-rendering: auto; + vertical-align: inherit; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.editormd-logo:before, +.editormd-logo-1x:before, +.editormd-logo-2x:before, +.editormd-logo-3x:before, +.editormd-logo-4x:before, +.editormd-logo-5x:before, +.editormd-logo-6x:before, +.editormd-logo-7x:before, +.editormd-logo-8x:before { + content: "\e1987"; + /* + HTML Entity 󡦇 + example: + */ +} + +.editormd-logo-1x { + font-size: 1em; +} + +.editormd-logo-lg { + font-size: 1.2em; +} + +.editormd-logo-2x { + font-size: 2em; +} + +.editormd-logo-3x { + font-size: 3em; +} + +.editormd-logo-4x { + font-size: 4em; +} + +.editormd-logo-5x { + font-size: 5em; +} + +.editormd-logo-6x { + font-size: 6em; +} + +.editormd-logo-7x { + font-size: 7em; +} + +.editormd-logo-8x { + font-size: 8em; +} + +.editormd-logo-color { + color: #2196F3; +} + +/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */ +@font-face { + font-family: octicons-anchor; + src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format("woff"); +} +.markdown-body { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + color: #333; + overflow: hidden; + font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "华文细黑", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "宋体", Heiti, "黑体", sans-serif; + font-size: 16px; + line-height: 1.6; + word-wrap: break-word; +} + +.markdown-body a { + background: transparent; +} + +.markdown-body a:active, +.markdown-body a:hover { + outline: 0; +} + +.markdown-body strong { + font-weight: bold; +} + +.markdown-body h1 { + font-size: 2em; + margin: 0.67em 0; +} + +.markdown-body img { + border: 0; +} + +.markdown-body hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +.markdown-body pre { + overflow: auto; +} + +.markdown-body code, +.markdown-body kbd, +.markdown-body pre { + font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; + font-size: 1em; +} + +.markdown-body input { + color: inherit; + font: inherit; + margin: 0; +} + +.markdown-body html input[disabled] { + cursor: default; +} + +.markdown-body input { + line-height: normal; +} + +.markdown-body input[type="checkbox"] { + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} + +.markdown-body table { + border-collapse: collapse; + border-spacing: 0; +} + +.markdown-body td, +.markdown-body th { + padding: 0; +} + +.markdown-body * { + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.markdown-body input { + font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.markdown-body a { + color: #4183c4; + text-decoration: none; +} + +.markdown-body a:hover, +.markdown-body a:active { + text-decoration: underline; +} + +.markdown-body hr { + height: 0; + margin: 15px 0; + overflow: hidden; + background: transparent; + border: 0; + border-bottom: 1px solid #ddd; +} + +.markdown-body hr:before { + display: table; + content: ""; +} + +.markdown-body hr:after { + display: table; + clear: both; + content: ""; +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + margin-top: 15px; + margin-bottom: 15px; + line-height: 1.1; +} + +.markdown-body h1 { + font-size: 30px; +} + +.markdown-body h2 { + font-size: 21px; +} + +.markdown-body h3 { + font-size: 16px; +} + +.markdown-body h4 { + font-size: 14px; +} + +.markdown-body h5 { + font-size: 12px; +} + +.markdown-body h6 { + font-size: 11px; +} + +.markdown-body blockquote { + margin: 0; +} + +.markdown-body ul, +.markdown-body ol { + padding: 0; + margin-top: 0; + margin-bottom: 0; +} + +.markdown-body ol ol, +.markdown-body ul ol { + list-style-type: lower-roman; +} + +.markdown-body ul ul ol, +.markdown-body ul ol ol, +.markdown-body ol ul ol, +.markdown-body ol ol ol { + list-style-type: lower-alpha; +} + +.markdown-body dd { + margin-left: 0; +} + +.markdown-body code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 12px; +} + +.markdown-body pre { + margin-top: 0; + margin-bottom: 0; + font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; +} + +.markdown-body .octicon { + font: normal normal 16px octicons-anchor; + line-height: 1; + display: inline-block; + text-decoration: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.markdown-body .octicon-link:before { + content: '\f05c'; +} + +.markdown-body > *:first-child { + margin-top: 0 !important; +} + +.markdown-body > *:last-child { + margin-bottom: 0 !important; +} + +.markdown-body .anchor { + position: absolute; + top: 0; + left: 0; + display: block; + padding-right: 6px; + padding-left: 30px; + margin-left: -30px; +} + +.markdown-body .anchor:focus { + outline: none; +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + position: relative; + margin-top: 1em; + margin-bottom: 16px; + font-weight: bold; + line-height: 1.4; +} + +.markdown-body h1 .octicon-link, +.markdown-body h2 .octicon-link, +.markdown-body h3 .octicon-link, +.markdown-body h4 .octicon-link, +.markdown-body h5 .octicon-link, +.markdown-body h6 .octicon-link { + display: none; + color: #000; + vertical-align: middle; +} + +.markdown-body h1:hover .anchor, +.markdown-body h2:hover .anchor, +.markdown-body h3:hover .anchor, +.markdown-body h4:hover .anchor, +.markdown-body h5:hover .anchor, +.markdown-body h6:hover .anchor { + padding-left: 8px; + margin-left: -30px; + text-decoration: none; +} + +.markdown-body h1:hover .anchor .octicon-link, +.markdown-body h2:hover .anchor .octicon-link, +.markdown-body h3:hover .anchor .octicon-link, +.markdown-body h4:hover .anchor .octicon-link, +.markdown-body h5:hover .anchor .octicon-link, +.markdown-body h6:hover .anchor .octicon-link { + display: inline-block; +} + +.markdown-body h1 { + padding-bottom: 0.3em; + font-size: 2.25em; + line-height: 1.2; + border-bottom: 1px solid #eee; +} + +.markdown-body h1 .anchor { + line-height: 1; +} + +.markdown-body h2 { + padding-bottom: 0.3em; + font-size: 1.75em; + line-height: 1.225; + border-bottom: 1px solid #eee; +} + +.markdown-body h2 .anchor { + line-height: 1; +} + +.markdown-body h3 { + font-size: 1.5em; + line-height: 1.43; +} + +.markdown-body h3 .anchor { + line-height: 1.2; +} + +.markdown-body h4 { + font-size: 1.25em; +} + +.markdown-body h4 .anchor { + line-height: 1.2; +} + +.markdown-body h5 { + font-size: 1em; +} + +.markdown-body h5 .anchor { + line-height: 1.1; +} + +.markdown-body h6 { + font-size: 1em; + color: #777; +} + +.markdown-body h6 .anchor { + line-height: 1.1; +} + +.markdown-body p, +.markdown-body blockquote, +.markdown-body ul, +.markdown-body ol, +.markdown-body dl, +.markdown-body table, +.markdown-body pre { + margin-top: 0; + margin-bottom: 16px; +} + +/* +.markdown-body hr { + height: 4px; + padding: 0; + margin: 16px 0; + background-color: #e7e7e7; + border: 0 none; +}*/ +.markdown-body ul, +.markdown-body ol { + padding-left: 2em; +} + +.markdown-body ul ul, +.markdown-body ul ol, +.markdown-body ol ol, +.markdown-body ol ul { + margin-top: 0; + margin-bottom: 0; +} + +.markdown-body li > p { + margin-top: 16px; +} + +.markdown-body dl { + padding: 0; +} + +.markdown-body dl dt { + padding: 0; + margin-top: 16px; + font-size: 1em; + font-style: italic; + font-weight: bold; +} + +.markdown-body dl dd { + padding: 0 16px; + margin-bottom: 16px; +} + +.markdown-body blockquote { + padding: 0 15px; + color: #777; + border-left: 4px solid #ddd; +} + +.markdown-body blockquote > :first-child { + margin-top: 0; +} + +.markdown-body blockquote > :last-child { + margin-bottom: 0; +} + +.markdown-body table { + display: block; + width: 100%; + overflow: auto; + word-break: normal; + word-break: keep-all; +} + +.markdown-body table th { + font-weight: bold; +} + +.markdown-body table th, +.markdown-body table td { + padding: 6px 13px; + border: 1px solid #ddd; +} + +.markdown-body table tr { + background-color: #fff; + border-top: 1px solid #ccc; +} + +.markdown-body table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +.markdown-body img { + max-width: 100%; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.markdown-body code { + padding: 0; + padding-top: 0.2em; + padding-bottom: 0.2em; + margin: 0; + font-size: 85%; + background-color: rgba(0, 0, 0, 0.04); + border-radius: 3px; +} + +.markdown-body code:before, +.markdown-body code:after { + letter-spacing: -0.2em; + content: "\00a0"; +} + +.markdown-body pre > code { + padding: 0; + margin: 0; + font-size: 100%; + word-break: normal; + white-space: pre; + background: transparent; + border: 0; +} + +.markdown-body .highlight { + margin-bottom: 16px; +} + +.markdown-body .highlight pre, +.markdown-body pre { + padding: 16px; + overflow: auto; + font-size: 85%; + line-height: 1.45; + background-color: #f7f7f7; + border-radius: 3px; +} + +.markdown-body .highlight pre { + margin-bottom: 0; + word-break: normal; +} + +.markdown-body pre { + word-wrap: normal; +} + +.markdown-body pre code { + display: inline; + max-width: initial; + padding: 0; + margin: 0; + overflow: initial; + line-height: inherit; + word-wrap: normal; + background-color: transparent; + border: 0; +} + +.markdown-body pre code:before, +.markdown-body pre code:after { + content: normal; +} + +.markdown-body kbd { + display: inline-block; + padding: 3px 5px; + font-size: 11px; + line-height: 10px; + color: #555; + vertical-align: middle; + background-color: #fcfcfc; + border: solid 1px #ccc; + border-bottom-color: #bbb; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #bbb; +} + +.markdown-body .pl-c { + color: #969896; +} + +.markdown-body .pl-c1, +.markdown-body .pl-mdh, +.markdown-body .pl-mm, +.markdown-body .pl-mp, +.markdown-body .pl-mr, +.markdown-body .pl-s1 .pl-v, +.markdown-body .pl-s3, +.markdown-body .pl-sc, +.markdown-body .pl-sv { + color: #0086b3; +} + +.markdown-body .pl-e, +.markdown-body .pl-en { + color: #795da3; +} + +.markdown-body .pl-s1 .pl-s2, +.markdown-body .pl-smi, +.markdown-body .pl-smp, +.markdown-body .pl-stj, +.markdown-body .pl-vo, +.markdown-body .pl-vpf { + color: #333; +} + +.markdown-body .pl-ent { + color: #63a35c; +} + +.markdown-body .pl-k, +.markdown-body .pl-s, +.markdown-body .pl-st { + color: #a71d5d; +} + +.markdown-body .pl-pds, +.markdown-body .pl-s1, +.markdown-body .pl-s1 .pl-pse .pl-s2, +.markdown-body .pl-sr, +.markdown-body .pl-sr .pl-cce, +.markdown-body .pl-sr .pl-sra, +.markdown-body .pl-sr .pl-sre, +.markdown-body .pl-src { + color: #df5000; +} + +.markdown-body .pl-mo, +.markdown-body .pl-v { + color: #1d3e81; +} + +.markdown-body .pl-id { + color: #b52a1d; +} + +.markdown-body .pl-ii { + background-color: #b52a1d; + color: #f8f8f8; +} + +.markdown-body .pl-sr .pl-cce { + color: #63a35c; + font-weight: bold; +} + +.markdown-body .pl-ml { + color: #693a17; +} + +.markdown-body .pl-mh, +.markdown-body .pl-mh .pl-en, +.markdown-body .pl-ms { + color: #1d3e81; + font-weight: bold; +} + +.markdown-body .pl-mq { + color: #008080; +} + +.markdown-body .pl-mi { + color: #333; + font-style: italic; +} + +.markdown-body .pl-mb { + color: #333; + font-weight: bold; +} + +.markdown-body .pl-md, +.markdown-body .pl-mdhf { + background-color: #ffecec; + color: #bd2c00; +} + +.markdown-body .pl-mdht, +.markdown-body .pl-mi1 { + background-color: #eaffea; + color: #55a532; +} + +.markdown-body .pl-mdr { + color: #795da3; + font-weight: bold; +} + +.markdown-body kbd { + display: inline-block; + padding: 3px 5px; + font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 10px; + color: #555; + vertical-align: middle; + background-color: #fcfcfc; + border: solid 1px #ccc; + border-bottom-color: #bbb; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #bbb; +} + +.markdown-body .task-list-item { + list-style-type: none; +} + +.markdown-body .task-list-item + .task-list-item { + margin-top: 3px; +} + +.markdown-body .task-list-item input { + float: left; + margin: 0.3em 0 0.25em -1.6em; + vertical-align: middle; +} + +.markdown-body :checked + .radio-label { + z-index: 1; + position: relative; + border-color: #4183c4; +} + +.editormd-preview-container, .editormd-html-preview { + text-align: left; + font-size: 14px; + line-height: 1.6; + padding: 20px; + overflow: auto; + width: 100%; + background-color: #fff; +} +.editormd-preview-container blockquote, .editormd-html-preview blockquote { + color: #666; + border-left: 4px solid #ddd; + padding-left: 20px; + margin-left: 0; + font-size: 14px; + font-style: italic; +} +.editormd-preview-container p code, .editormd-html-preview p code { + margin-left: 5px; + margin-right: 4px; +} +.editormd-preview-container abbr, .editormd-html-preview abbr { + background: #ffffdd; +} +.editormd-preview-container hr, .editormd-html-preview hr { + height: 1px; + border: none; + border-top: 1px solid #ddd; + background: none; +} +.editormd-preview-container code, .editormd-html-preview code { + border: 1px solid #ddd; + background: #f6f6f6; + padding: 3px; + border-radius: 3px; + font-size: 14px; +} +.editormd-preview-container pre, .editormd-html-preview pre { + border: 1px solid #ddd; + background: #f6f6f6; + padding: 10px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; +} +.editormd-preview-container pre code, .editormd-html-preview pre code { + padding: 0; +} +.editormd-preview-container pre, .editormd-preview-container code, .editormd-preview-container kbd, .editormd-html-preview pre, .editormd-html-preview code, .editormd-html-preview kbd { + font-family: "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; +} +.editormd-preview-container table thead tr, .editormd-html-preview table thead tr { + background-color: #F8F8F8; +} +.editormd-preview-container p.editormd-tex, .editormd-html-preview p.editormd-tex { + text-align: center; +} +.editormd-preview-container span.editormd-tex, .editormd-html-preview span.editormd-tex { + margin: 0 5px; +} +.editormd-preview-container .emoji, .editormd-html-preview .emoji { + width: 24px; + height: 24px; +} +.editormd-preview-container .katex, .editormd-html-preview .katex { + font-size: 1.4em; +} +.editormd-preview-container .sequence-diagram, .editormd-preview-container .flowchart, .editormd-html-preview .sequence-diagram, .editormd-html-preview .flowchart { + margin: 0 auto; + text-align: center; +} +.editormd-preview-container .sequence-diagram svg, .editormd-preview-container .flowchart svg, .editormd-html-preview .sequence-diagram svg, .editormd-html-preview .flowchart svg { + margin: 0 auto; +} +.editormd-preview-container .sequence-diagram text, .editormd-preview-container .flowchart text, .editormd-html-preview .sequence-diagram text, .editormd-html-preview .flowchart text { + font-size: 15px !important; + font-family: "YaHei Consolas Hybrid", Consolas, "Microsoft YaHei", "Malgun Gothic", "Segoe UI", Helvetica, Arial !important; +} + +/*! Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +.pln { + color: #000; +} + +/* plain text */ +@media screen { + .str { + color: #080; + } + + /* string content */ + .kwd { + color: #008; + } + + /* a keyword */ + .com { + color: #800; + } + + /* a comment */ + .typ { + color: #606; + } + + /* a type name */ + .lit { + color: #066; + } + + /* a literal value */ + /* punctuation, lisp open bracket, lisp close bracket */ + .pun, .opn, .clo { + color: #660; + } + + .tag { + color: #008; + } + + /* a markup tag name */ + .atn { + color: #606; + } + + /* a markup attribute name */ + .atv { + color: #080; + } + + /* a markup attribute value */ + .dec, .var { + color: #606; + } + + /* a declaration; a variable name */ + .fun { + color: red; + } + + /* a function name */ +} +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; + } + + .kwd { + color: #006; + font-weight: bold; + } + + .com { + color: #600; + font-style: italic; + } + + .typ { + color: #404; + font-weight: bold; + } + + .lit { + color: #044; + } + + .pun, .opn, .clo { + color: #440; + } + + .tag { + color: #006; + font-weight: bold; + } + + .atn { + color: #404; + } + + .atv { + color: #060; + } +} +/* Put a border around prettyprinted code snippets. */ +pre.prettyprint { + padding: 2px; + border: 1px solid #888; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L5, +li.L6, +li.L7, +li.L8 { + list-style-type: none; +} + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + background: #eee; +} + +.editormd-preview-container pre.prettyprint, .editormd-html-preview pre.prettyprint { + padding: 10px; + border: 1px solid #ddd; + white-space: pre-wrap; + word-wrap: break-word; +} +.editormd-preview-container ol.linenums, .editormd-html-preview ol.linenums { + color: #999; + padding-left: 2.5em; +} +.editormd-preview-container ol.linenums li, .editormd-html-preview ol.linenums li { + list-style-type: decimal; +} +.editormd-preview-container ol.linenums li code, .editormd-html-preview ol.linenums li code { + border: none; + background: none; + padding: 0; +} + +.editormd-preview-container .editormd-toc-menu, .editormd-html-preview .editormd-toc-menu { + margin: 8px 0 12px 0; + display: inline-block; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc, .editormd-html-preview .editormd-toc-menu > .markdown-toc { + position: relative; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + border: 1px solid #ddd; + display: inline-block; + font-size: 1em; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul { + width: 160%; + min-width: 180px; + position: absolute; + left: -1px; + top: -2px; + z-index: 100; + padding: 0 10px 10px; + display: none; + background: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Webkit browsers */ + -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Firefox */ + -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* IE9 */ + -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Opera(Old) */ + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* IE9+, News */ +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li ul { + width: 100%; + min-width: 180px; + border: 1px solid #ddd; + display: none; + background: #fff; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li a, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li a { + color: #666; + padding: 6px 10px; + display: block; + -webkit-transition: background-color 500ms ease-out; + /* Safari, Chrome */ + -moz-transition: background-color 500ms ease-out; + /* Firefox 4.0~16.0 */ + transition: background-color 500ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li a:hover, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li a:hover { + background-color: #f6f6f6; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc li, .editormd-html-preview .editormd-toc-menu > .markdown-toc li { + position: relative; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul { + position: absolute; + top: 32px; + left: 10%; + display: none; + -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Webkit browsers */ + -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Firefox */ + -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* IE9 */ + -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Opera(Old) */ + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* IE9+, News */ +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:after, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:after { + pointer-events: pointer-events; + position: absolute; + left: 15px; + top: -6px; + display: block; + content: ""; + width: 0; + height: 0; + border: 6px solid transparent; + border-width: 0 6px 6px; + z-index: 10; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:before { + border-bottom-color: #ccc; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:after, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:after { + border-bottom-color: #ffffff; + top: -5px; +} +.editormd-preview-container .editormd-toc-menu ul, .editormd-html-preview .editormd-toc-menu ul { + list-style: none; +} +.editormd-preview-container .editormd-toc-menu a, .editormd-html-preview .editormd-toc-menu a { + text-decoration: none; +} +.editormd-preview-container .editormd-toc-menu h1, .editormd-html-preview .editormd-toc-menu h1 { + font-size: 16px; + padding: 5px 0 10px 10px; + line-height: 1; + border-bottom: 1px solid #eee; +} +.editormd-preview-container .editormd-toc-menu h1 .fa, .editormd-html-preview .editormd-toc-menu h1 .fa { + padding-left: 10px; +} +.editormd-preview-container .editormd-toc-menu .toc-menu-btn, .editormd-html-preview .editormd-toc-menu .toc-menu-btn { + color: #666; + min-width: 180px; + padding: 5px 10px; + border-radius: 4px; + display: inline-block; + -webkit-transition: background-color 500ms ease-out; + /* Safari, Chrome */ + -moz-transition: background-color 500ms ease-out; + /* Firefox 4.0~16.0 */ + transition: background-color 500ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover, .editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover { + background-color: #f6f6f6; +} +.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa, .editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa { + float: right; + padding: 3px 0 0 10px; + font-size: 1.3em; +} + +.markdown-body .editormd-toc-menu ul { + padding-left: 0; +} +.markdown-body .highlight pre, .markdown-body pre { + line-height: 1.6; +} + +hr.editormd-page-break { + border: 1px dotted #ccc; + font-size: 0; + height: 2px; +} + +@media only print { + hr.editormd-page-break { + background: none; + border: none; + height: 0; + } +} +.editormd-html-preview textarea { + display: none; +} +.editormd-html-preview hr.editormd-page-break { + background: none; + border: none; + height: 0; +} + +.editormd-preview-close-btn { + color: #fff; + padding: 4px 6px; + font-size: 18px; + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + -ms-border-radius: 500px; + -o-border-radius: 500px; + border-radius: 500px; + display: none; + background-color: #ccc; + position: absolute; + top: 25px; + right: 35px; + z-index: 19; + -webkit-transition: background-color 300ms ease-out; + /* Safari, Chrome */ + -moz-transition: background-color 300ms ease-out; + /* Firefox 4.0~16.0 */ + transition: background-color 300ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-preview-close-btn:hover { + background-color: #999; +} + +.editormd-preview-active { + width: 100%; + padding: 40px; +} + +/* Preview dark theme */ +.editormd-preview-theme-dark { + color: #777; + background: #2C2827; +} +.editormd-preview-theme-dark .editormd-preview-container { + color: #888; + background-color: #2C2827; +} +.editormd-preview-theme-dark .editormd-preview-container pre.prettyprint { + border: none; +} +.editormd-preview-theme-dark .editormd-preview-container blockquote { + color: #555; + padding: 0.5em; + background: #222; + border-color: #333; +} +.editormd-preview-theme-dark .editormd-preview-container abbr { + color: #fff; + padding: 1px 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + background: #ff9900; +} +.editormd-preview-theme-dark .editormd-preview-container code { + color: #fff; + border: none; + padding: 1px 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + background: #5A9600; +} +.editormd-preview-theme-dark .editormd-preview-container table { + border: none; +} +.editormd-preview-theme-dark .editormd-preview-container .fa-emoji { + color: #B4BF42; +} +.editormd-preview-theme-dark .editormd-preview-container .katex { + color: #FEC93F; +} +.editormd-preview-theme-dark .editormd-toc-menu > .markdown-toc { + background: #fff; + border: none; +} +.editormd-preview-theme-dark .editormd-toc-menu > .markdown-toc h1 { + border-color: #ddd; +} +.editormd-preview-theme-dark .markdown-body h1, .editormd-preview-theme-dark .markdown-body h2, .editormd-preview-theme-dark .markdown-body hr { + border-color: #222; +} +.editormd-preview-theme-dark pre { + color: #999; + background-color: #111; + background-color: rgba(0, 0, 0, 0.4); + /* plain text */ +} +.editormd-preview-theme-dark pre .pln { + color: #999; +} +.editormd-preview-theme-dark li.L1, .editormd-preview-theme-dark li.L3, .editormd-preview-theme-dark li.L5, .editormd-preview-theme-dark li.L7, .editormd-preview-theme-dark li.L9 { + background: none; +} +.editormd-preview-theme-dark [class*=editormd-logo] { + color: #2196F3; +} +.editormd-preview-theme-dark .sequence-diagram text { + fill: #fff; +} +.editormd-preview-theme-dark .sequence-diagram rect, .editormd-preview-theme-dark .sequence-diagram path { + color: #fff; + fill: #64D1CB; + stroke: #64D1CB; +} +.editormd-preview-theme-dark .flowchart rect, .editormd-preview-theme-dark .flowchart path { + stroke: #A6C6FF; +} +.editormd-preview-theme-dark .flowchart rect { + fill: #A6C6FF; +} +.editormd-preview-theme-dark .flowchart text { + fill: #5879B4; +} + +@media screen { + .editormd-preview-theme-dark { + /* string content */ + /* a keyword */ + /* a comment */ + /* a type name */ + /* a literal value */ + /* punctuation, lisp open bracket, lisp close bracket */ + /* a markup tag name */ + /* a markup attribute name */ + /* a markup attribute value */ + /* a declaration; a variable name */ + /* a function name */ + } + .editormd-preview-theme-dark .str { + color: #080; + } + .editormd-preview-theme-dark .kwd { + color: #ff9900; + } + .editormd-preview-theme-dark .com { + color: #444444; + } + .editormd-preview-theme-dark .typ { + color: #606; + } + .editormd-preview-theme-dark .lit { + color: #066; + } + .editormd-preview-theme-dark .pun, .editormd-preview-theme-dark .opn, .editormd-preview-theme-dark .clo { + color: #660; + } + .editormd-preview-theme-dark .tag { + color: #ff9900; + } + .editormd-preview-theme-dark .atn { + color: #6C95F5; + } + .editormd-preview-theme-dark .atv { + color: #080; + } + .editormd-preview-theme-dark .dec, .editormd-preview-theme-dark .var { + color: #008BA7; + } + .editormd-preview-theme-dark .fun { + color: red; + } +} +.editormd-onlyread .editormd-toolbar { + display: none; +} +.editormd-onlyread .CodeMirror { + margin-top: 0; +} +.editormd-onlyread .editormd-preview { + top: 0; +} + +.editormd-fullscreen { + position: fixed; + top: 0; + left: 0; + border: none; + margin: 0 auto; +} + +/* Editor.md Dark theme */ +.editormd-theme-dark { + border-color: #1a1a17; +} +.editormd-theme-dark .editormd-toolbar { + background: #1A1A17; + border-color: #1a1a17; +} +.editormd-theme-dark .editormd-menu > li > a { + color: #777; + border-color: #1a1a17; +} +.editormd-theme-dark .editormd-menu > li > a:hover, .editormd-theme-dark .editormd-menu > li > a.active { + border-color: #333; + background: #333; +} +.editormd-theme-dark .editormd-menu > li.divider { + border-right: 1px solid #111; +} +.editormd-theme-dark .CodeMirror { + border-right: 1px solid rgba(0, 0, 0, 0.1); +} diff --git a/static/editor.md/css/editormd.logo.css b/static/editor.md/css/editormd.logo.css new file mode 100644 index 0000000..5f901bf --- /dev/null +++ b/static/editor.md/css/editormd.logo.css @@ -0,0 +1,98 @@ +/* + * Editor.md + * + * @file editormd.logo.css + * @version v1.5.0 + * @description Open source online markdown editor. + * @license MIT License + * @author Pandao + * {@link https://github.com/pandao/editor.md} + * @updateTime 2015-06-09 + */ + +/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ +@font-face { + font-family: 'editormd-logo'; + src: url("../fonts/editormd-logo.eot?-5y8q6h"); + src: url(".../fonts/editormd-logo.eot?#iefix-5y8q6h") format("embedded-opentype"), url("../fonts/editormd-logo.woff?-5y8q6h") format("woff"), url("../fonts/editormd-logo.ttf?-5y8q6h") format("truetype"), url("../fonts/editormd-logo.svg?-5y8q6h#icomoon") format("svg"); + font-weight: normal; + font-style: normal; +} +.editormd-logo, +.editormd-logo-1x, +.editormd-logo-2x, +.editormd-logo-3x, +.editormd-logo-4x, +.editormd-logo-5x, +.editormd-logo-6x, +.editormd-logo-7x, +.editormd-logo-8x { + font-family: 'editormd-logo'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + font-size: inherit; + line-height: 1; + display: inline-block; + text-rendering: auto; + vertical-align: inherit; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.editormd-logo:before, +.editormd-logo-1x:before, +.editormd-logo-2x:before, +.editormd-logo-3x:before, +.editormd-logo-4x:before, +.editormd-logo-5x:before, +.editormd-logo-6x:before, +.editormd-logo-7x:before, +.editormd-logo-8x:before { + content: "\e1987"; + /* + HTML Entity 󡦇 + example: + */ +} + +.editormd-logo-1x { + font-size: 1em; +} + +.editormd-logo-lg { + font-size: 1.2em; +} + +.editormd-logo-2x { + font-size: 2em; +} + +.editormd-logo-3x { + font-size: 3em; +} + +.editormd-logo-4x { + font-size: 4em; +} + +.editormd-logo-5x { + font-size: 5em; +} + +.editormd-logo-6x { + font-size: 6em; +} + +.editormd-logo-7x { + font-size: 7em; +} + +.editormd-logo-8x { + font-size: 8em; +} + +.editormd-logo-color { + color: #2196F3; +} diff --git a/static/editor.md/css/editormd.logo.min.css b/static/editor.md/css/editormd.logo.min.css new file mode 100644 index 0000000..d169978 --- /dev/null +++ b/static/editor.md/css/editormd.logo.min.css @@ -0,0 +1,2 @@ +/*! Editor.md v1.5.0 | editormd.logo.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ +/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h)format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h)format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h)format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon)format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3} \ No newline at end of file diff --git a/static/editor.md/css/editormd.min.css b/static/editor.md/css/editormd.min.css new file mode 100644 index 0000000..05abb50 --- /dev/null +++ b/static/editor.md/css/editormd.min.css @@ -0,0 +1,5 @@ +/*! Editor.md v1.5.0 | editormd.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ +@charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */.fa-ul,.markdown-body .task-list-item,li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}.editormd-form br,.markdown-body hr:after{clear:both}.editormd{width:90%;height:640px;margin:0 auto 15px;text-align:left;overflow:hidden;position:relative;border:1px solid #ddd;font-family:"Meiryo UI","Microsoft YaHei","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif}.editormd *,.editormd :after,.editormd :before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd a{text-decoration:none}.editormd img{border:none;vertical-align:middle}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea,.editormd>textarea{width:0;height:0;outline:0;resize:none}.editormd .editormd-html-textarea,.editormd .editormd-markdown-textarea{display:none}.editormd button,.editormd input[type=text],.editormd input[type=button],.editormd input[type=submit],.editormd select,.editormd textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.editormd ::-webkit-scrollbar{height:10px;width:7px;background:rgba(0,0,0,.1)}.editormd ::-webkit-scrollbar:hover{background:rgba(0,0,0,.2)}.editormd ::-webkit-scrollbar-thumb{background:rgba(0,0,0,.3);-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px}.editormd ::-webkit-scrollbar-thumb:hover{-webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-ms-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);-o-box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);box-shadow:inset 1px 1px 1px rgba(0,0,0,.25);background-color:rgba(0,0,0,.4)}.editormd-user-unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.editormd-toolbar{width:100%;min-height:37px;background:#fff;display:none;position:absolute;top:0;left:0;z-index:10;border-bottom:1px solid #ddd}.editormd-toolbar-container{padding:0 8px;min-height:35px;-o-user-select:none;user-select:none}.editormd-toolbar-container,.markdown-body .octicon{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.editormd-menu,.markdown-body ol,.markdown-body td,.markdown-body th,.markdown-body ul{padding:0}.editormd-menu{margin:0;list-style:none}.editormd-menu>li{margin:0;padding:5px 1px;display:inline-block;position:relative}.editormd-menu>li.divider{display:inline-block;text-indent:-9999px;margin:0 5px;height:65%;border-right:1px solid #ddd}.editormd-menu>li>a{outline:0;color:#666;display:inline-block;min-width:24px;font-size:16px;text-decoration:none;text-align:center;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;border:1px solid #fff;transition:all 300ms ease-out}.editormd-dropdown-menu>li>a:hover,.editormd-menu>li>a{-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out}.editormd-menu>li>a.active,.editormd-menu>li>a:hover{border:1px solid #ddd;background:#eee}.editormd-menu>li>a>.fa{text-align:center;display:block;padding:5px}.editormd-menu>li>a>.editormd-bold{padding:5px 2px;display:inline-block;font-weight:700}.editormd-menu>li:hover .editormd-dropdown-menu{display:block}.editormd-menu>li+li>a{margin-left:3px}.editormd-dropdown-menu{display:none;background:#fff;border:1px solid #ddd;width:148px;list-style:none;position:absolute;top:33px;left:0;z-index:100;-webkit-box-shadow:1px 2px 6px rgba(0,0,0,.15);-moz-box-shadow:1px 2px 6px rgba(0,0,0,.15);-ms-box-shadow:1px 2px 6px rgba(0,0,0,.15);-o-box-shadow:1px 2px 6px rgba(0,0,0,.15);box-shadow:1px 2px 6px rgba(0,0,0,.15)}.editormd-dropdown-menu:after,.editormd-dropdown-menu:before{width:0;height:0;display:block;content:"";position:absolute;top:-11px;left:8px;border:5px solid transparent}.editormd-dropdown-menu:before{border-bottom-color:#ccc}.editormd-dropdown-menu:after{border-bottom-color:#fff;top:-10px}.editormd-dropdown-menu>li>a{color:#666;display:block;text-decoration:none;padding:8px 10px}.editormd-dropdown-menu>li>a:hover{background:#f6f6f6;transition:all 300ms ease-out}.editormd-dropdown-menu>li+li{border-top:1px solid #ddd}.editormd-container{margin:0;width:100%;height:100%;overflow:hidden;padding:35px 0 0;position:relative;background:#fff;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.editormd-dialog{color:#666;position:fixed;z-index:99999;display:none;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 10px rgba(0,0,0,.3);-moz-box-shadow:0 0 10px rgba(0,0,0,.3);-ms-box-shadow:0 0 10px rgba(0,0,0,.3);-o-box-shadow:0 0 10px rgba(0,0,0,.3);box-shadow:0 0 10px rgba(0,0,0,.3);background:#fff;font-size:14px}.editormd-dialog-container{position:relative;padding:20px;line-height:1.4}.editormd-dialog-container h1{font-size:24px;margin-bottom:10px}.editormd-dialog-container h1 .fa{color:#2C7EEA;padding-right:5px}.editormd-dialog-container h1 small{padding-left:5px;font-weight:400;font-size:12px;color:#999}.editormd-dialog-container select{color:#999;padding:3px 8px;border:1px solid #ddd}.editormd-dialog-close{position:absolute;top:12px;right:15px;font-size:18px;color:#ccc;-webkit-transition:color 300ms ease-out;-moz-transition:color 300ms ease-out;transition:color 300ms ease-out}.editormd-dialog-close:hover{color:#999}.editormd-dialog-header{padding:11px 20px;border-bottom:1px solid #eee;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-header:hover{background:#f6f6f6}.editormd-dialog-title{font-size:14px}.editormd-dialog-footer{padding:10px 0 0;text-align:right}.editormd-dialog-info{width:420px}.editormd-dialog-info h1{font-weight:400}.editormd-dialog-info .editormd-dialog-container{padding:20px 25px 25px}.editormd-dialog-info .editormd-dialog-close{top:10px;right:10px}.editormd-dialog-info .hover-link:hover,.editormd-dialog-info p>a{color:#2196F3}.editormd-dialog-info .hover-link{color:#666}.editormd-dialog-info a .fa-external-link{display:none}.editormd-dialog-info a:hover{color:#2196F3}.editormd-dialog-info a:hover .fa-external-link{display:inline-block}.editormd-container-mask,.editormd-dialog-mask,.editormd-mask{display:none;width:100%;height:100%;position:absolute;top:0;left:0}.editormd-dialog-mask-bg,.editormd-mask{background:#fff;opacity:.5;filter:alpha(opacity=50)}.editormd-mask{position:fixed;background:#000;opacity:.2;filter:alpha(opacity=20);z-index:99998}.editormd-container-mask,.editormd-dialog-mask-con{background:url(../images/loading.gif)center center no-repeat;-webkit-background-size:32px 32px;-moz-background-size:32px 32px;-o-background-size:32px 32px;background-size:32px 32px}.editormd-container-mask{z-index:20;display:block;background-color:#fff}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@2x.gif)}}@media only screen and (-webkit-min-device-pixel-ratio:3),only screen and (min-device-pixel-ratio:3){.editormd-container-mask,.editormd-dialog-mask-con{background-image:url(../images/loading@3x.gif)}}.editormd-code-block-dialog textarea,.editormd-preformatted-text-dialog textarea{width:100%;height:400px;margin-bottom:6px;overflow:auto;border:1px solid #eee;background:#fff;padding:15px;resize:none}.editormd-code-toolbar{color:#999;font-size:14px;margin:-5px 0 10px}.editormd-grid-table{width:99%;display:table;border:1px solid #ddd;border-collapse:collapse}.editormd-grid-table-row{width:100%;display:table-row}.editormd-grid-table-row a{font-size:1.4em;width:5%;height:36px;color:#999;text-align:center;display:table-cell;vertical-align:middle;border:1px solid #ddd;text-decoration:none;-webkit-transition:background-color 300ms ease-out,color 100ms ease-in;-moz-transition:background-color 300ms ease-out,color 100ms ease-in;transition:background-color 300ms ease-out,color 100ms ease-in}.editormd-grid-table-row a.selected{color:#666;background-color:#eee}.editormd-grid-table-row a:hover{color:#777;background-color:#f6f6f6}.editormd-tab-head{list-style:none;border-bottom:1px solid #ddd}.editormd-tab-head li{display:inline-block}.editormd-tab-head li a{color:#999;display:block;padding:6px 12px 5px;text-align:center;text-decoration:none;margin-bottom:-1px;border:1px solid #ddd;-webkit-border-top-left-radius:3px;-moz-border-top-left-radius:3px;-ms-border-top-left-radius:3px;-o-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-moz-border-top-right-radius:3px;-ms-border-top-right-radius:3px;-o-border-top-right-radius:3px;border-top-right-radius:3px;background:#f6f6f6;-webkit-transition:all 300ms ease-out;-moz-transition:all 300ms ease-out;transition:all 300ms ease-out}.editormd-tab-head li a:hover{color:#666;background:#eee}.editormd-tab-head li.active a{color:#666;background:#fff;border-bottom-color:#fff}.editormd-tab-head li+li{margin-left:3px}.editormd-tab-box{padding:20px 0}.editormd-form{color:#666}.editormd-form label{float:left;display:block;width:75px;text-align:left;padding:7px 0 15px 5px;margin:0 0 2px;font-weight:400}.editormd-form iframe{display:none}.editormd-form input:focus{outline:0}.editormd-form input[type=text],.editormd-form input[type=number]{color:#999;padding:8px;border:1px solid #ddd}.editormd-form input[type=number]{width:40px;display:inline-block;padding:6px 8px}.editormd-form input[type=text]{display:inline-block;width:264px}.editormd-form .fa-btns{display:inline-block}.editormd-form .fa-btns a{color:#999;padding:7px 10px 0 0;display:inline-block;text-decoration:none;text-align:center}.editormd-form .fa-btns .fa{font-size:1.3em}.editormd-form .fa-btns label{float:none;display:inline-block;width:auto;text-align:left;padding:0 0 0 5px;cursor:pointer}.fa-fw,.fa-li{text-align:center}.editormd-dialog-container .editormd-btn,.editormd-dialog-container button,.editormd-dialog-container input[type=submit],.editormd-dialog-footer .editormd-btn,.editormd-dialog-footer button,.editormd-dialog-footer input[type=submit],.editormd-form .editormd-btn,.editormd-form button,.editormd-form input[type=submit]{color:#666;min-width:75px;cursor:pointer;background:#fff;padding:7px 10px;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;-webkit-transition:background 300ms ease-out;-moz-transition:background 300ms ease-out;transition:background 300ms ease-out}.editormd-dialog-container .editormd-btn:hover,.editormd-dialog-container button:hover,.editormd-dialog-container input[type=submit]:hover,.editormd-dialog-footer .editormd-btn:hover,.editormd-dialog-footer button:hover,.editormd-dialog-footer input[type=submit]:hover,.editormd-form .editormd-btn:hover,.editormd-form button:hover,.editormd-form input[type=submit]:hover{background:#eee}.editormd-dialog-container .editormd-btn+.editormd-btn,.editormd-dialog-footer .editormd-btn+.editormd-btn,.editormd-form .editormd-btn+.editormd-btn{margin-left:8px}.editormd-file-input{width:75px;height:32px;margin-left:8px;position:relative;display:inline-block}.editormd-file-input input[type=file]{width:75px;height:32px;opacity:0;cursor:pointer;background:#000;display:inline-block;position:absolute;top:0;right:0}.editormd-file-input input[type=file]::-webkit-file-upload-button{visibility:hidden}.editormd-file-input:hover input[type=submit]{background:#eee}.editormd .CodeMirror,.editormd-preview{display:inline-block;width:50%;height:100%;vertical-align:top;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:0}.editormd-preview{position:absolute;top:35px;right:0;overflow:auto;line-height:1.6;display:none;background:#fff}.fa,.fa-stack{display:inline-block}.editormd .CodeMirror{z-index:10;float:left;border-right:1px solid #ddd;font-size:14px;font-family:"YaHei Consolas Hybrid",Consolas,"微软雅黑","Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,Monaco,courier,monospace;line-height:1.6;margin-top:35px}.editormd .CodeMirror pre{font-size:14px;padding:0 12px}.editormd .CodeMirror-linenumbers{padding:0 5px}.editormd .CodeMirror-focused .CodeMirror-selected,.editormd .CodeMirror-selected{background:#70B7FF}.editormd .CodeMirror,.editormd .CodeMirror-scroll,.editormd .editormd-preview{-webkit-overflow-scrolling:touch}.editormd .styled-background{background-color:#ff7}.editormd .CodeMirror-focused .cm-matchhighlight{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAFklEQVQI12NgYGBgkKzc8x9CMDAwAAAmhwSbidEoSQAAAABJRU5ErkJggg==);background-position:bottom;background-repeat:repeat-x}.editormd .CodeMirror-empty.CodeMirror-focused{outline:0}.editormd .CodeMirror pre.CodeMirror-placeholder{color:#999}.editormd .cm-trailingspace{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAACCAYAAAB/qH1jAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QUXCToH00Y1UgAAACFJREFUCNdjPMDBUc/AwNDAAAFMTAwMDA0OP34wQgX/AQBYgwYEx4f9lQAAAABJRU5ErkJggg==);background-position:bottom left;background-repeat:repeat-x}.editormd .cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=)right no-repeat}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 *//*! + * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.3.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0)format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.3.0)format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.3.0)format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.3.0)format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular)format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0,0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em}.fa-ul{padding-left:0;margin-left:2.14285714em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before,.fa-genderless:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h)format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h)format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h)format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon)format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markdown-body hr:after,.markdown-body hr:before{content:"";display:table}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3}/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */@font-face{font-family:octicons-anchor;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==)format("woff")}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;font-family:"Microsoft YaHei",Helvetica,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif;font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body strong{font-weight:700}.markdown-body h1{margin:.67em 0}.markdown-body img{border:0}.markdown-body hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.markdown-body input{color:inherit;margin:0;line-height:normal;font:13px/1.4 Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.markdown-body html input[disabled]{cursor:default}.markdown-body input[type=checkbox]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}.markdown-body *{-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body a{background:0 0;color:#4183c4;text-decoration:none}.markdown-body a:active,.markdown-body a:hover{outline:0;text-decoration:underline}.markdown-body hr{margin:15px 0;overflow:hidden;background:0 0;border:0;border-bottom:1px solid #ddd}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.markdown-body blockquote{margin:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body pre{font:12px Consolas,"Liberation Mono",Menlo,Courier,monospace;word-wrap:normal}.markdown-body .octicon{font:normal normal 16px octicons-anchor;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none}.markdown-body .octicon-link:before{content:'\f05c'}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .anchor{position:absolute;top:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.markdown-body .anchor:focus{outline:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{display:none;color:#000;vertical-align:middle}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{padding-left:8px;margin-left:-30px;text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{display:inline-block}.markdown-body h1{font-size:2.25em;line-height:1.2}.markdown-body h1 .anchor{line-height:1}.markdown-body h2{font-size:1.75em;line-height:1.225}.markdown-body h2 .anchor{line-height:1}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h3 .anchor,.markdown-body h4 .anchor{line-height:1.2}.markdown-body h4{font-size:1.25em}.markdown-body h5 .anchor,.markdown-body h6 .anchor{line-height:1.1}.markdown-body h5{font-size:1em}.markdown-body h6{font-size:1em;color:#777}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before{content:normal}.markdown-body .pl-c{color:#969896}.markdown-body .pl-c1,.markdown-body .pl-mdh,.markdown-body .pl-mm,.markdown-body .pl-mp,.markdown-body .pl-mr,.markdown-body .pl-s1 .pl-v,.markdown-body .pl-s3,.markdown-body .pl-sc,.markdown-body .pl-sv{color:#0086b3}.markdown-body .pl-e,.markdown-body .pl-en{color:#795da3}.markdown-body .pl-s1 .pl-s2,.markdown-body .pl-smi,.markdown-body .pl-smp,.markdown-body .pl-stj,.markdown-body .pl-vo,.markdown-body .pl-vpf{color:#333}.markdown-body .pl-ent{color:#63a35c}.markdown-body .pl-k,.markdown-body .pl-s,.markdown-body .pl-st{color:#a71d5d}.markdown-body .pl-pds,.markdown-body .pl-s1,.markdown-body .pl-s1 .pl-pse .pl-s2,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-src{color:#df5000}.markdown-body .pl-mo,.markdown-body .pl-v{color:#1d3e81}.markdown-body .pl-id{color:#b52a1d}.markdown-body .pl-ii{background-color:#b52a1d;color:#f8f8f8}.markdown-body .pl-sr .pl-cce{color:#63a35c;font-weight:700}.markdown-body .pl-ml{color:#693a17}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{color:#1d3e81;font-weight:700}.markdown-body .pl-mq{color:teal}.markdown-body .pl-mi{color:#333;font-style:italic}.markdown-body .pl-mb{color:#333;font-weight:700}.markdown-body .pl-md,.markdown-body .pl-mdhf{background-color:#ffecec;color:#bd2c00}.markdown-body .pl-mdht,.markdown-body .pl-mi1{background-color:#eaffea;color:#55a532}.markdown-body .pl-mdr{color:#795da3;font-weight:700}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px Consolas,"Liberation Mono",Menlo,Courier,monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:1px solid #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{float:left;margin:.3em 0 .25em -1.6em;vertical-align:middle}.markdown-body :checked+.radio-label{z-index:1;position:relative;border-color:#4183c4}.editormd-html-preview,.editormd-preview-container{text-align:left;font-size:14px;line-height:1.6;padding:20px;overflow:auto;width:100%;background-color:#fff}.editormd-html-preview blockquote,.editormd-preview-container blockquote{color:#666;border-left:4px solid #ddd;padding-left:20px;margin-left:0;font-size:14px;font-style:italic}.editormd-html-preview p code,.editormd-preview-container p code{margin-left:5px;margin-right:4px}.editormd-html-preview abbr,.editormd-preview-container abbr{background:#ffd}.editormd-html-preview hr,.editormd-preview-container hr{height:1px;border:none;border-top:1px solid #ddd;background:0 0}.editormd-html-preview code,.editormd-preview-container code{border:1px solid #ddd;background:#f6f6f6;padding:3px;border-radius:3px;font-size:14px}.editormd-html-preview pre,.editormd-preview-container pre{border:1px solid #ddd;background:#f6f6f6;padding:10px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}.editormd-html-preview pre code,.editormd-preview-container pre code{padding:0}.editormd-html-preview code,.editormd-html-preview kbd,.editormd-html-preview pre,.editormd-preview-container code,.editormd-preview-container kbd,.editormd-preview-container pre{font-family:"YaHei Consolas Hybrid",Consolas,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,monospace,monospace}.editormd-html-preview table thead tr,.editormd-preview-container table thead tr{background-color:#F8F8F8}.editormd-html-preview p.editormd-tex,.editormd-preview-container p.editormd-tex{text-align:center}.editormd-html-preview span.editormd-tex,.editormd-preview-container span.editormd-tex{margin:0 5px}.editormd-html-preview .emoji,.editormd-preview-container .emoji{width:24px;height:24px}.editormd-html-preview .katex,.editormd-preview-container .katex{font-size:1.4em}.editormd-html-preview .flowchart,.editormd-html-preview .sequence-diagram,.editormd-preview-container .flowchart,.editormd-preview-container .sequence-diagram{margin:0 auto;text-align:center}.editormd-html-preview .flowchart svg,.editormd-html-preview .sequence-diagram svg,.editormd-preview-container .flowchart svg,.editormd-preview-container .sequence-diagram svg{margin:0 auto}.editormd-html-preview .flowchart text,.editormd-html-preview .sequence-diagram text,.editormd-preview-container .flowchart text,.editormd-preview-container .sequence-diagram text{font-size:15px!important;font-family:"YaHei Consolas Hybrid",Consolas,"Microsoft YaHei","Malgun Gothic","Segoe UI",Helvetica,Arial!important}/*! Pretty printing styles. Used with prettify.js. */.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.clo,.opn,.pun{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.kwd,.tag,.typ{font-weight:700}.str{color:#060}.kwd{color:#006}.com{color:#600;font-style:italic}.typ{color:#404}.lit{color:#044}.clo,.opn,.pun{color:#440}.tag{color:#006}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}.editormd-html-preview pre.prettyprint,.editormd-preview-container pre.prettyprint{padding:10px;border:1px solid #ddd;white-space:pre-wrap;word-wrap:break-word}.editormd-html-preview ol.linenums,.editormd-preview-container ol.linenums{color:#999;padding-left:2.5em}.editormd-html-preview ol.linenums li,.editormd-preview-container ol.linenums li{list-style-type:decimal}.editormd-html-preview ol.linenums li code,.editormd-preview-container ol.linenums li code{border:none;background:0 0;padding:0}.editormd-html-preview .editormd-toc-menu,.editormd-preview-container .editormd-toc-menu{margin:8px 0 12px;display:inline-block}.editormd-html-preview .editormd-toc-menu>.markdown-toc,.editormd-preview-container .editormd-toc-menu>.markdown-toc{position:relative;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #ddd;display:inline-block;font-size:1em}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul{width:160%;min-width:180px;position:absolute;left:-1px;top:-2px;z-index:100;padding:0 10px 10px;display:none;background:#fff;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li ul{width:100%;min-width:180px;border:1px solid #ddd;display:none;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover,.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a:hover,.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a:hover{background-color:#f6f6f6}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a{color:#666;padding:6px 10px;display:block;-webkit-transition:background-color 500ms ease-out;-moz-transition:background-color 500ms ease-out;transition:background-color 500ms ease-out}.editormd-html-preview .editormd-toc-menu>.markdown-toc li,.editormd-preview-container .editormd-toc-menu>.markdown-toc li{position:relative}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul{position:absolute;top:32px;left:10%;display:none;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{pointer-events:pointer-events;position:absolute;left:15px;top:-6px;display:block;content:"";width:0;height:0;border:6px solid transparent;border-width:0 6px 6px;z-index:10}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{border-bottom-color:#ccc}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after{border-bottom-color:#fff;top:-5px}.editormd-html-preview .editormd-toc-menu ul,.editormd-preview-container .editormd-toc-menu ul{list-style:none}.editormd-html-preview .editormd-toc-menu a,.editormd-preview-container .editormd-toc-menu a{text-decoration:none}.editormd-html-preview .editormd-toc-menu h1,.editormd-preview-container .editormd-toc-menu h1{font-size:16px;padding:5px 0 10px 10px;line-height:1;border-bottom:1px solid #eee}.editormd-html-preview .editormd-toc-menu h1 .fa,.editormd-preview-container .editormd-toc-menu h1 .fa{padding-left:10px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn,.editormd-preview-container .editormd-toc-menu .toc-menu-btn{color:#666;min-width:180px;padding:5px 10px;border-radius:4px;display:inline-block;-webkit-transition:background-color 500ms ease-out;-moz-transition:background-color 500ms ease-out;transition:background-color 500ms ease-out}.editormd-html-preview textarea,.editormd-onlyread .editormd-toolbar{display:none}.editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa,.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa{float:right;padding:3px 0 0 10px;font-size:1.3em}.markdown-body .editormd-toc-menu ul{padding-left:0}.markdown-body .highlight pre,.markdown-body pre{line-height:1.6}hr.editormd-page-break{border:1px dotted #ccc;font-size:0;height:2px}@media only print{hr.editormd-page-break{background:0 0;border:none;height:0}}.editormd-html-preview hr.editormd-page-break{background:0 0;border:none;height:0}.editormd-preview-close-btn{color:#fff;padding:4px 6px;font-size:18px;-webkit-border-radius:500px;-moz-border-radius:500px;-ms-border-radius:500px;-o-border-radius:500px;border-radius:500px;display:none;background-color:#ccc;position:absolute;top:25px;right:35px;z-index:19;-webkit-transition:background-color 300ms ease-out;-moz-transition:background-color 300ms ease-out;transition:background-color 300ms ease-out}.editormd-preview-close-btn:hover{background-color:#999}.editormd-preview-active{width:100%;padding:40px}.editormd-preview-theme-dark{color:#777;background:#2C2827}.editormd-preview-theme-dark .editormd-preview-container{color:#888;background-color:#2C2827}.editormd-preview-theme-dark .editormd-preview-container pre.prettyprint{border:none}.editormd-preview-theme-dark .editormd-preview-container blockquote{color:#555;padding:.5em;background:#222;border-color:#333}.editormd-preview-theme-dark .editormd-preview-container abbr{color:#fff;padding:1px 3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;background:#f90}.editormd-preview-theme-dark .editormd-preview-container code{color:#fff;border:none;padding:1px 3px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px;background:#5A9600}.editormd-preview-theme-dark .editormd-preview-container table{border:none}.editormd-preview-theme-dark .editormd-preview-container .fa-emoji{color:#B4BF42}.editormd-preview-theme-dark .editormd-preview-container .katex{color:#FEC93F}.editormd-preview-theme-dark .editormd-toc-menu>.markdown-toc{background:#fff;border:none}.editormd-preview-theme-dark .editormd-toc-menu>.markdown-toc h1{border-color:#ddd}.editormd-preview-theme-dark .markdown-body h1,.editormd-preview-theme-dark .markdown-body h2,.editormd-preview-theme-dark .markdown-body hr{border-color:#222}.editormd-preview-theme-dark pre{color:#999;background-color:#111;background-color:rgba(0,0,0,.4)}.editormd-preview-theme-dark pre .pln{color:#999}.editormd-preview-theme-dark li.L1,.editormd-preview-theme-dark li.L3,.editormd-preview-theme-dark li.L5,.editormd-preview-theme-dark li.L7,.editormd-preview-theme-dark li.L9{background:0 0}.editormd-preview-theme-dark [class*=editormd-logo]{color:#2196F3}.editormd-preview-theme-dark .sequence-diagram text{fill:#fff}.editormd-preview-theme-dark .sequence-diagram path,.editormd-preview-theme-dark .sequence-diagram rect{color:#fff;fill:#64D1CB;stroke:#64D1CB}.editormd-preview-theme-dark .flowchart path,.editormd-preview-theme-dark .flowchart rect{stroke:#A6C6FF}.editormd-preview-theme-dark .flowchart rect{fill:#A6C6FF}.editormd-preview-theme-dark .flowchart text{fill:#5879B4}@media screen{.editormd-preview-theme-dark .str{color:#080}.editormd-preview-theme-dark .kwd{color:#f90}.editormd-preview-theme-dark .com{color:#444}.editormd-preview-theme-dark .typ{color:#606}.editormd-preview-theme-dark .lit{color:#066}.editormd-preview-theme-dark .clo,.editormd-preview-theme-dark .opn,.editormd-preview-theme-dark .pun{color:#660}.editormd-preview-theme-dark .tag{color:#f90}.editormd-preview-theme-dark .atn{color:#6C95F5}.editormd-preview-theme-dark .atv{color:#080}.editormd-preview-theme-dark .dec,.editormd-preview-theme-dark .var{color:#008BA7}.editormd-preview-theme-dark .fun{color:red}}.editormd-onlyread .CodeMirror{margin-top:0}.editormd-onlyread .editormd-preview{top:0}.editormd-fullscreen{position:fixed;top:0;left:0;border:none;margin:0 auto}.editormd-theme-dark{border-color:#1a1a17}.editormd-theme-dark .editormd-toolbar{background:#1A1A17;border-color:#1a1a17}.editormd-theme-dark .editormd-menu>li>a{color:#777;border-color:#1a1a17}.editormd-theme-dark .editormd-menu>li>a.active,.editormd-theme-dark .editormd-menu>li>a:hover{border-color:#333;background:#333}.editormd-theme-dark .editormd-menu>li.divider{border-right:1px solid #111}.editormd-theme-dark .CodeMirror{border-right:1px solid rgba(0,0,0,.1)} \ No newline at end of file diff --git a/static/editor.md/css/editormd.preview.css b/static/editor.md/css/editormd.preview.css new file mode 100644 index 0000000..6030330 --- /dev/null +++ b/static/editor.md/css/editormd.preview.css @@ -0,0 +1,3554 @@ +/* + * Editor.md + * + * @file editormd.preview.css + * @version v1.5.0 + * @description Open source online markdown editor. + * @license MIT License + * @author Pandao + * {@link https://github.com/pandao/editor.md} + * @updateTime 2015-06-09 + */ + +@charset "UTF-8"; +/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ +/*! + * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'FontAwesome'; + src: url("../fonts/fontawesome-webfont.eot?v=4.3.0"); + src: url("../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0") format("embedded-opentype"), url("../fonts/fontawesome-webfont.woff2?v=4.3.0") format("woff2"), url("../fonts/fontawesome-webfont.woff?v=4.3.0") format("woff"), url("../fonts/fontawesome-webfont.ttf?v=4.3.0") format("truetype"), url("../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular") format("svg"); + font-weight: normal; + font-style: normal; +} +.fa { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + transform: translate(0, 0); +} + +/* makes the font 33% larger relative to the icon container */ +.fa-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} + +.fa-2x { + font-size: 2em; +} + +.fa-3x { + font-size: 3em; +} + +.fa-4x { + font-size: 4em; +} + +.fa-5x { + font-size: 5em; +} + +.fa-fw { + width: 1.28571429em; + text-align: center; +} + +.fa-ul { + padding-left: 0; + margin-left: 2.14285714em; + list-style-type: none; +} + +.fa-ul > li { + position: relative; +} + +.fa-li { + position: absolute; + left: -2.14285714em; + width: 2.14285714em; + top: 0.14285714em; + text-align: center; +} + +.fa-li.fa-lg { + left: -1.85714286em; +} + +.fa-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.fa.pull-left { + margin-right: .3em; +} + +.fa.pull-right { + margin-left: .3em; +} + +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} + +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); +} + +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +.fa-rotate-90 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} + +.fa-rotate-180 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.fa-rotate-270 { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); +} + +.fa-flip-horizontal { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); +} + +.fa-flip-vertical { + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); +} + +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + filter: none; +} + +.fa-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} + +.fa-stack-1x, +.fa-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} + +.fa-stack-1x { + line-height: inherit; +} + +.fa-stack-2x { + font-size: 2em; +} + +.fa-inverse { + color: #ffffff; +} + +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.fa-glass:before { + content: "\f000"; +} + +.fa-music:before { + content: "\f001"; +} + +.fa-search:before { + content: "\f002"; +} + +.fa-envelope-o:before { + content: "\f003"; +} + +.fa-heart:before { + content: "\f004"; +} + +.fa-star:before { + content: "\f005"; +} + +.fa-star-o:before { + content: "\f006"; +} + +.fa-user:before { + content: "\f007"; +} + +.fa-film:before { + content: "\f008"; +} + +.fa-th-large:before { + content: "\f009"; +} + +.fa-th:before { + content: "\f00a"; +} + +.fa-th-list:before { + content: "\f00b"; +} + +.fa-check:before { + content: "\f00c"; +} + +.fa-remove:before, +.fa-close:before, +.fa-times:before { + content: "\f00d"; +} + +.fa-search-plus:before { + content: "\f00e"; +} + +.fa-search-minus:before { + content: "\f010"; +} + +.fa-power-off:before { + content: "\f011"; +} + +.fa-signal:before { + content: "\f012"; +} + +.fa-gear:before, +.fa-cog:before { + content: "\f013"; +} + +.fa-trash-o:before { + content: "\f014"; +} + +.fa-home:before { + content: "\f015"; +} + +.fa-file-o:before { + content: "\f016"; +} + +.fa-clock-o:before { + content: "\f017"; +} + +.fa-road:before { + content: "\f018"; +} + +.fa-download:before { + content: "\f019"; +} + +.fa-arrow-circle-o-down:before { + content: "\f01a"; +} + +.fa-arrow-circle-o-up:before { + content: "\f01b"; +} + +.fa-inbox:before { + content: "\f01c"; +} + +.fa-play-circle-o:before { + content: "\f01d"; +} + +.fa-rotate-right:before, +.fa-repeat:before { + content: "\f01e"; +} + +.fa-refresh:before { + content: "\f021"; +} + +.fa-list-alt:before { + content: "\f022"; +} + +.fa-lock:before { + content: "\f023"; +} + +.fa-flag:before { + content: "\f024"; +} + +.fa-headphones:before { + content: "\f025"; +} + +.fa-volume-off:before { + content: "\f026"; +} + +.fa-volume-down:before { + content: "\f027"; +} + +.fa-volume-up:before { + content: "\f028"; +} + +.fa-qrcode:before { + content: "\f029"; +} + +.fa-barcode:before { + content: "\f02a"; +} + +.fa-tag:before { + content: "\f02b"; +} + +.fa-tags:before { + content: "\f02c"; +} + +.fa-book:before { + content: "\f02d"; +} + +.fa-bookmark:before { + content: "\f02e"; +} + +.fa-print:before { + content: "\f02f"; +} + +.fa-camera:before { + content: "\f030"; +} + +.fa-font:before { + content: "\f031"; +} + +.fa-bold:before { + content: "\f032"; +} + +.fa-italic:before { + content: "\f033"; +} + +.fa-text-height:before { + content: "\f034"; +} + +.fa-text-width:before { + content: "\f035"; +} + +.fa-align-left:before { + content: "\f036"; +} + +.fa-align-center:before { + content: "\f037"; +} + +.fa-align-right:before { + content: "\f038"; +} + +.fa-align-justify:before { + content: "\f039"; +} + +.fa-list:before { + content: "\f03a"; +} + +.fa-dedent:before, +.fa-outdent:before { + content: "\f03b"; +} + +.fa-indent:before { + content: "\f03c"; +} + +.fa-video-camera:before { + content: "\f03d"; +} + +.fa-photo:before, +.fa-image:before, +.fa-picture-o:before { + content: "\f03e"; +} + +.fa-pencil:before { + content: "\f040"; +} + +.fa-map-marker:before { + content: "\f041"; +} + +.fa-adjust:before { + content: "\f042"; +} + +.fa-tint:before { + content: "\f043"; +} + +.fa-edit:before, +.fa-pencil-square-o:before { + content: "\f044"; +} + +.fa-share-square-o:before { + content: "\f045"; +} + +.fa-check-square-o:before { + content: "\f046"; +} + +.fa-arrows:before { + content: "\f047"; +} + +.fa-step-backward:before { + content: "\f048"; +} + +.fa-fast-backward:before { + content: "\f049"; +} + +.fa-backward:before { + content: "\f04a"; +} + +.fa-play:before { + content: "\f04b"; +} + +.fa-pause:before { + content: "\f04c"; +} + +.fa-stop:before { + content: "\f04d"; +} + +.fa-forward:before { + content: "\f04e"; +} + +.fa-fast-forward:before { + content: "\f050"; +} + +.fa-step-forward:before { + content: "\f051"; +} + +.fa-eject:before { + content: "\f052"; +} + +.fa-chevron-left:before { + content: "\f053"; +} + +.fa-chevron-right:before { + content: "\f054"; +} + +.fa-plus-circle:before { + content: "\f055"; +} + +.fa-minus-circle:before { + content: "\f056"; +} + +.fa-times-circle:before { + content: "\f057"; +} + +.fa-check-circle:before { + content: "\f058"; +} + +.fa-question-circle:before { + content: "\f059"; +} + +.fa-info-circle:before { + content: "\f05a"; +} + +.fa-crosshairs:before { + content: "\f05b"; +} + +.fa-times-circle-o:before { + content: "\f05c"; +} + +.fa-check-circle-o:before { + content: "\f05d"; +} + +.fa-ban:before { + content: "\f05e"; +} + +.fa-arrow-left:before { + content: "\f060"; +} + +.fa-arrow-right:before { + content: "\f061"; +} + +.fa-arrow-up:before { + content: "\f062"; +} + +.fa-arrow-down:before { + content: "\f063"; +} + +.fa-mail-forward:before, +.fa-share:before { + content: "\f064"; +} + +.fa-expand:before { + content: "\f065"; +} + +.fa-compress:before { + content: "\f066"; +} + +.fa-plus:before { + content: "\f067"; +} + +.fa-minus:before { + content: "\f068"; +} + +.fa-asterisk:before { + content: "\f069"; +} + +.fa-exclamation-circle:before { + content: "\f06a"; +} + +.fa-gift:before { + content: "\f06b"; +} + +.fa-leaf:before { + content: "\f06c"; +} + +.fa-fire:before { + content: "\f06d"; +} + +.fa-eye:before { + content: "\f06e"; +} + +.fa-eye-slash:before { + content: "\f070"; +} + +.fa-warning:before, +.fa-exclamation-triangle:before { + content: "\f071"; +} + +.fa-plane:before { + content: "\f072"; +} + +.fa-calendar:before { + content: "\f073"; +} + +.fa-random:before { + content: "\f074"; +} + +.fa-comment:before { + content: "\f075"; +} + +.fa-magnet:before { + content: "\f076"; +} + +.fa-chevron-up:before { + content: "\f077"; +} + +.fa-chevron-down:before { + content: "\f078"; +} + +.fa-retweet:before { + content: "\f079"; +} + +.fa-shopping-cart:before { + content: "\f07a"; +} + +.fa-folder:before { + content: "\f07b"; +} + +.fa-folder-open:before { + content: "\f07c"; +} + +.fa-arrows-v:before { + content: "\f07d"; +} + +.fa-arrows-h:before { + content: "\f07e"; +} + +.fa-bar-chart-o:before, +.fa-bar-chart:before { + content: "\f080"; +} + +.fa-twitter-square:before { + content: "\f081"; +} + +.fa-facebook-square:before { + content: "\f082"; +} + +.fa-camera-retro:before { + content: "\f083"; +} + +.fa-key:before { + content: "\f084"; +} + +.fa-gears:before, +.fa-cogs:before { + content: "\f085"; +} + +.fa-comments:before { + content: "\f086"; +} + +.fa-thumbs-o-up:before { + content: "\f087"; +} + +.fa-thumbs-o-down:before { + content: "\f088"; +} + +.fa-star-half:before { + content: "\f089"; +} + +.fa-heart-o:before { + content: "\f08a"; +} + +.fa-sign-out:before { + content: "\f08b"; +} + +.fa-linkedin-square:before { + content: "\f08c"; +} + +.fa-thumb-tack:before { + content: "\f08d"; +} + +.fa-external-link:before { + content: "\f08e"; +} + +.fa-sign-in:before { + content: "\f090"; +} + +.fa-trophy:before { + content: "\f091"; +} + +.fa-github-square:before { + content: "\f092"; +} + +.fa-upload:before { + content: "\f093"; +} + +.fa-lemon-o:before { + content: "\f094"; +} + +.fa-phone:before { + content: "\f095"; +} + +.fa-square-o:before { + content: "\f096"; +} + +.fa-bookmark-o:before { + content: "\f097"; +} + +.fa-phone-square:before { + content: "\f098"; +} + +.fa-twitter:before { + content: "\f099"; +} + +.fa-facebook-f:before, +.fa-facebook:before { + content: "\f09a"; +} + +.fa-github:before { + content: "\f09b"; +} + +.fa-unlock:before { + content: "\f09c"; +} + +.fa-credit-card:before { + content: "\f09d"; +} + +.fa-rss:before { + content: "\f09e"; +} + +.fa-hdd-o:before { + content: "\f0a0"; +} + +.fa-bullhorn:before { + content: "\f0a1"; +} + +.fa-bell:before { + content: "\f0f3"; +} + +.fa-certificate:before { + content: "\f0a3"; +} + +.fa-hand-o-right:before { + content: "\f0a4"; +} + +.fa-hand-o-left:before { + content: "\f0a5"; +} + +.fa-hand-o-up:before { + content: "\f0a6"; +} + +.fa-hand-o-down:before { + content: "\f0a7"; +} + +.fa-arrow-circle-left:before { + content: "\f0a8"; +} + +.fa-arrow-circle-right:before { + content: "\f0a9"; +} + +.fa-arrow-circle-up:before { + content: "\f0aa"; +} + +.fa-arrow-circle-down:before { + content: "\f0ab"; +} + +.fa-globe:before { + content: "\f0ac"; +} + +.fa-wrench:before { + content: "\f0ad"; +} + +.fa-tasks:before { + content: "\f0ae"; +} + +.fa-filter:before { + content: "\f0b0"; +} + +.fa-briefcase:before { + content: "\f0b1"; +} + +.fa-arrows-alt:before { + content: "\f0b2"; +} + +.fa-group:before, +.fa-users:before { + content: "\f0c0"; +} + +.fa-chain:before, +.fa-link:before { + content: "\f0c1"; +} + +.fa-cloud:before { + content: "\f0c2"; +} + +.fa-flask:before { + content: "\f0c3"; +} + +.fa-cut:before, +.fa-scissors:before { + content: "\f0c4"; +} + +.fa-copy:before, +.fa-files-o:before { + content: "\f0c5"; +} + +.fa-paperclip:before { + content: "\f0c6"; +} + +.fa-save:before, +.fa-floppy-o:before { + content: "\f0c7"; +} + +.fa-square:before { + content: "\f0c8"; +} + +.fa-navicon:before, +.fa-reorder:before, +.fa-bars:before { + content: "\f0c9"; +} + +.fa-list-ul:before { + content: "\f0ca"; +} + +.fa-list-ol:before { + content: "\f0cb"; +} + +.fa-strikethrough:before { + content: "\f0cc"; +} + +.fa-underline:before { + content: "\f0cd"; +} + +.fa-table:before { + content: "\f0ce"; +} + +.fa-magic:before { + content: "\f0d0"; +} + +.fa-truck:before { + content: "\f0d1"; +} + +.fa-pinterest:before { + content: "\f0d2"; +} + +.fa-pinterest-square:before { + content: "\f0d3"; +} + +.fa-google-plus-square:before { + content: "\f0d4"; +} + +.fa-google-plus:before { + content: "\f0d5"; +} + +.fa-money:before { + content: "\f0d6"; +} + +.fa-caret-down:before { + content: "\f0d7"; +} + +.fa-caret-up:before { + content: "\f0d8"; +} + +.fa-caret-left:before { + content: "\f0d9"; +} + +.fa-caret-right:before { + content: "\f0da"; +} + +.fa-columns:before { + content: "\f0db"; +} + +.fa-unsorted:before, +.fa-sort:before { + content: "\f0dc"; +} + +.fa-sort-down:before, +.fa-sort-desc:before { + content: "\f0dd"; +} + +.fa-sort-up:before, +.fa-sort-asc:before { + content: "\f0de"; +} + +.fa-envelope:before { + content: "\f0e0"; +} + +.fa-linkedin:before { + content: "\f0e1"; +} + +.fa-rotate-left:before, +.fa-undo:before { + content: "\f0e2"; +} + +.fa-legal:before, +.fa-gavel:before { + content: "\f0e3"; +} + +.fa-dashboard:before, +.fa-tachometer:before { + content: "\f0e4"; +} + +.fa-comment-o:before { + content: "\f0e5"; +} + +.fa-comments-o:before { + content: "\f0e6"; +} + +.fa-flash:before, +.fa-bolt:before { + content: "\f0e7"; +} + +.fa-sitemap:before { + content: "\f0e8"; +} + +.fa-umbrella:before { + content: "\f0e9"; +} + +.fa-paste:before, +.fa-clipboard:before { + content: "\f0ea"; +} + +.fa-lightbulb-o:before { + content: "\f0eb"; +} + +.fa-exchange:before { + content: "\f0ec"; +} + +.fa-cloud-download:before { + content: "\f0ed"; +} + +.fa-cloud-upload:before { + content: "\f0ee"; +} + +.fa-user-md:before { + content: "\f0f0"; +} + +.fa-stethoscope:before { + content: "\f0f1"; +} + +.fa-suitcase:before { + content: "\f0f2"; +} + +.fa-bell-o:before { + content: "\f0a2"; +} + +.fa-coffee:before { + content: "\f0f4"; +} + +.fa-cutlery:before { + content: "\f0f5"; +} + +.fa-file-text-o:before { + content: "\f0f6"; +} + +.fa-building-o:before { + content: "\f0f7"; +} + +.fa-hospital-o:before { + content: "\f0f8"; +} + +.fa-ambulance:before { + content: "\f0f9"; +} + +.fa-medkit:before { + content: "\f0fa"; +} + +.fa-fighter-jet:before { + content: "\f0fb"; +} + +.fa-beer:before { + content: "\f0fc"; +} + +.fa-h-square:before { + content: "\f0fd"; +} + +.fa-plus-square:before { + content: "\f0fe"; +} + +.fa-angle-double-left:before { + content: "\f100"; +} + +.fa-angle-double-right:before { + content: "\f101"; +} + +.fa-angle-double-up:before { + content: "\f102"; +} + +.fa-angle-double-down:before { + content: "\f103"; +} + +.fa-angle-left:before { + content: "\f104"; +} + +.fa-angle-right:before { + content: "\f105"; +} + +.fa-angle-up:before { + content: "\f106"; +} + +.fa-angle-down:before { + content: "\f107"; +} + +.fa-desktop:before { + content: "\f108"; +} + +.fa-laptop:before { + content: "\f109"; +} + +.fa-tablet:before { + content: "\f10a"; +} + +.fa-mobile-phone:before, +.fa-mobile:before { + content: "\f10b"; +} + +.fa-circle-o:before { + content: "\f10c"; +} + +.fa-quote-left:before { + content: "\f10d"; +} + +.fa-quote-right:before { + content: "\f10e"; +} + +.fa-spinner:before { + content: "\f110"; +} + +.fa-circle:before { + content: "\f111"; +} + +.fa-mail-reply:before, +.fa-reply:before { + content: "\f112"; +} + +.fa-github-alt:before { + content: "\f113"; +} + +.fa-folder-o:before { + content: "\f114"; +} + +.fa-folder-open-o:before { + content: "\f115"; +} + +.fa-smile-o:before { + content: "\f118"; +} + +.fa-frown-o:before { + content: "\f119"; +} + +.fa-meh-o:before { + content: "\f11a"; +} + +.fa-gamepad:before { + content: "\f11b"; +} + +.fa-keyboard-o:before { + content: "\f11c"; +} + +.fa-flag-o:before { + content: "\f11d"; +} + +.fa-flag-checkered:before { + content: "\f11e"; +} + +.fa-terminal:before { + content: "\f120"; +} + +.fa-code:before { + content: "\f121"; +} + +.fa-mail-reply-all:before, +.fa-reply-all:before { + content: "\f122"; +} + +.fa-star-half-empty:before, +.fa-star-half-full:before, +.fa-star-half-o:before { + content: "\f123"; +} + +.fa-location-arrow:before { + content: "\f124"; +} + +.fa-crop:before { + content: "\f125"; +} + +.fa-code-fork:before { + content: "\f126"; +} + +.fa-unlink:before, +.fa-chain-broken:before { + content: "\f127"; +} + +.fa-question:before { + content: "\f128"; +} + +.fa-info:before { + content: "\f129"; +} + +.fa-exclamation:before { + content: "\f12a"; +} + +.fa-superscript:before { + content: "\f12b"; +} + +.fa-subscript:before { + content: "\f12c"; +} + +.fa-eraser:before { + content: "\f12d"; +} + +.fa-puzzle-piece:before { + content: "\f12e"; +} + +.fa-microphone:before { + content: "\f130"; +} + +.fa-microphone-slash:before { + content: "\f131"; +} + +.fa-shield:before { + content: "\f132"; +} + +.fa-calendar-o:before { + content: "\f133"; +} + +.fa-fire-extinguisher:before { + content: "\f134"; +} + +.fa-rocket:before { + content: "\f135"; +} + +.fa-maxcdn:before { + content: "\f136"; +} + +.fa-chevron-circle-left:before { + content: "\f137"; +} + +.fa-chevron-circle-right:before { + content: "\f138"; +} + +.fa-chevron-circle-up:before { + content: "\f139"; +} + +.fa-chevron-circle-down:before { + content: "\f13a"; +} + +.fa-html5:before { + content: "\f13b"; +} + +.fa-css3:before { + content: "\f13c"; +} + +.fa-anchor:before { + content: "\f13d"; +} + +.fa-unlock-alt:before { + content: "\f13e"; +} + +.fa-bullseye:before { + content: "\f140"; +} + +.fa-ellipsis-h:before { + content: "\f141"; +} + +.fa-ellipsis-v:before { + content: "\f142"; +} + +.fa-rss-square:before { + content: "\f143"; +} + +.fa-play-circle:before { + content: "\f144"; +} + +.fa-ticket:before { + content: "\f145"; +} + +.fa-minus-square:before { + content: "\f146"; +} + +.fa-minus-square-o:before { + content: "\f147"; +} + +.fa-level-up:before { + content: "\f148"; +} + +.fa-level-down:before { + content: "\f149"; +} + +.fa-check-square:before { + content: "\f14a"; +} + +.fa-pencil-square:before { + content: "\f14b"; +} + +.fa-external-link-square:before { + content: "\f14c"; +} + +.fa-share-square:before { + content: "\f14d"; +} + +.fa-compass:before { + content: "\f14e"; +} + +.fa-toggle-down:before, +.fa-caret-square-o-down:before { + content: "\f150"; +} + +.fa-toggle-up:before, +.fa-caret-square-o-up:before { + content: "\f151"; +} + +.fa-toggle-right:before, +.fa-caret-square-o-right:before { + content: "\f152"; +} + +.fa-euro:before, +.fa-eur:before { + content: "\f153"; +} + +.fa-gbp:before { + content: "\f154"; +} + +.fa-dollar:before, +.fa-usd:before { + content: "\f155"; +} + +.fa-rupee:before, +.fa-inr:before { + content: "\f156"; +} + +.fa-cny:before, +.fa-rmb:before, +.fa-yen:before, +.fa-jpy:before { + content: "\f157"; +} + +.fa-ruble:before, +.fa-rouble:before, +.fa-rub:before { + content: "\f158"; +} + +.fa-won:before, +.fa-krw:before { + content: "\f159"; +} + +.fa-bitcoin:before, +.fa-btc:before { + content: "\f15a"; +} + +.fa-file:before { + content: "\f15b"; +} + +.fa-file-text:before { + content: "\f15c"; +} + +.fa-sort-alpha-asc:before { + content: "\f15d"; +} + +.fa-sort-alpha-desc:before { + content: "\f15e"; +} + +.fa-sort-amount-asc:before { + content: "\f160"; +} + +.fa-sort-amount-desc:before { + content: "\f161"; +} + +.fa-sort-numeric-asc:before { + content: "\f162"; +} + +.fa-sort-numeric-desc:before { + content: "\f163"; +} + +.fa-thumbs-up:before { + content: "\f164"; +} + +.fa-thumbs-down:before { + content: "\f165"; +} + +.fa-youtube-square:before { + content: "\f166"; +} + +.fa-youtube:before { + content: "\f167"; +} + +.fa-xing:before { + content: "\f168"; +} + +.fa-xing-square:before { + content: "\f169"; +} + +.fa-youtube-play:before { + content: "\f16a"; +} + +.fa-dropbox:before { + content: "\f16b"; +} + +.fa-stack-overflow:before { + content: "\f16c"; +} + +.fa-instagram:before { + content: "\f16d"; +} + +.fa-flickr:before { + content: "\f16e"; +} + +.fa-adn:before { + content: "\f170"; +} + +.fa-bitbucket:before { + content: "\f171"; +} + +.fa-bitbucket-square:before { + content: "\f172"; +} + +.fa-tumblr:before { + content: "\f173"; +} + +.fa-tumblr-square:before { + content: "\f174"; +} + +.fa-long-arrow-down:before { + content: "\f175"; +} + +.fa-long-arrow-up:before { + content: "\f176"; +} + +.fa-long-arrow-left:before { + content: "\f177"; +} + +.fa-long-arrow-right:before { + content: "\f178"; +} + +.fa-apple:before { + content: "\f179"; +} + +.fa-windows:before { + content: "\f17a"; +} + +.fa-android:before { + content: "\f17b"; +} + +.fa-linux:before { + content: "\f17c"; +} + +.fa-dribbble:before { + content: "\f17d"; +} + +.fa-skype:before { + content: "\f17e"; +} + +.fa-foursquare:before { + content: "\f180"; +} + +.fa-trello:before { + content: "\f181"; +} + +.fa-female:before { + content: "\f182"; +} + +.fa-male:before { + content: "\f183"; +} + +.fa-gittip:before, +.fa-gratipay:before { + content: "\f184"; +} + +.fa-sun-o:before { + content: "\f185"; +} + +.fa-moon-o:before { + content: "\f186"; +} + +.fa-archive:before { + content: "\f187"; +} + +.fa-bug:before { + content: "\f188"; +} + +.fa-vk:before { + content: "\f189"; +} + +.fa-weibo:before { + content: "\f18a"; +} + +.fa-renren:before { + content: "\f18b"; +} + +.fa-pagelines:before { + content: "\f18c"; +} + +.fa-stack-exchange:before { + content: "\f18d"; +} + +.fa-arrow-circle-o-right:before { + content: "\f18e"; +} + +.fa-arrow-circle-o-left:before { + content: "\f190"; +} + +.fa-toggle-left:before, +.fa-caret-square-o-left:before { + content: "\f191"; +} + +.fa-dot-circle-o:before { + content: "\f192"; +} + +.fa-wheelchair:before { + content: "\f193"; +} + +.fa-vimeo-square:before { + content: "\f194"; +} + +.fa-turkish-lira:before, +.fa-try:before { + content: "\f195"; +} + +.fa-plus-square-o:before { + content: "\f196"; +} + +.fa-space-shuttle:before { + content: "\f197"; +} + +.fa-slack:before { + content: "\f198"; +} + +.fa-envelope-square:before { + content: "\f199"; +} + +.fa-wordpress:before { + content: "\f19a"; +} + +.fa-openid:before { + content: "\f19b"; +} + +.fa-institution:before, +.fa-bank:before, +.fa-university:before { + content: "\f19c"; +} + +.fa-mortar-board:before, +.fa-graduation-cap:before { + content: "\f19d"; +} + +.fa-yahoo:before { + content: "\f19e"; +} + +.fa-google:before { + content: "\f1a0"; +} + +.fa-reddit:before { + content: "\f1a1"; +} + +.fa-reddit-square:before { + content: "\f1a2"; +} + +.fa-stumbleupon-circle:before { + content: "\f1a3"; +} + +.fa-stumbleupon:before { + content: "\f1a4"; +} + +.fa-delicious:before { + content: "\f1a5"; +} + +.fa-digg:before { + content: "\f1a6"; +} + +.fa-pied-piper:before { + content: "\f1a7"; +} + +.fa-pied-piper-alt:before { + content: "\f1a8"; +} + +.fa-drupal:before { + content: "\f1a9"; +} + +.fa-joomla:before { + content: "\f1aa"; +} + +.fa-language:before { + content: "\f1ab"; +} + +.fa-fax:before { + content: "\f1ac"; +} + +.fa-building:before { + content: "\f1ad"; +} + +.fa-child:before { + content: "\f1ae"; +} + +.fa-paw:before { + content: "\f1b0"; +} + +.fa-spoon:before { + content: "\f1b1"; +} + +.fa-cube:before { + content: "\f1b2"; +} + +.fa-cubes:before { + content: "\f1b3"; +} + +.fa-behance:before { + content: "\f1b4"; +} + +.fa-behance-square:before { + content: "\f1b5"; +} + +.fa-steam:before { + content: "\f1b6"; +} + +.fa-steam-square:before { + content: "\f1b7"; +} + +.fa-recycle:before { + content: "\f1b8"; +} + +.fa-automobile:before, +.fa-car:before { + content: "\f1b9"; +} + +.fa-cab:before, +.fa-taxi:before { + content: "\f1ba"; +} + +.fa-tree:before { + content: "\f1bb"; +} + +.fa-spotify:before { + content: "\f1bc"; +} + +.fa-deviantart:before { + content: "\f1bd"; +} + +.fa-soundcloud:before { + content: "\f1be"; +} + +.fa-database:before { + content: "\f1c0"; +} + +.fa-file-pdf-o:before { + content: "\f1c1"; +} + +.fa-file-word-o:before { + content: "\f1c2"; +} + +.fa-file-excel-o:before { + content: "\f1c3"; +} + +.fa-file-powerpoint-o:before { + content: "\f1c4"; +} + +.fa-file-photo-o:before, +.fa-file-picture-o:before, +.fa-file-image-o:before { + content: "\f1c5"; +} + +.fa-file-zip-o:before, +.fa-file-archive-o:before { + content: "\f1c6"; +} + +.fa-file-sound-o:before, +.fa-file-audio-o:before { + content: "\f1c7"; +} + +.fa-file-movie-o:before, +.fa-file-video-o:before { + content: "\f1c8"; +} + +.fa-file-code-o:before { + content: "\f1c9"; +} + +.fa-vine:before { + content: "\f1ca"; +} + +.fa-codepen:before { + content: "\f1cb"; +} + +.fa-jsfiddle:before { + content: "\f1cc"; +} + +.fa-life-bouy:before, +.fa-life-buoy:before, +.fa-life-saver:before, +.fa-support:before, +.fa-life-ring:before { + content: "\f1cd"; +} + +.fa-circle-o-notch:before { + content: "\f1ce"; +} + +.fa-ra:before, +.fa-rebel:before { + content: "\f1d0"; +} + +.fa-ge:before, +.fa-empire:before { + content: "\f1d1"; +} + +.fa-git-square:before { + content: "\f1d2"; +} + +.fa-git:before { + content: "\f1d3"; +} + +.fa-hacker-news:before { + content: "\f1d4"; +} + +.fa-tencent-weibo:before { + content: "\f1d5"; +} + +.fa-qq:before { + content: "\f1d6"; +} + +.fa-wechat:before, +.fa-weixin:before { + content: "\f1d7"; +} + +.fa-send:before, +.fa-paper-plane:before { + content: "\f1d8"; +} + +.fa-send-o:before, +.fa-paper-plane-o:before { + content: "\f1d9"; +} + +.fa-history:before { + content: "\f1da"; +} + +.fa-genderless:before, +.fa-circle-thin:before { + content: "\f1db"; +} + +.fa-header:before { + content: "\f1dc"; +} + +.fa-paragraph:before { + content: "\f1dd"; +} + +.fa-sliders:before { + content: "\f1de"; +} + +.fa-share-alt:before { + content: "\f1e0"; +} + +.fa-share-alt-square:before { + content: "\f1e1"; +} + +.fa-bomb:before { + content: "\f1e2"; +} + +.fa-soccer-ball-o:before, +.fa-futbol-o:before { + content: "\f1e3"; +} + +.fa-tty:before { + content: "\f1e4"; +} + +.fa-binoculars:before { + content: "\f1e5"; +} + +.fa-plug:before { + content: "\f1e6"; +} + +.fa-slideshare:before { + content: "\f1e7"; +} + +.fa-twitch:before { + content: "\f1e8"; +} + +.fa-yelp:before { + content: "\f1e9"; +} + +.fa-newspaper-o:before { + content: "\f1ea"; +} + +.fa-wifi:before { + content: "\f1eb"; +} + +.fa-calculator:before { + content: "\f1ec"; +} + +.fa-paypal:before { + content: "\f1ed"; +} + +.fa-google-wallet:before { + content: "\f1ee"; +} + +.fa-cc-visa:before { + content: "\f1f0"; +} + +.fa-cc-mastercard:before { + content: "\f1f1"; +} + +.fa-cc-discover:before { + content: "\f1f2"; +} + +.fa-cc-amex:before { + content: "\f1f3"; +} + +.fa-cc-paypal:before { + content: "\f1f4"; +} + +.fa-cc-stripe:before { + content: "\f1f5"; +} + +.fa-bell-slash:before { + content: "\f1f6"; +} + +.fa-bell-slash-o:before { + content: "\f1f7"; +} + +.fa-trash:before { + content: "\f1f8"; +} + +.fa-copyright:before { + content: "\f1f9"; +} + +.fa-at:before { + content: "\f1fa"; +} + +.fa-eyedropper:before { + content: "\f1fb"; +} + +.fa-paint-brush:before { + content: "\f1fc"; +} + +.fa-birthday-cake:before { + content: "\f1fd"; +} + +.fa-area-chart:before { + content: "\f1fe"; +} + +.fa-pie-chart:before { + content: "\f200"; +} + +.fa-line-chart:before { + content: "\f201"; +} + +.fa-lastfm:before { + content: "\f202"; +} + +.fa-lastfm-square:before { + content: "\f203"; +} + +.fa-toggle-off:before { + content: "\f204"; +} + +.fa-toggle-on:before { + content: "\f205"; +} + +.fa-bicycle:before { + content: "\f206"; +} + +.fa-bus:before { + content: "\f207"; +} + +.fa-ioxhost:before { + content: "\f208"; +} + +.fa-angellist:before { + content: "\f209"; +} + +.fa-cc:before { + content: "\f20a"; +} + +.fa-shekel:before, +.fa-sheqel:before, +.fa-ils:before { + content: "\f20b"; +} + +.fa-meanpath:before { + content: "\f20c"; +} + +.fa-buysellads:before { + content: "\f20d"; +} + +.fa-connectdevelop:before { + content: "\f20e"; +} + +.fa-dashcube:before { + content: "\f210"; +} + +.fa-forumbee:before { + content: "\f211"; +} + +.fa-leanpub:before { + content: "\f212"; +} + +.fa-sellsy:before { + content: "\f213"; +} + +.fa-shirtsinbulk:before { + content: "\f214"; +} + +.fa-simplybuilt:before { + content: "\f215"; +} + +.fa-skyatlas:before { + content: "\f216"; +} + +.fa-cart-plus:before { + content: "\f217"; +} + +.fa-cart-arrow-down:before { + content: "\f218"; +} + +.fa-diamond:before { + content: "\f219"; +} + +.fa-ship:before { + content: "\f21a"; +} + +.fa-user-secret:before { + content: "\f21b"; +} + +.fa-motorcycle:before { + content: "\f21c"; +} + +.fa-street-view:before { + content: "\f21d"; +} + +.fa-heartbeat:before { + content: "\f21e"; +} + +.fa-venus:before { + content: "\f221"; +} + +.fa-mars:before { + content: "\f222"; +} + +.fa-mercury:before { + content: "\f223"; +} + +.fa-transgender:before { + content: "\f224"; +} + +.fa-transgender-alt:before { + content: "\f225"; +} + +.fa-venus-double:before { + content: "\f226"; +} + +.fa-mars-double:before { + content: "\f227"; +} + +.fa-venus-mars:before { + content: "\f228"; +} + +.fa-mars-stroke:before { + content: "\f229"; +} + +.fa-mars-stroke-v:before { + content: "\f22a"; +} + +.fa-mars-stroke-h:before { + content: "\f22b"; +} + +.fa-neuter:before { + content: "\f22c"; +} + +.fa-facebook-official:before { + content: "\f230"; +} + +.fa-pinterest-p:before { + content: "\f231"; +} + +.fa-whatsapp:before { + content: "\f232"; +} + +.fa-server:before { + content: "\f233"; +} + +.fa-user-plus:before { + content: "\f234"; +} + +.fa-user-times:before { + content: "\f235"; +} + +.fa-hotel:before, +.fa-bed:before { + content: "\f236"; +} + +.fa-viacoin:before { + content: "\f237"; +} + +.fa-train:before { + content: "\f238"; +} + +.fa-subway:before { + content: "\f239"; +} + +.fa-medium:before { + content: "\f23a"; +} + +/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */ +@font-face { + font-family: 'editormd-logo'; + src: url("../fonts/editormd-logo.eot?-5y8q6h"); + src: url(".../fonts/editormd-logo.eot?#iefix-5y8q6h") format("embedded-opentype"), url("../fonts/editormd-logo.woff?-5y8q6h") format("woff"), url("../fonts/editormd-logo.ttf?-5y8q6h") format("truetype"), url("../fonts/editormd-logo.svg?-5y8q6h#icomoon") format("svg"); + font-weight: normal; + font-style: normal; +} +.editormd-logo, +.editormd-logo-1x, +.editormd-logo-2x, +.editormd-logo-3x, +.editormd-logo-4x, +.editormd-logo-5x, +.editormd-logo-6x, +.editormd-logo-7x, +.editormd-logo-8x { + font-family: 'editormd-logo'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + font-size: inherit; + line-height: 1; + display: inline-block; + text-rendering: auto; + vertical-align: inherit; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.editormd-logo:before, +.editormd-logo-1x:before, +.editormd-logo-2x:before, +.editormd-logo-3x:before, +.editormd-logo-4x:before, +.editormd-logo-5x:before, +.editormd-logo-6x:before, +.editormd-logo-7x:before, +.editormd-logo-8x:before { + content: "\e1987"; + /* + HTML Entity 󡦇 + example: + */ +} + +.editormd-logo-1x { + font-size: 1em; +} + +.editormd-logo-lg { + font-size: 1.2em; +} + +.editormd-logo-2x { + font-size: 2em; +} + +.editormd-logo-3x { + font-size: 3em; +} + +.editormd-logo-4x { + font-size: 4em; +} + +.editormd-logo-5x { + font-size: 5em; +} + +.editormd-logo-6x { + font-size: 6em; +} + +.editormd-logo-7x { + font-size: 7em; +} + +.editormd-logo-8x { + font-size: 8em; +} + +.editormd-logo-color { + color: #2196F3; +} + +/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */ +@font-face { + font-family: octicons-anchor; + src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format("woff"); +} +.markdown-body { + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; + color: #333; + overflow: hidden; + font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "华文细黑", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "宋体", Heiti, "黑体", sans-serif; + font-size: 16px; + line-height: 1.6; + word-wrap: break-word; +} + +.markdown-body a { + background: transparent; +} + +.markdown-body a:active, +.markdown-body a:hover { + outline: 0; +} + +.markdown-body strong { + font-weight: bold; +} + +.markdown-body h1 { + font-size: 2em; + margin: 0.67em 0; +} + +.markdown-body img { + border: 0; +} + +.markdown-body hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +.markdown-body pre { + overflow: auto; +} + +.markdown-body code, +.markdown-body kbd, +.markdown-body pre { + font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; + font-size: 1em; +} + +.markdown-body input { + color: inherit; + font: inherit; + margin: 0; +} + +.markdown-body html input[disabled] { + cursor: default; +} + +.markdown-body input { + line-height: normal; +} + +.markdown-body input[type="checkbox"] { + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} + +.markdown-body table { + border-collapse: collapse; + border-spacing: 0; +} + +.markdown-body td, +.markdown-body th { + padding: 0; +} + +.markdown-body * { + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.markdown-body input { + font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; +} + +.markdown-body a { + color: #4183c4; + text-decoration: none; +} + +.markdown-body a:hover, +.markdown-body a:active { + text-decoration: underline; +} + +.markdown-body hr { + height: 0; + margin: 15px 0; + overflow: hidden; + background: transparent; + border: 0; + border-bottom: 1px solid #ddd; +} + +.markdown-body hr:before { + display: table; + content: ""; +} + +.markdown-body hr:after { + display: table; + clear: both; + content: ""; +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + margin-top: 15px; + margin-bottom: 15px; + line-height: 1.1; +} + +.markdown-body h1 { + font-size: 30px; +} + +.markdown-body h2 { + font-size: 21px; +} + +.markdown-body h3 { + font-size: 16px; +} + +.markdown-body h4 { + font-size: 14px; +} + +.markdown-body h5 { + font-size: 12px; +} + +.markdown-body h6 { + font-size: 11px; +} + +.markdown-body blockquote { + margin: 0; +} + +.markdown-body ul, +.markdown-body ol { + padding: 0; + margin-top: 0; + margin-bottom: 0; +} + +.markdown-body ol ol, +.markdown-body ul ol { + list-style-type: lower-roman; +} + +.markdown-body ul ul ol, +.markdown-body ul ol ol, +.markdown-body ol ul ol, +.markdown-body ol ol ol { + list-style-type: lower-alpha; +} + +.markdown-body dd { + margin-left: 0; +} + +.markdown-body code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 12px; +} + +.markdown-body pre { + margin-top: 0; + margin-bottom: 0; + font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; +} + +.markdown-body .octicon { + font: normal normal 16px octicons-anchor; + line-height: 1; + display: inline-block; + text-decoration: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.markdown-body .octicon-link:before { + content: '\f05c'; +} + +.markdown-body > *:first-child { + margin-top: 0 !important; +} + +.markdown-body > *:last-child { + margin-bottom: 0 !important; +} + +.markdown-body .anchor { + position: absolute; + top: 0; + left: 0; + display: block; + padding-right: 6px; + padding-left: 30px; + margin-left: -30px; +} + +.markdown-body .anchor:focus { + outline: none; +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4, +.markdown-body h5, +.markdown-body h6 { + position: relative; + margin-top: 1em; + margin-bottom: 16px; + font-weight: bold; + line-height: 1.4; +} + +.markdown-body h1 .octicon-link, +.markdown-body h2 .octicon-link, +.markdown-body h3 .octicon-link, +.markdown-body h4 .octicon-link, +.markdown-body h5 .octicon-link, +.markdown-body h6 .octicon-link { + display: none; + color: #000; + vertical-align: middle; +} + +.markdown-body h1:hover .anchor, +.markdown-body h2:hover .anchor, +.markdown-body h3:hover .anchor, +.markdown-body h4:hover .anchor, +.markdown-body h5:hover .anchor, +.markdown-body h6:hover .anchor { + padding-left: 8px; + margin-left: -30px; + text-decoration: none; +} + +.markdown-body h1:hover .anchor .octicon-link, +.markdown-body h2:hover .anchor .octicon-link, +.markdown-body h3:hover .anchor .octicon-link, +.markdown-body h4:hover .anchor .octicon-link, +.markdown-body h5:hover .anchor .octicon-link, +.markdown-body h6:hover .anchor .octicon-link { + display: inline-block; +} + +.markdown-body h1 { + padding-bottom: 0.3em; + font-size: 2.25em; + line-height: 1.2; + border-bottom: 1px solid #eee; +} + +.markdown-body h1 .anchor { + line-height: 1; +} + +.markdown-body h2 { + padding-bottom: 0.3em; + font-size: 1.75em; + line-height: 1.225; + border-bottom: 1px solid #eee; +} + +.markdown-body h2 .anchor { + line-height: 1; +} + +.markdown-body h3 { + font-size: 1.5em; + line-height: 1.43; +} + +.markdown-body h3 .anchor { + line-height: 1.2; +} + +.markdown-body h4 { + font-size: 1.25em; +} + +.markdown-body h4 .anchor { + line-height: 1.2; +} + +.markdown-body h5 { + font-size: 1em; +} + +.markdown-body h5 .anchor { + line-height: 1.1; +} + +.markdown-body h6 { + font-size: 1em; + color: #777; +} + +.markdown-body h6 .anchor { + line-height: 1.1; +} + +.markdown-body p, +.markdown-body blockquote, +.markdown-body ul, +.markdown-body ol, +.markdown-body dl, +.markdown-body table, +.markdown-body pre { + margin-top: 0; + margin-bottom: 16px; +} + +/* +.markdown-body hr { + height: 4px; + padding: 0; + margin: 16px 0; + background-color: #e7e7e7; + border: 0 none; +}*/ +.markdown-body ul, +.markdown-body ol { + padding-left: 2em; +} + +.markdown-body ul ul, +.markdown-body ul ol, +.markdown-body ol ol, +.markdown-body ol ul { + margin-top: 0; + margin-bottom: 0; +} + +.markdown-body li > p { + margin-top: 16px; +} + +.markdown-body dl { + padding: 0; +} + +.markdown-body dl dt { + padding: 0; + margin-top: 16px; + font-size: 1em; + font-style: italic; + font-weight: bold; +} + +.markdown-body dl dd { + padding: 0 16px; + margin-bottom: 16px; +} + +.markdown-body blockquote { + padding: 0 15px; + color: #777; + border-left: 4px solid #ddd; +} + +.markdown-body blockquote > :first-child { + margin-top: 0; +} + +.markdown-body blockquote > :last-child { + margin-bottom: 0; +} + +.markdown-body table { + display: block; + width: 100%; + overflow: auto; + word-break: normal; + word-break: keep-all; +} + +.markdown-body table th { + font-weight: bold; +} + +.markdown-body table th, +.markdown-body table td { + padding: 6px 13px; + border: 1px solid #ddd; +} + +.markdown-body table tr { + background-color: #fff; + border-top: 1px solid #ccc; +} + +.markdown-body table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +.markdown-body img { + max-width: 100%; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.markdown-body code { + padding: 0; + padding-top: 0.2em; + padding-bottom: 0.2em; + margin: 0; + font-size: 85%; + background-color: rgba(0, 0, 0, 0.04); + border-radius: 3px; +} + +.markdown-body code:before, +.markdown-body code:after { + letter-spacing: -0.2em; + content: "\00a0"; +} + +.markdown-body pre > code { + padding: 0; + margin: 0; + font-size: 100%; + word-break: normal; + white-space: pre; + background: transparent; + border: 0; +} + +.markdown-body .highlight { + margin-bottom: 16px; +} + +.markdown-body .highlight pre, +.markdown-body pre { + padding: 16px; + overflow: auto; + font-size: 85%; + line-height: 1.45; + background-color: #f7f7f7; + border-radius: 3px; +} + +.markdown-body .highlight pre { + margin-bottom: 0; + word-break: normal; +} + +.markdown-body pre { + word-wrap: normal; +} + +.markdown-body pre code { + display: inline; + max-width: initial; + padding: 0; + margin: 0; + overflow: initial; + line-height: inherit; + word-wrap: normal; + background-color: transparent; + border: 0; +} + +.markdown-body pre code:before, +.markdown-body pre code:after { + content: normal; +} + +.markdown-body kbd { + display: inline-block; + padding: 3px 5px; + font-size: 11px; + line-height: 10px; + color: #555; + vertical-align: middle; + background-color: #fcfcfc; + border: solid 1px #ccc; + border-bottom-color: #bbb; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #bbb; +} + +.markdown-body .pl-c { + color: #969896; +} + +.markdown-body .pl-c1, +.markdown-body .pl-mdh, +.markdown-body .pl-mm, +.markdown-body .pl-mp, +.markdown-body .pl-mr, +.markdown-body .pl-s1 .pl-v, +.markdown-body .pl-s3, +.markdown-body .pl-sc, +.markdown-body .pl-sv { + color: #0086b3; +} + +.markdown-body .pl-e, +.markdown-body .pl-en { + color: #795da3; +} + +.markdown-body .pl-s1 .pl-s2, +.markdown-body .pl-smi, +.markdown-body .pl-smp, +.markdown-body .pl-stj, +.markdown-body .pl-vo, +.markdown-body .pl-vpf { + color: #333; +} + +.markdown-body .pl-ent { + color: #63a35c; +} + +.markdown-body .pl-k, +.markdown-body .pl-s, +.markdown-body .pl-st { + color: #a71d5d; +} + +.markdown-body .pl-pds, +.markdown-body .pl-s1, +.markdown-body .pl-s1 .pl-pse .pl-s2, +.markdown-body .pl-sr, +.markdown-body .pl-sr .pl-cce, +.markdown-body .pl-sr .pl-sra, +.markdown-body .pl-sr .pl-sre, +.markdown-body .pl-src { + color: #df5000; +} + +.markdown-body .pl-mo, +.markdown-body .pl-v { + color: #1d3e81; +} + +.markdown-body .pl-id { + color: #b52a1d; +} + +.markdown-body .pl-ii { + background-color: #b52a1d; + color: #f8f8f8; +} + +.markdown-body .pl-sr .pl-cce { + color: #63a35c; + font-weight: bold; +} + +.markdown-body .pl-ml { + color: #693a17; +} + +.markdown-body .pl-mh, +.markdown-body .pl-mh .pl-en, +.markdown-body .pl-ms { + color: #1d3e81; + font-weight: bold; +} + +.markdown-body .pl-mq { + color: #008080; +} + +.markdown-body .pl-mi { + color: #333; + font-style: italic; +} + +.markdown-body .pl-mb { + color: #333; + font-weight: bold; +} + +.markdown-body .pl-md, +.markdown-body .pl-mdhf { + background-color: #ffecec; + color: #bd2c00; +} + +.markdown-body .pl-mdht, +.markdown-body .pl-mi1 { + background-color: #eaffea; + color: #55a532; +} + +.markdown-body .pl-mdr { + color: #795da3; + font-weight: bold; +} + +.markdown-body kbd { + display: inline-block; + padding: 3px 5px; + font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 10px; + color: #555; + vertical-align: middle; + background-color: #fcfcfc; + border: solid 1px #ccc; + border-bottom-color: #bbb; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #bbb; +} + +.markdown-body .task-list-item { + list-style-type: none; +} + +.markdown-body .task-list-item + .task-list-item { + margin-top: 3px; +} + +.markdown-body .task-list-item input { + float: left; + margin: 0.3em 0 0.25em -1.6em; + vertical-align: middle; +} + +.markdown-body :checked + .radio-label { + z-index: 1; + position: relative; + border-color: #4183c4; +} + +.editormd-preview-container, .editormd-html-preview { + text-align: left; + font-size: 14px; + line-height: 1.6; + padding: 20px; + overflow: auto; + width: 100%; + background-color: #fff; +} +.editormd-preview-container blockquote, .editormd-html-preview blockquote { + color: #666; + border-left: 4px solid #ddd; + padding-left: 20px; + margin-left: 0; + font-size: 14px; + font-style: italic; +} +.editormd-preview-container p code, .editormd-html-preview p code { + margin-left: 5px; + margin-right: 4px; +} +.editormd-preview-container abbr, .editormd-html-preview abbr { + background: #ffffdd; +} +.editormd-preview-container hr, .editormd-html-preview hr { + height: 1px; + border: none; + border-top: 1px solid #ddd; + background: none; +} +.editormd-preview-container code, .editormd-html-preview code { + border: 1px solid #ddd; + background: #f6f6f6; + padding: 3px; + border-radius: 3px; + font-size: 14px; +} +.editormd-preview-container pre, .editormd-html-preview pre { + border: 1px solid #ddd; + background: #f6f6f6; + padding: 10px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; +} +.editormd-preview-container pre code, .editormd-html-preview pre code { + padding: 0; +} +.editormd-preview-container pre, .editormd-preview-container code, .editormd-preview-container kbd, .editormd-html-preview pre, .editormd-html-preview code, .editormd-html-preview kbd { + font-family: "YaHei Consolas Hybrid", Consolas, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; +} +.editormd-preview-container table thead tr, .editormd-html-preview table thead tr { + background-color: #F8F8F8; +} +.editormd-preview-container p.editormd-tex, .editormd-html-preview p.editormd-tex { + text-align: center; +} +.editormd-preview-container span.editormd-tex, .editormd-html-preview span.editormd-tex { + margin: 0 5px; +} +.editormd-preview-container .emoji, .editormd-html-preview .emoji { + width: 24px; + height: 24px; +} +.editormd-preview-container .katex, .editormd-html-preview .katex { + font-size: 1.4em; +} +.editormd-preview-container .sequence-diagram, .editormd-preview-container .flowchart, .editormd-html-preview .sequence-diagram, .editormd-html-preview .flowchart { + margin: 0 auto; + text-align: center; +} +.editormd-preview-container .sequence-diagram svg, .editormd-preview-container .flowchart svg, .editormd-html-preview .sequence-diagram svg, .editormd-html-preview .flowchart svg { + margin: 0 auto; +} +.editormd-preview-container .sequence-diagram text, .editormd-preview-container .flowchart text, .editormd-html-preview .sequence-diagram text, .editormd-html-preview .flowchart text { + font-size: 15px !important; + font-family: "YaHei Consolas Hybrid", Consolas, "Microsoft YaHei", "Malgun Gothic", "Segoe UI", Helvetica, Arial !important; +} + +/*! Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +.pln { + color: #000; +} + +/* plain text */ +@media screen { + .str { + color: #080; + } + + /* string content */ + .kwd { + color: #008; + } + + /* a keyword */ + .com { + color: #800; + } + + /* a comment */ + .typ { + color: #606; + } + + /* a type name */ + .lit { + color: #066; + } + + /* a literal value */ + /* punctuation, lisp open bracket, lisp close bracket */ + .pun, .opn, .clo { + color: #660; + } + + .tag { + color: #008; + } + + /* a markup tag name */ + .atn { + color: #606; + } + + /* a markup attribute name */ + .atv { + color: #080; + } + + /* a markup attribute value */ + .dec, .var { + color: #606; + } + + /* a declaration; a variable name */ + .fun { + color: red; + } + + /* a function name */ +} +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; + } + + .kwd { + color: #006; + font-weight: bold; + } + + .com { + color: #600; + font-style: italic; + } + + .typ { + color: #404; + font-weight: bold; + } + + .lit { + color: #044; + } + + .pun, .opn, .clo { + color: #440; + } + + .tag { + color: #006; + font-weight: bold; + } + + .atn { + color: #404; + } + + .atv { + color: #060; + } +} +/* Put a border around prettyprinted code snippets. */ +pre.prettyprint { + padding: 2px; + border: 1px solid #888; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; +} + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L5, +li.L6, +li.L7, +li.L8 { + list-style-type: none; +} + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + background: #eee; +} + +.editormd-preview-container pre.prettyprint, .editormd-html-preview pre.prettyprint { + padding: 10px; + border: 1px solid #ddd; + white-space: pre-wrap; + word-wrap: break-word; +} +.editormd-preview-container ol.linenums, .editormd-html-preview ol.linenums { + color: #999; + padding-left: 2.5em; +} +.editormd-preview-container ol.linenums li, .editormd-html-preview ol.linenums li { + list-style-type: decimal; +} +.editormd-preview-container ol.linenums li code, .editormd-html-preview ol.linenums li code { + border: none; + background: none; + padding: 0; +} + +.editormd-preview-container .editormd-toc-menu, .editormd-html-preview .editormd-toc-menu { + margin: 8px 0 12px 0; + display: inline-block; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc, .editormd-html-preview .editormd-toc-menu > .markdown-toc { + position: relative; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + border: 1px solid #ddd; + display: inline-block; + font-size: 1em; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul { + width: 160%; + min-width: 180px; + position: absolute; + left: -1px; + top: -2px; + z-index: 100; + padding: 0 10px 10px; + display: none; + background: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Webkit browsers */ + -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Firefox */ + -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* IE9 */ + -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Opera(Old) */ + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* IE9+, News */ +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li ul { + width: 100%; + min-width: 180px; + border: 1px solid #ddd; + display: none; + background: #fff; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li a, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li a { + color: #666; + padding: 6px 10px; + display: block; + -webkit-transition: background-color 500ms ease-out; + /* Safari, Chrome */ + -moz-transition: background-color 500ms ease-out; + /* Firefox 4.0~16.0 */ + transition: background-color 500ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc > ul > li a:hover, .editormd-html-preview .editormd-toc-menu > .markdown-toc > ul > li a:hover { + background-color: #f6f6f6; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc li, .editormd-html-preview .editormd-toc-menu > .markdown-toc li { + position: relative; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul { + position: absolute; + top: 32px; + left: 10%; + display: none; + -webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Webkit browsers */ + -moz-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Firefox */ + -ms-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* IE9 */ + -o-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* Opera(Old) */ + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); + /* IE9+, News */ +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:after, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:after { + pointer-events: pointer-events; + position: absolute; + left: 15px; + top: -6px; + display: block; + content: ""; + width: 0; + height: 0; + border: 6px solid transparent; + border-width: 0 6px 6px; + z-index: 10; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:before, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:before { + border-bottom-color: #ccc; +} +.editormd-preview-container .editormd-toc-menu > .markdown-toc li > ul:after, .editormd-html-preview .editormd-toc-menu > .markdown-toc li > ul:after { + border-bottom-color: #ffffff; + top: -5px; +} +.editormd-preview-container .editormd-toc-menu ul, .editormd-html-preview .editormd-toc-menu ul { + list-style: none; +} +.editormd-preview-container .editormd-toc-menu a, .editormd-html-preview .editormd-toc-menu a { + text-decoration: none; +} +.editormd-preview-container .editormd-toc-menu h1, .editormd-html-preview .editormd-toc-menu h1 { + font-size: 16px; + padding: 5px 0 10px 10px; + line-height: 1; + border-bottom: 1px solid #eee; +} +.editormd-preview-container .editormd-toc-menu h1 .fa, .editormd-html-preview .editormd-toc-menu h1 .fa { + padding-left: 10px; +} +.editormd-preview-container .editormd-toc-menu .toc-menu-btn, .editormd-html-preview .editormd-toc-menu .toc-menu-btn { + color: #666; + min-width: 180px; + padding: 5px 10px; + border-radius: 4px; + display: inline-block; + -webkit-transition: background-color 500ms ease-out; + /* Safari, Chrome */ + -moz-transition: background-color 500ms ease-out; + /* Firefox 4.0~16.0 */ + transition: background-color 500ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover, .editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover { + background-color: #f6f6f6; +} +.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa, .editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa { + float: right; + padding: 3px 0 0 10px; + font-size: 1.3em; +} + +.markdown-body .editormd-toc-menu ul { + padding-left: 0; +} +.markdown-body .highlight pre, .markdown-body pre { + line-height: 1.6; +} + +hr.editormd-page-break { + border: 1px dotted #ccc; + font-size: 0; + height: 2px; +} + +@media only print { + hr.editormd-page-break { + background: none; + border: none; + height: 0; + } +} +.editormd-html-preview textarea { + display: none; +} +.editormd-html-preview hr.editormd-page-break { + background: none; + border: none; + height: 0; +} + +.editormd-preview-close-btn { + color: #fff; + padding: 4px 6px; + font-size: 18px; + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + -ms-border-radius: 500px; + -o-border-radius: 500px; + border-radius: 500px; + display: none; + background-color: #ccc; + position: absolute; + top: 25px; + right: 35px; + z-index: 19; + -webkit-transition: background-color 300ms ease-out; + /* Safari, Chrome */ + -moz-transition: background-color 300ms ease-out; + /* Firefox 4.0~16.0 */ + transition: background-color 300ms ease-out; + /* IE >9, FF >15, Opera >12.0 */ +} +.editormd-preview-close-btn:hover { + background-color: #999; +} + +.editormd-preview-active { + width: 100%; + padding: 40px; +} diff --git a/static/editor.md/css/editormd.preview.min.css b/static/editor.md/css/editormd.preview.min.css new file mode 100644 index 0000000..a0f22ad --- /dev/null +++ b/static/editor.md/css/editormd.preview.min.css @@ -0,0 +1,5 @@ +/*! Editor.md v1.5.0 | editormd.preview.min.css | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ +@charset "UTF-8";/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 *//*! + * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */.fa-ul,.markdown-body .task-list-item,li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}.fa-fw,.fa-li{text-align:center}.fa,.fa-stack{display:inline-block}.fa,.markdown-body .octicon{-moz-osx-font-smoothing:grayscale}@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.3.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0)format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.3.0)format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.3.0)format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.3.0)format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular)format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;transform:translate(0,0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em}.fa-ul{padding-left:0;margin-left:2.14285714em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.fa-stack{position:relative;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-close:before,.fa-remove:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-cog:before,.fa-gear:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-repeat:before,.fa-rotate-right:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-exclamation-triangle:before,.fa-warning:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-cogs:before,.fa-gears:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-floppy-o:before,.fa-save:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-sort:before,.fa-unsorted:before{content:"\f0dc"}.fa-sort-desc:before,.fa-sort-down:before{content:"\f0dd"}.fa-sort-asc:before,.fa-sort-up:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-gavel:before,.fa-legal:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-bolt:before,.fa-flash:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-clipboard:before,.fa-paste:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-chain-broken:before,.fa-unlink:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:"\f150"}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:"\f151"}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:"\f152"}.fa-eur:before,.fa-euro:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-inr:before,.fa-rupee:before{content:"\f156"}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:"\f157"}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:"\f158"}.fa-krw:before,.fa-won:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-try:before,.fa-turkish-lira:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-bank:before,.fa-institution:before,.fa-university:before{content:"\f19c"}.fa-graduation-cap:before,.fa-mortar-board:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:"\f1c5"}.fa-file-archive-o:before,.fa-file-zip-o:before{content:"\f1c6"}.fa-file-audio-o:before,.fa-file-sound-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-empire:before,.fa-ge:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-paper-plane:before,.fa-send:before{content:"\f1d8"}.fa-paper-plane-o:before,.fa-send-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before,.fa-genderless:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-bed:before,.fa-hotel:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}/*! prefixes.scss v0.1.0 | Author: Pandao | https://github.com/pandao/prefixes.scss | MIT license | Copyright (c) 2015 */@font-face{font-family:editormd-logo;src:url(../fonts/editormd-logo.eot?-5y8q6h);src:url(.../fonts/editormd-logo.eot?#iefix-5y8q6h)format("embedded-opentype"),url(../fonts/editormd-logo.woff?-5y8q6h)format("woff"),url(../fonts/editormd-logo.ttf?-5y8q6h)format("truetype"),url(../fonts/editormd-logo.svg?-5y8q6h#icomoon)format("svg");font-weight:400;font-style:normal}.editormd-logo,.editormd-logo-1x,.editormd-logo-2x,.editormd-logo-3x,.editormd-logo-4x,.editormd-logo-5x,.editormd-logo-6x,.editormd-logo-7x,.editormd-logo-8x{font-family:editormd-logo;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;line-height:1;display:inline-block;text-rendering:auto;vertical-align:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markdown-body hr:after,.markdown-body hr:before{content:"";display:table}.editormd-logo-1x:before,.editormd-logo-2x:before,.editormd-logo-3x:before,.editormd-logo-4x:before,.editormd-logo-5x:before,.editormd-logo-6x:before,.editormd-logo-7x:before,.editormd-logo-8x:before,.editormd-logo:before{content:"\e1987"}.editormd-logo-1x{font-size:1em}.editormd-logo-lg{font-size:1.2em}.editormd-logo-2x{font-size:2em}.editormd-logo-3x{font-size:3em}.editormd-logo-4x{font-size:4em}.editormd-logo-5x{font-size:5em}.editormd-logo-6x{font-size:6em}.editormd-logo-7x{font-size:7em}.editormd-logo-8x{font-size:8em}.editormd-logo-color{color:#2196F3}/*! github-markdown-css | The MIT License (MIT) | Copyright (c) Sindre Sorhus (sindresorhus.com) | https://github.com/sindresorhus/github-markdown-css */@font-face{font-family:octicons-anchor;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==)format("woff")}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;font-family:"Microsoft YaHei",Helvetica,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif;font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body strong{font-weight:700}.markdown-body h1{margin:.67em 0}.markdown-body img{border:0}.markdown-body hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.markdown-body input{color:inherit;margin:0;line-height:normal;font:13px/1.4 Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.markdown-body html input[disabled]{cursor:default}.markdown-body input[type=checkbox]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}.markdown-body td,.markdown-body th{padding:0}.markdown-body *{-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body a{background:0 0;color:#4183c4;text-decoration:none}.markdown-body a:active,.markdown-body a:hover{outline:0;text-decoration:underline}.markdown-body hr{margin:15px 0;overflow:hidden;background:0 0;border:0;border-bottom:1px solid #ddd}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.markdown-body hr:after{clear:both}.markdown-body blockquote{margin:0}.markdown-body ol,.markdown-body ul{padding:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body pre{font:12px Consolas,"Liberation Mono",Menlo,Courier,monospace;word-wrap:normal}.markdown-body .octicon{font:normal normal 16px octicons-anchor;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-body .octicon-link:before{content:'\f05c'}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .anchor{position:absolute;top:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.markdown-body .anchor:focus{outline:0}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{display:none;color:#000;vertical-align:middle}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{padding-left:8px;margin-left:-30px;text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{display:inline-block}.markdown-body h1{font-size:2.25em;line-height:1.2}.markdown-body h1 .anchor{line-height:1}.markdown-body h2{font-size:1.75em;line-height:1.225}.markdown-body h2 .anchor{line-height:1}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h3 .anchor,.markdown-body h4 .anchor{line-height:1.2}.markdown-body h4{font-size:1.25em}.markdown-body h5 .anchor,.markdown-body h6 .anchor{line-height:1.1}.markdown-body h5{font-size:1em}.markdown-body h6{font-size:1em;color:#777}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before{content:normal}.markdown-body .pl-c{color:#969896}.markdown-body .pl-c1,.markdown-body .pl-mdh,.markdown-body .pl-mm,.markdown-body .pl-mp,.markdown-body .pl-mr,.markdown-body .pl-s1 .pl-v,.markdown-body .pl-s3,.markdown-body .pl-sc,.markdown-body .pl-sv{color:#0086b3}.markdown-body .pl-e,.markdown-body .pl-en{color:#795da3}.markdown-body .pl-s1 .pl-s2,.markdown-body .pl-smi,.markdown-body .pl-smp,.markdown-body .pl-stj,.markdown-body .pl-vo,.markdown-body .pl-vpf{color:#333}.markdown-body .pl-ent{color:#63a35c}.markdown-body .pl-k,.markdown-body .pl-s,.markdown-body .pl-st{color:#a71d5d}.markdown-body .pl-pds,.markdown-body .pl-s1,.markdown-body .pl-s1 .pl-pse .pl-s2,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-src{color:#df5000}.markdown-body .pl-mo,.markdown-body .pl-v{color:#1d3e81}.markdown-body .pl-id{color:#b52a1d}.markdown-body .pl-ii{background-color:#b52a1d;color:#f8f8f8}.markdown-body .pl-sr .pl-cce{color:#63a35c;font-weight:700}.markdown-body .pl-ml{color:#693a17}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{color:#1d3e81;font-weight:700}.markdown-body .pl-mq{color:teal}.markdown-body .pl-mi{color:#333;font-style:italic}.markdown-body .pl-mb{color:#333;font-weight:700}.markdown-body .pl-md,.markdown-body .pl-mdhf{background-color:#ffecec;color:#bd2c00}.markdown-body .pl-mdht,.markdown-body .pl-mi1{background-color:#eaffea;color:#55a532}.markdown-body .pl-mdr{color:#795da3;font-weight:700}.markdown-body kbd{display:inline-block;padding:3px 5px;font:11px Consolas,"Liberation Mono",Menlo,Courier,monospace;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:1px solid #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{float:left;margin:.3em 0 .25em -1.6em;vertical-align:middle}.markdown-body :checked+.radio-label{z-index:1;position:relative;border-color:#4183c4}.editormd-html-preview,.editormd-preview-container{text-align:left;font-size:14px;line-height:1.6;padding:20px;overflow:auto;width:100%;background-color:#fff}.editormd-html-preview blockquote,.editormd-preview-container blockquote{color:#666;border-left:4px solid #ddd;padding-left:20px;margin-left:0;font-size:14px;font-style:italic}.editormd-html-preview p code,.editormd-preview-container p code{margin-left:5px;margin-right:4px}.editormd-html-preview abbr,.editormd-preview-container abbr{background:#ffd}.editormd-html-preview hr,.editormd-preview-container hr{height:1px;border:none;border-top:1px solid #ddd;background:0 0}.editormd-html-preview code,.editormd-preview-container code{border:1px solid #ddd;background:#f6f6f6;padding:3px;border-radius:3px;font-size:14px}.editormd-html-preview pre,.editormd-preview-container pre{border:1px solid #ddd;background:#f6f6f6;padding:10px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;-o-border-radius:3px;border-radius:3px}.editormd-html-preview pre code,.editormd-preview-container pre code{padding:0}.editormd-html-preview code,.editormd-html-preview kbd,.editormd-html-preview pre,.editormd-preview-container code,.editormd-preview-container kbd,.editormd-preview-container pre{font-family:"YaHei Consolas Hybrid",Consolas,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Helvetica,monospace,monospace}.editormd-html-preview table thead tr,.editormd-preview-container table thead tr{background-color:#F8F8F8}.editormd-html-preview p.editormd-tex,.editormd-preview-container p.editormd-tex{text-align:center}.editormd-html-preview span.editormd-tex,.editormd-preview-container span.editormd-tex{margin:0 5px}.editormd-html-preview .emoji,.editormd-preview-container .emoji{width:24px;height:24px}.editormd-html-preview .katex,.editormd-preview-container .katex{font-size:1.4em}.editormd-html-preview .flowchart,.editormd-html-preview .sequence-diagram,.editormd-preview-container .flowchart,.editormd-preview-container .sequence-diagram{margin:0 auto;text-align:center}.editormd-html-preview .flowchart svg,.editormd-html-preview .sequence-diagram svg,.editormd-preview-container .flowchart svg,.editormd-preview-container .sequence-diagram svg{margin:0 auto}.editormd-html-preview .flowchart text,.editormd-html-preview .sequence-diagram text,.editormd-preview-container .flowchart text,.editormd-preview-container .sequence-diagram text{font-size:15px!important;font-family:"YaHei Consolas Hybrid",Consolas,"Microsoft YaHei","Malgun Gothic","Segoe UI",Helvetica,Arial!important}/*! Pretty printing styles. Used with prettify.js. */.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.clo,.opn,.pun{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.kwd,.tag,.typ{font-weight:700}.str{color:#060}.kwd{color:#006}.com{color:#600;font-style:italic}.typ{color:#404}.lit{color:#044}.clo,.opn,.pun{color:#440}.tag{color:#006}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}.editormd-html-preview pre.prettyprint,.editormd-preview-container pre.prettyprint{padding:10px;border:1px solid #ddd;white-space:pre-wrap;word-wrap:break-word}.editormd-html-preview ol.linenums,.editormd-preview-container ol.linenums{color:#999;padding-left:2.5em}.editormd-html-preview ol.linenums li,.editormd-preview-container ol.linenums li{list-style-type:decimal}.editormd-html-preview ol.linenums li code,.editormd-preview-container ol.linenums li code{border:none;background:0 0;padding:0}.editormd-html-preview .editormd-toc-menu,.editormd-preview-container .editormd-toc-menu{margin:8px 0 12px;display:inline-block}.editormd-html-preview .editormd-toc-menu>.markdown-toc,.editormd-preview-container .editormd-toc-menu>.markdown-toc{position:relative;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;border:1px solid #ddd;display:inline-block;font-size:1em}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul{width:160%;min-width:180px;position:absolute;left:-1px;top:-2px;z-index:100;padding:0 10px 10px;display:none;background:#fff;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li ul{width:100%;min-width:180px;border:1px solid #ddd;display:none;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn:hover,.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a:hover,.editormd-preview-container .editormd-toc-menu .toc-menu-btn:hover,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a:hover{background-color:#f6f6f6}.editormd-html-preview .editormd-toc-menu>.markdown-toc>ul>li a,.editormd-preview-container .editormd-toc-menu>.markdown-toc>ul>li a{color:#666;padding:6px 10px;display:block;-webkit-transition:background-color 500ms ease-out;-moz-transition:background-color 500ms ease-out;transition:background-color 500ms ease-out}.editormd-html-preview .editormd-toc-menu>.markdown-toc li,.editormd-preview-container .editormd-toc-menu>.markdown-toc li{position:relative}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul{position:absolute;top:32px;left:10%;display:none;-webkit-box-shadow:0 3px 5px rgba(0,0,0,.2);-moz-box-shadow:0 3px 5px rgba(0,0,0,.2);-ms-box-shadow:0 3px 5px rgba(0,0,0,.2);-o-box-shadow:0 3px 5px rgba(0,0,0,.2);box-shadow:0 3px 5px rgba(0,0,0,.2)}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{pointer-events:pointer-events;position:absolute;left:15px;top:-6px;display:block;content:"";width:0;height:0;border:6px solid transparent;border-width:0 6px 6px;z-index:10}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:before,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:before{border-bottom-color:#ccc}.editormd-html-preview .editormd-toc-menu>.markdown-toc li>ul:after,.editormd-preview-container .editormd-toc-menu>.markdown-toc li>ul:after{border-bottom-color:#fff;top:-5px}.editormd-html-preview .editormd-toc-menu ul,.editormd-preview-container .editormd-toc-menu ul{list-style:none}.editormd-html-preview .editormd-toc-menu a,.editormd-preview-container .editormd-toc-menu a{text-decoration:none}.editormd-html-preview .editormd-toc-menu h1,.editormd-preview-container .editormd-toc-menu h1{font-size:16px;padding:5px 0 10px 10px;line-height:1;border-bottom:1px solid #eee}.editormd-html-preview .editormd-toc-menu h1 .fa,.editormd-preview-container .editormd-toc-menu h1 .fa{padding-left:10px}.editormd-html-preview .editormd-toc-menu .toc-menu-btn,.editormd-preview-container .editormd-toc-menu .toc-menu-btn{color:#666;min-width:180px;padding:5px 10px;border-radius:4px;display:inline-block;-webkit-transition:background-color 500ms ease-out;-moz-transition:background-color 500ms ease-out;transition:background-color 500ms ease-out}.editormd-html-preview .editormd-toc-menu .toc-menu-btn .fa,.editormd-preview-container .editormd-toc-menu .toc-menu-btn .fa{float:right;padding:3px 0 0 10px;font-size:1.3em}.markdown-body .editormd-toc-menu ul{padding-left:0}.markdown-body .highlight pre,.markdown-body pre{line-height:1.6}hr.editormd-page-break{border:1px dotted #ccc;font-size:0;height:2px}@media only print{hr.editormd-page-break{background:0 0;border:none;height:0}}.editormd-html-preview textarea{display:none}.editormd-html-preview hr.editormd-page-break{background:0 0;border:none;height:0}.editormd-preview-close-btn{color:#fff;padding:4px 6px;font-size:18px;-webkit-border-radius:500px;-moz-border-radius:500px;-ms-border-radius:500px;-o-border-radius:500px;border-radius:500px;display:none;background-color:#ccc;position:absolute;top:25px;right:35px;z-index:19;-webkit-transition:background-color 300ms ease-out;-moz-transition:background-color 300ms ease-out;transition:background-color 300ms ease-out}.editormd-preview-close-btn:hover{background-color:#999}.editormd-preview-active{width:100%;padding:40px} \ No newline at end of file diff --git a/static/editor.md/editormd.amd.js b/static/editor.md/editormd.amd.js new file mode 100644 index 0000000..3127705 --- /dev/null +++ b/static/editor.md/editormd.amd.js @@ -0,0 +1,4667 @@ +/* + * Editor.md + * + * @file editormd.amd.js + * @version v1.5.0 + * @description Open source online markdown editor. + * @license MIT License + * @author Pandao + * {@link https://github.com/pandao/editor.md} + * @updateTime 2015-06-09 + */ + +;(function(factory) { + "use strict"; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) // for Require.js + { + var cmModePath = "./lib/codemirror/mode/"; + var cmAddonPath = "./lib/codemirror/addon/"; + + var codeMirrorModules = [ + "jquery", "marked", "prettify", + "katex", "raphael", "underscore", "flowchart", "jqueryflowchart", "sequenceDiagram", + + "./lib/codemirror/lib/codemirror", + cmModePath + "css/css", + cmModePath + "sass/sass", + cmModePath + "shell/shell", + cmModePath + "sql/sql", + cmModePath + "clike/clike", + cmModePath + "php/php", + cmModePath + "xml/xml", + cmModePath + "markdown/markdown", + cmModePath + "javascript/javascript", + cmModePath + "htmlmixed/htmlmixed", + cmModePath + "gfm/gfm", + cmModePath + "http/http", + cmModePath + "go/go", + cmModePath + "dart/dart", + cmModePath + "coffeescript/coffeescript", + cmModePath + "nginx/nginx", + cmModePath + "python/python", + cmModePath + "perl/perl", + cmModePath + "lua/lua", + cmModePath + "r/r", + cmModePath + "ruby/ruby", + cmModePath + "rst/rst", + cmModePath + "smartymixed/smartymixed", + cmModePath + "vb/vb", + cmModePath + "vbscript/vbscript", + cmModePath + "velocity/velocity", + cmModePath + "xquery/xquery", + cmModePath + "yaml/yaml", + cmModePath + "erlang/erlang", + cmModePath + "jade/jade", + + cmAddonPath + "edit/trailingspace", + cmAddonPath + "dialog/dialog", + cmAddonPath + "search/searchcursor", + cmAddonPath + "search/search", + cmAddonPath + "scroll/annotatescrollbar", + cmAddonPath + "search/matchesonscrollbar", + cmAddonPath + "display/placeholder", + cmAddonPath + "edit/closetag", + cmAddonPath + "fold/foldcode", + cmAddonPath + "fold/foldgutter", + cmAddonPath + "fold/indent-fold", + cmAddonPath + "fold/brace-fold", + cmAddonPath + "fold/xml-fold", + cmAddonPath + "fold/markdown-fold", + cmAddonPath + "fold/comment-fold", + cmAddonPath + "mode/overlay", + cmAddonPath + "selection/active-line", + cmAddonPath + "edit/closebrackets", + cmAddonPath + "display/fullscreen", + cmAddonPath + "search/match-highlighter" + ]; + + define(codeMirrorModules, factory); + } + else + { + define(["jquery"], factory); // for Sea.js + } + } + else + { + window.editormd = factory(); + } + +}(function() { + + if (typeof define == "function" && define.amd) { + $ = arguments[0]; + marked = arguments[1]; + prettify = arguments[2]; + katex = arguments[3]; + Raphael = arguments[4]; + _ = arguments[5]; + flowchart = arguments[6]; + CodeMirror = arguments[9]; + } + + "use strict"; + + var $ = (typeof (jQuery) !== "undefined") ? jQuery : Zepto; + + if (typeof ($) === "undefined") { + return ; + } + + /** + * editormd + * + * @param {String} id 编辑器的ID + * @param {Object} options 配置选项 Key/Value + * @returns {Object} editormd 返回editormd对象 + */ + + var editormd = function (id, options) { + return new editormd.fn.init(id, options); + }; + + editormd.title = editormd.$name = "Editor.md"; + editormd.version = "1.5.0"; + editormd.homePage = "https://pandao.github.io/editor.md/"; + editormd.classPrefix = "editormd-"; + + editormd.toolbarModes = { + full : [ + "undo", "redo", "|", + "bold", "del", "italic", "quote", "ucwords", "uppercase", "lowercase", "|", + "h1", "h2", "h3", "h4", "h5", "h6", "|", + "list-ul", "list-ol", "hr", "|", + "link", "reference-link", "image", "code", "preformatted-text", "code-block", "table", "datetime", "emoji", "html-entities", "pagebreak", "|", + "goto-line", "watch", "preview", "fullscreen", "clear", "search", "|", + "help", "info" + ], + simple : [ + "undo", "redo", "|", + "bold", "del", "italic", "quote", "uppercase", "lowercase", "|", + "h1", "h2", "h3", "h4", "h5", "h6", "|", + "list-ul", "list-ol", "hr", "|", + "watch", "preview", "fullscreen", "|", + "help", "info" + ], + mini : [ + "undo", "redo", "|", + "watch", "preview", "|", + "help", "info" + ] + }; + + editormd.defaults = { + mode : "gfm", //gfm or markdown + name : "", // Form element name + value : "", // value for CodeMirror, if mode not gfm/markdown + theme : "", // Editor.md self themes, before v1.5.0 is CodeMirror theme, default empty + editorTheme : "default", // Editor area, this is CodeMirror theme at v1.5.0 + previewTheme : "", // Preview area theme, default empty + markdown : "", // Markdown source code + appendMarkdown : "", // if in init textarea value not empty, append markdown to textarea + width : "100%", + height : "100%", + path : "./lib/", // Dependents module file directory + pluginPath : "", // If this empty, default use settings.path + "../plugins/" + delay : 300, // Delay parse markdown to html, Uint : ms + autoLoadModules : true, // Automatic load dependent module files + watch : true, + placeholder : "Enjoy Markdown! coding now...", + gotoLine : true, + codeFold : false, + autoHeight : false, + autoFocus : true, + autoCloseTags : true, + searchReplace : true, + syncScrolling : true, // true | false | "single", default true + readOnly : false, + tabSize : 4, + indentUnit : 4, + lineNumbers : true, + lineWrapping : true, + autoCloseBrackets : true, + showTrailingSpace : true, + matchBrackets : true, + indentWithTabs : true, + styleSelectedText : true, + matchWordHighlight : true, // options: true, false, "onselected" + styleActiveLine : true, // Highlight the current line + dialogLockScreen : true, + dialogShowMask : true, + dialogDraggable : true, + dialogMaskBgColor : "#fff", + dialogMaskOpacity : 0.1, + fontSize : "13px", + saveHTMLToTextarea : false, + disabledKeyMaps : [], + + onload : function() {}, + onresize : function() {}, + onchange : function() {}, + onwatch : null, + onunwatch : null, + onpreviewing : function() {}, + onpreviewed : function() {}, + onfullscreen : function() {}, + onfullscreenExit : function() {}, + onscroll : function() {}, + onpreviewscroll : function() {}, + + imageUpload : false, + imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"], + imageUploadURL : "", + crossDomainUpload : false, + uploadCallbackURL : "", + + toc : true, // Table of contents + tocm : false, // Using [TOCM], auto create ToC dropdown menu + tocTitle : "", // for ToC dropdown menu btn + tocDropdown : false, + tocContainer : "", + tocStartLevel : 1, // Said from H1 to create ToC + htmlDecode : false, // Open the HTML tag identification + pageBreak : true, // Enable parse page break [========] + atLink : true, // for @link + emailLink : true, // for email address auto link + taskList : false, // Enable Github Flavored Markdown task lists + emoji : false, // :emoji: , Support Github emoji, Twitter Emoji (Twemoji); + // Support FontAwesome icon emoji :fa-xxx: > Using fontAwesome icon web fonts; + // Support Editor.md logo icon emoji :editormd-logo: :editormd-logo-1x: > 1~8x; + tex : false, // TeX(LaTeX), based on KaTeX + flowChart : false, // flowChart.js only support IE9+ + sequenceDiagram : false, // sequenceDiagram.js only support IE9+ + previewCodeHighlight : true, + + toolbar : true, // show/hide toolbar + toolbarAutoFixed : true, // on window scroll auto fixed position + toolbarIcons : "full", + toolbarTitles : {}, + toolbarHandlers : { + ucwords : function() { + return editormd.toolbarHandlers.ucwords; + }, + lowercase : function() { + return editormd.toolbarHandlers.lowercase; + } + }, + toolbarCustomIcons : { // using html tag create toolbar icon, unused default tag. + lowercase : "a", + "ucwords" : "Aa" + }, + toolbarIconsClass : { + undo : "fa-undo", + redo : "fa-repeat", + bold : "fa-bold", + del : "fa-strikethrough", + italic : "fa-italic", + quote : "fa-quote-left", + uppercase : "fa-font", + h1 : editormd.classPrefix + "bold", + h2 : editormd.classPrefix + "bold", + h3 : editormd.classPrefix + "bold", + h4 : editormd.classPrefix + "bold", + h5 : editormd.classPrefix + "bold", + h6 : editormd.classPrefix + "bold", + "list-ul" : "fa-list-ul", + "list-ol" : "fa-list-ol", + hr : "fa-minus", + link : "fa-link", + "reference-link" : "fa-anchor", + image : "fa-picture-o", + code : "fa-code", + "preformatted-text" : "fa-file-code-o", + "code-block" : "fa-file-code-o", + table : "fa-table", + datetime : "fa-clock-o", + emoji : "fa-smile-o", + "html-entities" : "fa-copyright", + pagebreak : "fa-newspaper-o", + "goto-line" : "fa-terminal", // fa-crosshairs + watch : "fa-eye-slash", + unwatch : "fa-eye", + preview : "fa-desktop", + search : "fa-search", + fullscreen : "fa-arrows-alt", + clear : "fa-eraser", + help : "fa-question-circle", + info : "fa-info-circle" + }, + toolbarIconTexts : {}, + + lang : { + name : "zh-cn", + description : "开源在线Markdown编辑器
Open source online Markdown editor.", + tocTitle : "目录", + toolbar : { + undo : "撤销(Ctrl+Z)", + redo : "重做(Ctrl+Y)", + bold : "粗体", + del : "删除线", + italic : "斜体", + quote : "引用", + ucwords : "将每个单词首字母转成大写", + uppercase : "将所选转换成大写", + lowercase : "将所选转换成小写", + h1 : "标题1", + h2 : "标题2", + h3 : "标题3", + h4 : "标题4", + h5 : "标题5", + h6 : "标题6", + "list-ul" : "无序列表", + "list-ol" : "有序列表", + hr : "横线", + link : "链接", + "reference-link" : "引用链接", + image : "添加图片", + code : "行内代码", + "preformatted-text" : "预格式文本 / 代码块(缩进风格)", + "code-block" : "代码块(多语言风格)", + table : "添加表格", + datetime : "日期时间", + emoji : "Emoji表情", + "html-entities" : "HTML实体字符", + pagebreak : "插入分页符", + "goto-line" : "跳转到行", + watch : "关闭实时预览", + unwatch : "开启实时预览", + preview : "全窗口预览HTML(按 Shift + ESC还原)", + fullscreen : "全屏(按ESC还原)", + clear : "清空", + search : "搜索", + help : "使用帮助", + info : "关于" + editormd.title + }, + buttons : { + enter : "确定", + cancel : "取消", + close : "关闭" + }, + dialog : { + link : { + title : "添加链接", + url : "链接地址", + urlTitle : "链接标题", + urlEmpty : "错误:请填写链接地址。" + }, + referenceLink : { + title : "添加引用链接", + name : "引用名称", + url : "链接地址", + urlId : "链接ID", + urlTitle : "链接标题", + nameEmpty: "错误:引用链接的名称不能为空。", + idEmpty : "错误:请填写引用链接的ID。", + urlEmpty : "错误:请填写引用链接的URL地址。" + }, + image : { + title : "添加图片", + url : "图片地址", + link : "图片链接", + alt : "图片描述", + uploadButton : "本地上传", + imageURLEmpty : "错误:图片地址不能为空。", + uploadFileEmpty : "错误:上传的图片不能为空。", + formatNotAllowed : "错误:只允许上传图片文件,允许上传的图片文件格式有:" + }, + preformattedText : { + title : "添加预格式文本或代码块", + emptyAlert : "错误:请填写预格式文本或代码的内容。" + }, + codeBlock : { + title : "添加代码块", + selectLabel : "代码语言:", + selectDefaultText : "请选择代码语言", + otherLanguage : "其他语言", + unselectedLanguageAlert : "错误:请选择代码所属的语言类型。", + codeEmptyAlert : "错误:请填写代码内容。" + }, + htmlEntities : { + title : "HTML 实体字符" + }, + help : { + title : "使用帮助" + } + } + } + }; + + editormd.classNames = { + tex : editormd.classPrefix + "tex" + }; + + editormd.dialogZindex = 99999; + + editormd.$katex = null; + editormd.$marked = null; + editormd.$CodeMirror = null; + editormd.$prettyPrint = null; + + var timer, flowchartTimer; + + editormd.prototype = editormd.fn = { + state : { + watching : false, + loaded : false, + preview : false, + fullscreen : false + }, + + /** + * 构造函数/实例初始化 + * Constructor / instance initialization + * + * @param {String} id 编辑器的ID + * @param {Object} [options={}] 配置选项 Key/Value + * @returns {editormd} 返回editormd的实例对象 + */ + + init : function (id, options) { + + options = options || {}; + + if (typeof id === "object") + { + options = id; + } + + var _this = this; + var classPrefix = this.classPrefix = editormd.classPrefix; + var settings = this.settings = $.extend(true, editormd.defaults, options); + + id = (typeof id === "object") ? settings.id : id; + + var editor = this.editor = $("#" + id); + + this.id = id; + this.lang = settings.lang; + + var classNames = this.classNames = { + textarea : { + html : classPrefix + "html-textarea", + markdown : classPrefix + "markdown-textarea" + } + }; + + settings.pluginPath = (settings.pluginPath === "") ? settings.path + "../plugins/" : settings.pluginPath; + + this.state.watching = (settings.watch) ? true : false; + + if ( !editor.hasClass("editormd") ) { + editor.addClass("editormd"); + } + + editor.css({ + width : (typeof settings.width === "number") ? settings.width + "px" : settings.width, + height : (typeof settings.height === "number") ? settings.height + "px" : settings.height + }); + + if (settings.autoHeight) + { + editor.css("height", "auto"); + } + + var markdownTextarea = this.markdownTextarea = editor.children("textarea"); + + if (markdownTextarea.length < 1) + { + editor.append(""); + markdownTextarea = this.markdownTextarea = editor.children("textarea"); + } + + markdownTextarea.addClass(classNames.textarea.markdown).attr("placeholder", settings.placeholder); + + if (typeof markdownTextarea.attr("name") === "undefined" || markdownTextarea.attr("name") === "") + { + markdownTextarea.attr("name", (settings.name !== "") ? settings.name : id + "-markdown-doc"); + } + + var appendElements = [ + (!settings.readOnly) ? "" : "", + ( (settings.saveHTMLToTextarea) ? "" : "" ), + "
", + "
", + "
" + ].join("\n"); + + editor.append(appendElements).addClass(classPrefix + "vertical"); + + if (settings.theme !== "") + { + editor.addClass(classPrefix + "theme-" + settings.theme); + } + + this.mask = editor.children("." + classPrefix + "mask"); + this.containerMask = editor.children("." + classPrefix + "container-mask"); + + if (settings.markdown !== "") + { + markdownTextarea.val(settings.markdown); + } + + if (settings.appendMarkdown !== "") + { + markdownTextarea.val(markdownTextarea.val() + settings.appendMarkdown); + } + + this.htmlTextarea = editor.children("." + classNames.textarea.html); + this.preview = editor.children("." + classPrefix + "preview"); + this.previewContainer = this.preview.children("." + classPrefix + "preview-container"); + + if (settings.previewTheme !== "") + { + this.preview.addClass(classPrefix + "preview-theme-" + settings.previewTheme); + } + + if (typeof define === "function" && define.amd) + { + if (typeof katex !== "undefined") + { + editormd.$katex = katex; + } + + if (settings.searchReplace && !settings.readOnly) + { + editormd.loadCSS(settings.path + "codemirror/addon/dialog/dialog"); + editormd.loadCSS(settings.path + "codemirror/addon/search/matchesonscrollbar"); + } + } + + if ((typeof define === "function" && define.amd) || !settings.autoLoadModules) + { + if (typeof CodeMirror !== "undefined") { + editormd.$CodeMirror = CodeMirror; + } + + if (typeof marked !== "undefined") { + editormd.$marked = marked; + } + + this.setCodeMirror().setToolbar().loadedDisplay(); + } + else + { + this.loadQueues(); + } + + return this; + }, + + /** + * 所需组件加载队列 + * Required components loading queue + * + * @returns {editormd} 返回editormd的实例对象 + */ + + loadQueues : function() { + var _this = this; + var settings = this.settings; + var loadPath = settings.path; + + var loadFlowChartOrSequenceDiagram = function() { + + if (editormd.isIE8) + { + _this.loadedDisplay(); + + return ; + } + + if (settings.flowChart || settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "raphael.min", function() { + + editormd.loadScript(loadPath + "underscore.min", function() { + + if (!settings.flowChart && settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "sequence-diagram.min", function() { + _this.loadedDisplay(); + }); + } + else if (settings.flowChart && !settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "flowchart.min", function() { + editormd.loadScript(loadPath + "jquery.flowchart.min", function() { + _this.loadedDisplay(); + }); + }); + } + else if (settings.flowChart && settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "flowchart.min", function() { + editormd.loadScript(loadPath + "jquery.flowchart.min", function() { + editormd.loadScript(loadPath + "sequence-diagram.min", function() { + _this.loadedDisplay(); + }); + }); + }); + } + }); + + }); + } + else + { + _this.loadedDisplay(); + } + }; + + editormd.loadCSS(loadPath + "codemirror/codemirror.min"); + + if (settings.searchReplace && !settings.readOnly) + { + editormd.loadCSS(loadPath + "codemirror/addon/dialog/dialog"); + editormd.loadCSS(loadPath + "codemirror/addon/search/matchesonscrollbar"); + } + + if (settings.codeFold) + { + editormd.loadCSS(loadPath + "codemirror/addon/fold/foldgutter"); + } + + editormd.loadScript(loadPath + "codemirror/codemirror.min", function() { + editormd.$CodeMirror = CodeMirror; + + editormd.loadScript(loadPath + "codemirror/modes.min", function() { + + editormd.loadScript(loadPath + "codemirror/addons.min", function() { + + _this.setCodeMirror(); + + if (settings.mode !== "gfm" && settings.mode !== "markdown") + { + _this.loadedDisplay(); + + return false; + } + + _this.setToolbar(); + + editormd.loadScript(loadPath + "marked.min", function() { + + editormd.$marked = marked; + + if (settings.previewCodeHighlight) + { + editormd.loadScript(loadPath + "prettify.min", function() { + loadFlowChartOrSequenceDiagram(); + }); + } + else + { + loadFlowChartOrSequenceDiagram(); + } + }); + + }); + + }); + + }); + + return this; + }, + + /** + * 设置 Editor.md 的整体主题,主要是工具栏 + * Setting Editor.md theme + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setTheme : function(theme) { + var editor = this.editor; + var oldTheme = this.settings.theme; + var themePrefix = this.classPrefix + "theme-"; + + editor.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme); + + this.settings.theme = theme; + + return this; + }, + + /** + * 设置 CodeMirror(编辑区)的主题 + * Setting CodeMirror (Editor area) theme + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setEditorTheme : function(theme) { + var settings = this.settings; + settings.editorTheme = theme; + + if (theme !== "default") + { + editormd.loadCSS(settings.path + "codemirror/theme/" + settings.editorTheme); + } + + this.cm.setOption("theme", theme); + + return this; + }, + + /** + * setEditorTheme() 的别名 + * setEditorTheme() alias + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setCodeMirrorTheme : function (theme) { + this.setEditorTheme(theme); + + return this; + }, + + /** + * 设置 Editor.md 的主题 + * Setting Editor.md theme + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setPreviewTheme : function(theme) { + var preview = this.preview; + var oldTheme = this.settings.previewTheme; + var themePrefix = this.classPrefix + "preview-theme-"; + + preview.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme); + + this.settings.previewTheme = theme; + + return this; + }, + + /** + * 配置和初始化CodeMirror组件 + * CodeMirror initialization + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setCodeMirror : function() { + var settings = this.settings; + var editor = this.editor; + + if (settings.editorTheme !== "default") + { + editormd.loadCSS(settings.path + "codemirror/theme/" + settings.editorTheme); + } + + var codeMirrorConfig = { + mode : settings.mode, + theme : settings.editorTheme, + tabSize : settings.tabSize, + dragDrop : false, + autofocus : settings.autoFocus, + autoCloseTags : settings.autoCloseTags, + readOnly : (settings.readOnly) ? "nocursor" : false, + indentUnit : settings.indentUnit, + lineNumbers : settings.lineNumbers, + lineWrapping : settings.lineWrapping, + extraKeys : { + "Ctrl-Q": function(cm) { + cm.foldCode(cm.getCursor()); + } + }, + foldGutter : settings.codeFold, + gutters : ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + matchBrackets : settings.matchBrackets, + indentWithTabs : settings.indentWithTabs, + styleActiveLine : settings.styleActiveLine, + styleSelectedText : settings.styleSelectedText, + autoCloseBrackets : settings.autoCloseBrackets, + showTrailingSpace : settings.showTrailingSpace, + highlightSelectionMatches : ( (!settings.matchWordHighlight) ? false : { showToken: (settings.matchWordHighlight === "onselected") ? false : /\w/ } ) + }; + + this.codeEditor = this.cm = editormd.$CodeMirror.fromTextArea(this.markdownTextarea[0], codeMirrorConfig); + this.codeMirror = this.cmElement = editor.children(".CodeMirror"); + + if (settings.value !== "") + { + this.cm.setValue(settings.value); + } + + this.codeMirror.css({ + fontSize : settings.fontSize, + width : (!settings.watch) ? "100%" : "50%" + }); + + if (settings.autoHeight) + { + this.codeMirror.css("height", "auto"); + this.cm.setOption("viewportMargin", Infinity); + } + + if (!settings.lineNumbers) + { + this.codeMirror.find(".CodeMirror-gutters").css("border-right", "none"); + } + + return this; + }, + + /** + * 获取CodeMirror的配置选项 + * Get CodeMirror setting options + * + * @returns {Mixed} return CodeMirror setting option value + */ + + getCodeMirrorOption : function(key) { + return this.cm.getOption(key); + }, + + /** + * 配置和重配置CodeMirror的选项 + * CodeMirror setting options / resettings + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setCodeMirrorOption : function(key, value) { + + this.cm.setOption(key, value); + + return this; + }, + + /** + * 添加 CodeMirror 键盘快捷键 + * Add CodeMirror keyboard shortcuts key map + * + * @returns {editormd} 返回editormd的实例对象 + */ + + addKeyMap : function(map, bottom) { + this.cm.addKeyMap(map, bottom); + + return this; + }, + + /** + * 移除 CodeMirror 键盘快捷键 + * Remove CodeMirror keyboard shortcuts key map + * + * @returns {editormd} 返回editormd的实例对象 + */ + + removeKeyMap : function(map) { + this.cm.removeKeyMap(map); + + return this; + }, + + /** + * 跳转到指定的行 + * Goto CodeMirror line + * + * @param {String|Intiger} line line number or "first"|"last" + * @returns {editormd} 返回editormd的实例对象 + */ + + gotoLine : function (line) { + + var settings = this.settings; + + if (!settings.gotoLine) + { + return this; + } + + var cm = this.cm; + var editor = this.editor; + var count = cm.lineCount(); + var preview = this.preview; + + if (typeof line === "string") + { + if(line === "last") + { + line = count; + } + + if (line === "first") + { + line = 1; + } + } + + if (typeof line !== "number") + { + alert("Error: The line number must be an integer."); + return this; + } + + line = parseInt(line) - 1; + + if (line > count) + { + alert("Error: The line number range 1-" + count); + + return this; + } + + cm.setCursor( {line : line, ch : 0} ); + + var scrollInfo = cm.getScrollInfo(); + var clientHeight = scrollInfo.clientHeight; + var coords = cm.charCoords({line : line, ch : 0}, "local"); + + cm.scrollTo(null, (coords.top + coords.bottom - clientHeight) / 2); + + if (settings.watch) + { + var cmScroll = this.codeMirror.find(".CodeMirror-scroll")[0]; + var height = $(cmScroll).height(); + var scrollTop = cmScroll.scrollTop; + var percent = (scrollTop / cmScroll.scrollHeight); + + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= cmScroll.scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop(preview[0].scrollHeight * percent); + } + } + + cm.focus(); + + return this; + }, + + /** + * 扩展当前实例对象,可同时设置多个或者只设置一个 + * Extend editormd instance object, can mutil setting. + * + * @returns {editormd} this(editormd instance object.) + */ + + extend : function() { + if (typeof arguments[1] !== "undefined") + { + if (typeof arguments[1] === "function") + { + arguments[1] = $.proxy(arguments[1], this); + } + + this[arguments[0]] = arguments[1]; + } + + if (typeof arguments[0] === "object" && typeof arguments[0].length === "undefined") + { + $.extend(true, this, arguments[0]); + } + + return this; + }, + + /** + * 设置或扩展当前实例对象,单个设置 + * Extend editormd instance object, one by one + * + * @param {String|Object} key option key + * @param {String|Object} value option value + * @returns {editormd} this(editormd instance object.) + */ + + set : function (key, value) { + + if (typeof value !== "undefined" && typeof value === "function") + { + value = $.proxy(value, this); + } + + this[key] = value; + + return this; + }, + + /** + * 重新配置 + * Resetting editor options + * + * @param {String|Object} key option key + * @param {String|Object} value option value + * @returns {editormd} this(editormd instance object.) + */ + + config : function(key, value) { + var settings = this.settings; + + if (typeof key === "object") + { + settings = $.extend(true, settings, key); + } + + if (typeof key === "string") + { + settings[key] = value; + } + + this.settings = settings; + this.recreate(); + + return this; + }, + + /** + * 注册事件处理方法 + * Bind editor event handle + * + * @param {String} eventType event type + * @param {Function} callback 回调函数 + * @returns {editormd} this(editormd instance object.) + */ + + on : function(eventType, callback) { + var settings = this.settings; + + if (typeof settings["on" + eventType] !== "undefined") + { + settings["on" + eventType] = $.proxy(callback, this); + } + + return this; + }, + + /** + * 解除事件处理方法 + * Unbind editor event handle + * + * @param {String} eventType event type + * @returns {editormd} this(editormd instance object.) + */ + + off : function(eventType) { + var settings = this.settings; + + if (typeof settings["on" + eventType] !== "undefined") + { + settings["on" + eventType] = function(){}; + } + + return this; + }, + + /** + * 显示工具栏 + * Display toolbar + * + * @param {Function} [callback=function(){}] 回调函数 + * @returns {editormd} 返回editormd的实例对象 + */ + + showToolbar : function(callback) { + var settings = this.settings; + + if(settings.readOnly) { + return this; + } + + if (settings.toolbar && (this.toolbar.length < 1 || this.toolbar.find("." + this.classPrefix + "menu").html() === "") ) + { + this.setToolbar(); + } + + settings.toolbar = true; + + this.toolbar.show(); + this.resize(); + + $.proxy(callback || function(){}, this)(); + + return this; + }, + + /** + * 隐藏工具栏 + * Hide toolbar + * + * @param {Function} [callback=function(){}] 回调函数 + * @returns {editormd} this(editormd instance object.) + */ + + hideToolbar : function(callback) { + var settings = this.settings; + + settings.toolbar = false; + this.toolbar.hide(); + this.resize(); + + $.proxy(callback || function(){}, this)(); + + return this; + }, + + /** + * 页面滚动时工具栏的固定定位 + * Set toolbar in window scroll auto fixed position + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setToolbarAutoFixed : function(fixed) { + + var state = this.state; + var editor = this.editor; + var toolbar = this.toolbar; + var settings = this.settings; + + if (typeof fixed !== "undefined") + { + settings.toolbarAutoFixed = fixed; + } + + var autoFixedHandle = function(){ + var $window = $(window); + var top = $window.scrollTop(); + + if (!settings.toolbarAutoFixed) + { + return false; + } + + if (top - editor.offset().top > 10 && top < editor.height()) + { + toolbar.css({ + position : "fixed", + width : editor.width() + "px", + left : ($window.width() - editor.width()) / 2 + "px" + }); + } + else + { + toolbar.css({ + position : "absolute", + width : "100%", + left : 0 + }); + } + }; + + if (!state.fullscreen && !state.preview && settings.toolbar && settings.toolbarAutoFixed) + { + $(window).bind("scroll", autoFixedHandle); + } + + return this; + }, + + /** + * 配置和初始化工具栏 + * Set toolbar and Initialization + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setToolbar : function() { + var settings = this.settings; + + if(settings.readOnly) { + return this; + } + + var editor = this.editor; + var preview = this.preview; + var classPrefix = this.classPrefix; + + var toolbar = this.toolbar = editor.children("." + classPrefix + "toolbar"); + + if (settings.toolbar && toolbar.length < 1) + { + var toolbarHTML = "
    "; + + editor.append(toolbarHTML); + toolbar = this.toolbar = editor.children("." + classPrefix + "toolbar"); + } + + if (!settings.toolbar) + { + toolbar.hide(); + + return this; + } + + toolbar.show(); + + var icons = (typeof settings.toolbarIcons === "function") ? settings.toolbarIcons() + : ((typeof settings.toolbarIcons === "string") ? editormd.toolbarModes[settings.toolbarIcons] : settings.toolbarIcons); + + var toolbarMenu = toolbar.find("." + this.classPrefix + "menu"), menu = ""; + var pullRight = false; + + for (var i = 0, len = icons.length; i < len; i++) + { + var name = icons[i]; + + if (name === "||") + { + pullRight = true; + } + else if (name === "|") + { + menu += "
  • |
  • "; + } + else + { + var isHeader = (/h(\d)/.test(name)); + var index = name; + + if (name === "watch" && !settings.watch) { + index = "unwatch"; + } + + var title = settings.lang.toolbar[index]; + var iconTexts = settings.toolbarIconTexts[index]; + var iconClass = settings.toolbarIconsClass[index]; + + title = (typeof title === "undefined") ? "" : title; + iconTexts = (typeof iconTexts === "undefined") ? "" : iconTexts; + iconClass = (typeof iconClass === "undefined") ? "" : iconClass; + + var menuItem = pullRight ? "
  • " : "
  • "; + + if (typeof settings.toolbarCustomIcons[name] !== "undefined" && typeof settings.toolbarCustomIcons[name] !== "function") + { + menuItem += settings.toolbarCustomIcons[name]; + } + else + { + menuItem += ""; + menuItem += ""+((isHeader) ? name.toUpperCase() : ( (iconClass === "") ? iconTexts : "") ) + ""; + menuItem += ""; + } + + menuItem += "
  • "; + + menu = pullRight ? menuItem + menu : menu + menuItem; + } + } + + toolbarMenu.html(menu); + + toolbarMenu.find("[title=\"Lowercase\"]").attr("title", settings.lang.toolbar.lowercase); + toolbarMenu.find("[title=\"ucwords\"]").attr("title", settings.lang.toolbar.ucwords); + + this.setToolbarHandler(); + this.setToolbarAutoFixed(); + + return this; + }, + + /** + * 工具栏图标事件处理对象序列 + * Get toolbar icons event handlers + * + * @param {Object} cm CodeMirror的实例对象 + * @param {String} name 要获取的事件处理器名称 + * @returns {Object} 返回处理对象序列 + */ + + dialogLockScreen : function() { + $.proxy(editormd.dialogLockScreen, this)(); + + return this; + }, + + dialogShowMask : function(dialog) { + $.proxy(editormd.dialogShowMask, this)(dialog); + + return this; + }, + + getToolbarHandles : function(name) { + var toolbarHandlers = this.toolbarHandlers = editormd.toolbarHandlers; + + return (name && typeof toolbarIconHandlers[name] !== "undefined") ? toolbarHandlers[name] : toolbarHandlers; + }, + + /** + * 工具栏图标事件处理器 + * Bind toolbar icons event handle + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setToolbarHandler : function() { + var _this = this; + var settings = this.settings; + + if (!settings.toolbar || settings.readOnly) { + return this; + } + + var toolbar = this.toolbar; + var cm = this.cm; + var classPrefix = this.classPrefix; + var toolbarIcons = this.toolbarIcons = toolbar.find("." + classPrefix + "menu > li > a"); + var toolbarIconHandlers = this.getToolbarHandles(); + + toolbarIcons.bind(editormd.mouseOrTouch("click", "touchend"), function(event) { + + var icon = $(this).children(".fa"); + var name = icon.attr("name"); + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (name === "") { + return ; + } + + _this.activeIcon = icon; + + if (typeof toolbarIconHandlers[name] !== "undefined") + { + $.proxy(toolbarIconHandlers[name], _this)(cm); + } + else + { + if (typeof settings.toolbarHandlers[name] !== "undefined") + { + $.proxy(settings.toolbarHandlers[name], _this)(cm, icon, cursor, selection); + } + } + + if (name !== "link" && name !== "reference-link" && name !== "image" && name !== "code-block" && + name !== "preformatted-text" && name !== "watch" && name !== "preview" && name !== "search" && name !== "fullscreen" && name !== "info") + { + cm.focus(); + } + + return false; + + }); + + return this; + }, + + /** + * 动态创建对话框 + * Creating custom dialogs + * + * @param {Object} options 配置项键值对 Key/Value + * @returns {dialog} 返回创建的dialog的jQuery实例对象 + */ + + createDialog : function(options) { + return $.proxy(editormd.createDialog, this)(options); + }, + + /** + * 创建关于Editor.md的对话框 + * Create about Editor.md dialog + * + * @returns {editormd} 返回editormd的实例对象 + */ + + createInfoDialog : function() { + var _this = this; + var editor = this.editor; + var classPrefix = this.classPrefix; + + var infoDialogHTML = [ + "
    ", + "
    ", + "

    " + editormd.title + "v" + editormd.version + "

    ", + "

    " + this.lang.description + "

    ", + "

    " + editormd.homePage + "

    ", + "

    Copyright © 2015 Pandao, The MIT License.

    ", + "
    ", + "", + "
    " + ].join("\n"); + + editor.append(infoDialogHTML); + + var infoDialog = this.infoDialog = editor.children("." + classPrefix + "dialog-info"); + + infoDialog.find("." + classPrefix + "dialog-close").bind(editormd.mouseOrTouch("click", "touchend"), function() { + _this.hideInfoDialog(); + }); + + infoDialog.css("border", (editormd.isIE8) ? "1px solid #ddd" : "").css("z-index", editormd.dialogZindex).show(); + + this.infoDialogPosition(); + + return this; + }, + + /** + * 关于Editor.md对话居中定位 + * Editor.md dialog position handle + * + * @returns {editormd} 返回editormd的实例对象 + */ + + infoDialogPosition : function() { + var infoDialog = this.infoDialog; + + var _infoDialogPosition = function() { + infoDialog.css({ + top : ($(window).height() - infoDialog.height()) / 2 + "px", + left : ($(window).width() - infoDialog.width()) / 2 + "px" + }); + }; + + _infoDialogPosition(); + + $(window).resize(_infoDialogPosition); + + return this; + }, + + /** + * 显示关于Editor.md + * Display about Editor.md dialog + * + * @returns {editormd} 返回editormd的实例对象 + */ + + showInfoDialog : function() { + + $("html,body").css("overflow-x", "hidden"); + + var _this = this; + var editor = this.editor; + var settings = this.settings; + var infoDialog = this.infoDialog = editor.children("." + this.classPrefix + "dialog-info"); + + if (infoDialog.length < 1) + { + this.createInfoDialog(); + } + + this.lockScreen(true); + + this.mask.css({ + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }).show(); + + infoDialog.css("z-index", editormd.dialogZindex).show(); + + this.infoDialogPosition(); + + return this; + }, + + /** + * 隐藏关于Editor.md + * Hide about Editor.md dialog + * + * @returns {editormd} 返回editormd的实例对象 + */ + + hideInfoDialog : function() { + $("html,body").css("overflow-x", ""); + this.infoDialog.hide(); + this.mask.hide(); + this.lockScreen(false); + + return this; + }, + + /** + * 锁屏 + * lock screen + * + * @param {Boolean} lock Boolean 布尔值,是否锁屏 + * @returns {editormd} 返回editormd的实例对象 + */ + + lockScreen : function(lock) { + editormd.lockScreen(lock); + this.resize(); + + return this; + }, + + /** + * 编辑器界面重建,用于动态语言包或模块加载等 + * Recreate editor + * + * @returns {editormd} 返回editormd的实例对象 + */ + + recreate : function() { + var _this = this; + var editor = this.editor; + var settings = this.settings; + + this.codeMirror.remove(); + + this.setCodeMirror(); + + if (!settings.readOnly) + { + if (editor.find(".editormd-dialog").length > 0) { + editor.find(".editormd-dialog").remove(); + } + + if (settings.toolbar) + { + this.getToolbarHandles(); + this.setToolbar(); + } + } + + this.loadedDisplay(true); + + return this; + }, + + /** + * 高亮预览HTML的pre代码部分 + * highlight of preview codes + * + * @returns {editormd} 返回editormd的实例对象 + */ + + previewCodeHighlight : function() { + var settings = this.settings; + var previewContainer = this.previewContainer; + + if (settings.previewCodeHighlight) + { + previewContainer.find("pre").addClass("prettyprint linenums"); + + if (typeof prettyPrint !== "undefined") + { + prettyPrint(); + } + } + + return this; + }, + + /** + * 解析TeX(KaTeX)科学公式 + * TeX(KaTeX) Renderer + * + * @returns {editormd} 返回editormd的实例对象 + */ + + katexRender : function() { + + if (timer === null) + { + return this; + } + + this.previewContainer.find("." + editormd.classNames.tex).each(function(){ + var tex = $(this); + editormd.$katex.render(tex.text(), tex[0]); + + tex.find(".katex").css("font-size", "1.6em"); + }); + + return this; + }, + + /** + * 解析和渲染流程图及时序图 + * FlowChart and SequenceDiagram Renderer + * + * @returns {editormd} 返回editormd的实例对象 + */ + + flowChartAndSequenceDiagramRender : function() { + var $this = this; + var settings = this.settings; + var previewContainer = this.previewContainer; + + if (editormd.isIE8) { + return this; + } + + if (settings.flowChart) { + if (flowchartTimer === null) { + return this; + } + + previewContainer.find(".flowchart").flowChart(); + } + + if (settings.sequenceDiagram) { + previewContainer.find(".sequence-diagram").sequenceDiagram({theme: "simple"}); + } + + var preview = $this.preview; + var codeMirror = $this.codeMirror; + var codeView = codeMirror.find(".CodeMirror-scroll"); + + var height = codeView.height(); + var scrollTop = codeView.scrollTop(); + var percent = (scrollTop / codeView[0].scrollHeight); + var tocHeight = 0; + + preview.find(".markdown-toc-list").each(function(){ + tocHeight += $(this).height(); + }); + + var tocMenuHeight = preview.find(".editormd-toc-menu").height(); + tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; + + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= codeView[0].scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); + } + + return this; + }, + + /** + * 注册键盘快捷键处理 + * Register CodeMirror keyMaps (keyboard shortcuts). + * + * @param {Object} keyMap KeyMap key/value {"(Ctrl/Shift/Alt)-Key" : function(){}} + * @returns {editormd} return this + */ + + registerKeyMaps : function(keyMap) { + + var _this = this; + var cm = this.cm; + var settings = this.settings; + var toolbarHandlers = editormd.toolbarHandlers; + var disabledKeyMaps = settings.disabledKeyMaps; + + keyMap = keyMap || null; + + if (keyMap) + { + for (var i in keyMap) + { + if ($.inArray(i, disabledKeyMaps) < 0) + { + var map = {}; + map[i] = keyMap[i]; + + cm.addKeyMap(keyMap); + } + } + } + else + { + for (var k in editormd.keyMaps) + { + var _keyMap = editormd.keyMaps[k]; + var handle = (typeof _keyMap === "string") ? $.proxy(toolbarHandlers[_keyMap], _this) : $.proxy(_keyMap, _this); + + if ($.inArray(k, ["F9", "F10", "F11"]) < 0 && $.inArray(k, disabledKeyMaps) < 0) + { + var _map = {}; + _map[k] = handle; + + cm.addKeyMap(_map); + } + } + + $(window).keydown(function(event) { + + var keymaps = { + "120" : "F9", + "121" : "F10", + "122" : "F11" + }; + + if ( $.inArray(keymaps[event.keyCode], disabledKeyMaps) < 0 ) + { + switch (event.keyCode) + { + case 120: + $.proxy(toolbarHandlers["watch"], _this)(); + return false; + break; + + case 121: + $.proxy(toolbarHandlers["preview"], _this)(); + return false; + break; + + case 122: + $.proxy(toolbarHandlers["fullscreen"], _this)(); + return false; + break; + + default: + break; + } + } + }); + } + + return this; + }, + + /** + * 绑定同步滚动 + * + * @returns {editormd} return this + */ + + bindScrollEvent : function() { + + var _this = this; + var preview = this.preview; + var settings = this.settings; + var codeMirror = this.codeMirror; + var mouseOrTouch = editormd.mouseOrTouch; + + if (!settings.syncScrolling) { + return this; + } + + var cmBindScroll = function() { + codeMirror.find(".CodeMirror-scroll").bind(mouseOrTouch("scroll", "touchmove"), function(event) { + var height = $(this).height(); + var scrollTop = $(this).scrollTop(); + var percent = (scrollTop / $(this)[0].scrollHeight); + + var tocHeight = 0; + + preview.find(".markdown-toc-list").each(function(){ + tocHeight += $(this).height(); + }); + + var tocMenuHeight = preview.find(".editormd-toc-menu").height(); + tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; + + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= $(this)[0].scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); + } + + $.proxy(settings.onscroll, _this)(event); + }); + }; + + var cmUnbindScroll = function() { + codeMirror.find(".CodeMirror-scroll").unbind(mouseOrTouch("scroll", "touchmove")); + }; + + var previewBindScroll = function() { + + preview.bind(mouseOrTouch("scroll", "touchmove"), function(event) { + var height = $(this).height(); + var scrollTop = $(this).scrollTop(); + var percent = (scrollTop / $(this)[0].scrollHeight); + var codeView = codeMirror.find(".CodeMirror-scroll"); + + if(scrollTop === 0) + { + codeView.scrollTop(0); + } + else if (scrollTop + height >= $(this)[0].scrollHeight) + { + codeView.scrollTop(codeView[0].scrollHeight); + } + else + { + codeView.scrollTop(codeView[0].scrollHeight * percent); + } + + $.proxy(settings.onpreviewscroll, _this)(event); + }); + + }; + + var previewUnbindScroll = function() { + preview.unbind(mouseOrTouch("scroll", "touchmove")); + }; + + codeMirror.bind({ + mouseover : cmBindScroll, + mouseout : cmUnbindScroll, + touchstart : cmBindScroll, + touchend : cmUnbindScroll + }); + + if (settings.syncScrolling === "single") { + return this; + } + + preview.bind({ + mouseover : previewBindScroll, + mouseout : previewUnbindScroll, + touchstart : previewBindScroll, + touchend : previewUnbindScroll + }); + + return this; + }, + + bindChangeEvent : function() { + + var _this = this; + var cm = this.cm; + var settings = this.settings; + + if (!settings.syncScrolling) { + return this; + } + + cm.on("change", function(_cm, changeObj) { + + if (settings.watch) + { + _this.previewContainer.css("padding", settings.autoHeight ? "20px 20px 50px 40px" : "20px"); + } + + timer = setTimeout(function() { + clearTimeout(timer); + _this.save(); + timer = null; + }, settings.delay); + }); + + return this; + }, + + /** + * 加载队列完成之后的显示处理 + * Display handle of the module queues loaded after. + * + * @param {Boolean} recreate 是否为重建编辑器 + * @returns {editormd} 返回editormd的实例对象 + */ + + loadedDisplay : function(recreate) { + + recreate = recreate || false; + + var _this = this; + var editor = this.editor; + var preview = this.preview; + var settings = this.settings; + + this.containerMask.hide(); + + this.save(); + + if (settings.watch) { + preview.show(); + } + + editor.data("oldWidth", editor.width()).data("oldHeight", editor.height()); // 为了兼容Zepto + + this.resize(); + this.registerKeyMaps(); + + $(window).resize(function(){ + _this.resize(); + }); + + this.bindScrollEvent().bindChangeEvent(); + + if (!recreate) + { + $.proxy(settings.onload, this)(); + } + + this.state.loaded = true; + + return this; + }, + + /** + * 设置编辑器的宽度 + * Set editor width + * + * @param {Number|String} width 编辑器宽度值 + * @returns {editormd} 返回editormd的实例对象 + */ + + width : function(width) { + + this.editor.css("width", (typeof width === "number") ? width + "px" : width); + this.resize(); + + return this; + }, + + /** + * 设置编辑器的高度 + * Set editor height + * + * @param {Number|String} height 编辑器高度值 + * @returns {editormd} 返回editormd的实例对象 + */ + + height : function(height) { + + this.editor.css("height", (typeof height === "number") ? height + "px" : height); + this.resize(); + + return this; + }, + + /** + * 调整编辑器的尺寸和布局 + * Resize editor layout + * + * @param {Number|String} [width=null] 编辑器宽度值 + * @param {Number|String} [height=null] 编辑器高度值 + * @returns {editormd} 返回editormd的实例对象 + */ + + resize : function(width, height) { + + width = width || null; + height = height || null; + + var state = this.state; + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var codeMirror = this.codeMirror; + + if (width) + { + editor.css("width", (typeof width === "number") ? width + "px" : width); + } + + if (settings.autoHeight && !state.fullscreen && !state.preview) + { + editor.css("height", "auto"); + codeMirror.css("height", "auto"); + } + else + { + if (height) + { + editor.css("height", (typeof height === "number") ? height + "px" : height); + } + + if (state.fullscreen) + { + editor.height($(window).height()); + } + + if (settings.toolbar && !settings.readOnly) + { + codeMirror.css("margin-top", toolbar.height() + 1).height(editor.height() - toolbar.height()); + } + else + { + codeMirror.css("margin-top", 0).height(editor.height()); + } + } + + if(settings.watch) + { + codeMirror.width(editor.width() / 2); + preview.width((!state.preview) ? editor.width() / 2 : editor.width()); + + this.previewContainer.css("padding", settings.autoHeight ? "20px 20px 50px 40px" : "20px"); + + if (settings.toolbar && !settings.readOnly) + { + preview.css("top", toolbar.height() + 1); + } + else + { + preview.css("top", 0); + } + + if (settings.autoHeight && !state.fullscreen && !state.preview) + { + preview.height(""); + } + else + { + var previewHeight = (settings.toolbar && !settings.readOnly) ? editor.height() - toolbar.height() : editor.height(); + + preview.height(previewHeight); + } + } + else + { + codeMirror.width(editor.width()); + preview.hide(); + } + + if (state.loaded) + { + $.proxy(settings.onresize, this)(); + } + + return this; + }, + + /** + * 解析和保存Markdown代码 + * Parse & Saving Markdown source code + * + * @returns {editormd} 返回editormd的实例对象 + */ + + save : function() { + + if (timer === null) + { + return this; + } + + var _this = this; + var state = this.state; + var settings = this.settings; + var cm = this.cm; + var cmValue = cm.getValue(); + var previewContainer = this.previewContainer; + + if (settings.mode !== "gfm" && settings.mode !== "markdown") + { + this.markdownTextarea.val(cmValue); + + return this; + } + + var marked = editormd.$marked; + var markdownToC = this.markdownToC = []; + var rendererOptions = this.markedRendererOptions = { + toc : settings.toc, + tocm : settings.tocm, + tocStartLevel : settings.tocStartLevel, + pageBreak : settings.pageBreak, + taskList : settings.taskList, + emoji : settings.emoji, + tex : settings.tex, + atLink : settings.atLink, // for @link + emailLink : settings.emailLink, // for mail address auto link + flowChart : settings.flowChart, + sequenceDiagram : settings.sequenceDiagram, + previewCodeHighlight : settings.previewCodeHighlight, + }; + + var markedOptions = this.markedOptions = { + renderer : editormd.markedRenderer(markdownToC, rendererOptions), + gfm : true, + tables : true, + breaks : true, + pedantic : false, + sanitize : (settings.htmlDecode) ? false : true, // 关闭忽略HTML标签,即开启识别HTML标签,默认为false + smartLists : true, + smartypants : true + }; + + marked.setOptions(markedOptions); + + var newMarkdownDoc = editormd.$marked(cmValue, markedOptions); + + //console.info("cmValue", cmValue, newMarkdownDoc); + + newMarkdownDoc = editormd.filterHTMLTags(newMarkdownDoc, settings.htmlDecode); + + //console.error("cmValue", cmValue, newMarkdownDoc); + + this.markdownTextarea.text(cmValue); + + cm.save(); + + if (settings.saveHTMLToTextarea) + { + this.htmlTextarea.text(newMarkdownDoc); + } + + if(settings.watch || (!settings.watch && state.preview)) + { + previewContainer.html(newMarkdownDoc); + + this.previewCodeHighlight(); + + if (settings.toc) + { + var tocContainer = (settings.tocContainer === "") ? previewContainer : $(settings.tocContainer); + var tocMenu = tocContainer.find("." + this.classPrefix + "toc-menu"); + + tocContainer.attr("previewContainer", (settings.tocContainer === "") ? "true" : "false"); + + if (settings.tocContainer !== "" && tocMenu.length > 0) + { + tocMenu.remove(); + } + + editormd.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel); + + if (settings.tocDropdown || tocContainer.find("." + this.classPrefix + "toc-menu").length > 0) + { + editormd.tocDropdownMenu(tocContainer, (settings.tocTitle !== "") ? settings.tocTitle : this.lang.tocTitle); + } + + if (settings.tocContainer !== "") + { + previewContainer.find(".markdown-toc").css("border", "none"); + } + } + + if (settings.tex) + { + if (!editormd.kaTeXLoaded && settings.autoLoadModules) + { + editormd.loadKaTeX(function() { + editormd.$katex = katex; + editormd.kaTeXLoaded = true; + _this.katexRender(); + }); + } + else + { + editormd.$katex = katex; + this.katexRender(); + } + } + + if (settings.flowChart || settings.sequenceDiagram) + { + flowchartTimer = setTimeout(function(){ + clearTimeout(flowchartTimer); + _this.flowChartAndSequenceDiagramRender(); + flowchartTimer = null; + }, 10); + } + + if (state.loaded) + { + $.proxy(settings.onchange, this)(); + } + } + + return this; + }, + + /** + * 聚焦光标位置 + * Focusing the cursor position + * + * @returns {editormd} 返回editormd的实例对象 + */ + + focus : function() { + this.cm.focus(); + + return this; + }, + + /** + * 设置光标的位置 + * Set cursor position + * + * @param {Object} cursor 要设置的光标位置键值对象,例:{line:1, ch:0} + * @returns {editormd} 返回editormd的实例对象 + */ + + setCursor : function(cursor) { + this.cm.setCursor(cursor); + + return this; + }, + + /** + * 获取当前光标的位置 + * Get the current position of the cursor + * + * @returns {Cursor} 返回一个光标Cursor对象 + */ + + getCursor : function() { + return this.cm.getCursor(); + }, + + /** + * 设置光标选中的范围 + * Set cursor selected ranges + * + * @param {Object} from 开始位置的光标键值对象,例:{line:1, ch:0} + * @param {Object} to 结束位置的光标键值对象,例:{line:1, ch:0} + * @returns {editormd} 返回editormd的实例对象 + */ + + setSelection : function(from, to) { + + this.cm.setSelection(from, to); + + return this; + }, + + /** + * 获取光标选中的文本 + * Get the texts from cursor selected + * + * @returns {String} 返回选中文本的字符串形式 + */ + + getSelection : function() { + return this.cm.getSelection(); + }, + + /** + * 设置光标选中的文本范围 + * Set the cursor selection ranges + * + * @param {Array} ranges cursor selection ranges array + * @returns {Array} return this + */ + + setSelections : function(ranges) { + this.cm.setSelections(ranges); + + return this; + }, + + /** + * 获取光标选中的文本范围 + * Get the cursor selection ranges + * + * @returns {Array} return selection ranges array + */ + + getSelections : function() { + return this.cm.getSelections(); + }, + + /** + * 替换当前光标选中的文本或在当前光标处插入新字符 + * Replace the text at the current cursor selected or insert a new character at the current cursor position + * + * @param {String} value 要插入的字符值 + * @returns {editormd} 返回editormd的实例对象 + */ + + replaceSelection : function(value) { + this.cm.replaceSelection(value); + + return this; + }, + + /** + * 在当前光标处插入新字符 + * Insert a new character at the current cursor position + * + * 同replaceSelection()方法 + * With the replaceSelection() method + * + * @param {String} value 要插入的字符值 + * @returns {editormd} 返回editormd的实例对象 + */ + + insertValue : function(value) { + this.replaceSelection(value); + + return this; + }, + + /** + * 追加markdown + * append Markdown to editor + * + * @param {String} md 要追加的markdown源文档 + * @returns {editormd} 返回editormd的实例对象 + */ + + appendMarkdown : function(md) { + var settings = this.settings; + var cm = this.cm; + + cm.setValue(cm.getValue() + md); + + return this; + }, + + /** + * 设置和传入编辑器的markdown源文档 + * Set Markdown source document + * + * @param {String} md 要传入的markdown源文档 + * @returns {editormd} 返回editormd的实例对象 + */ + + setMarkdown : function(md) { + this.cm.setValue(md || this.settings.markdown); + + return this; + }, + + /** + * 获取编辑器的markdown源文档 + * Set Editor.md markdown/CodeMirror value + * + * @returns {editormd} 返回editormd的实例对象 + */ + + getMarkdown : function() { + return this.cm.getValue(); + }, + + /** + * 获取编辑器的源文档 + * Get CodeMirror value + * + * @returns {editormd} 返回editormd的实例对象 + */ + + getValue : function() { + return this.cm.getValue(); + }, + + /** + * 设置编辑器的源文档 + * Set CodeMirror value + * + * @param {String} value set code/value/string/text + * @returns {editormd} 返回editormd的实例对象 + */ + + setValue : function(value) { + this.cm.setValue(value); + + return this; + }, + + /** + * 清空编辑器 + * Empty CodeMirror editor container + * + * @returns {editormd} 返回editormd的实例对象 + */ + + clear : function() { + this.cm.setValue(""); + + return this; + }, + + /** + * 获取解析后存放在Textarea的HTML源码 + * Get parsed html code from Textarea + * + * @returns {String} 返回HTML源码 + */ + + getHTML : function() { + if (!this.settings.saveHTMLToTextarea) + { + alert("Error: settings.saveHTMLToTextarea == false"); + + return false; + } + + return this.htmlTextarea.val(); + }, + + /** + * getHTML()的别名 + * getHTML (alias) + * + * @returns {String} Return html code 返回HTML源码 + */ + + getTextareaSavedHTML : function() { + return this.getHTML(); + }, + + /** + * 获取预览窗口的HTML源码 + * Get html from preview container + * + * @returns {editormd} 返回editormd的实例对象 + */ + + getPreviewedHTML : function() { + if (!this.settings.watch) + { + alert("Error: settings.watch == false"); + + return false; + } + + return this.previewContainer.html(); + }, + + /** + * 开启实时预览 + * Enable real-time watching + * + * @returns {editormd} 返回editormd的实例对象 + */ + + watch : function(callback) { + var settings = this.settings; + + if ($.inArray(settings.mode, ["gfm", "markdown"]) < 0) + { + return this; + } + + this.state.watching = settings.watch = true; + this.preview.show(); + + if (this.toolbar) + { + var watchIcon = settings.toolbarIconsClass.watch; + var unWatchIcon = settings.toolbarIconsClass.unwatch; + + var icon = this.toolbar.find(".fa[name=watch]"); + icon.parent().attr("title", settings.lang.toolbar.watch); + icon.removeClass(unWatchIcon).addClass(watchIcon); + } + + this.codeMirror.css("border-right", "1px solid #ddd").width(this.editor.width() / 2); + + timer = 0; + + this.save().resize(); + + if (!settings.onwatch) + { + settings.onwatch = callback || function() {}; + } + + $.proxy(settings.onwatch, this)(); + + return this; + }, + + /** + * 关闭实时预览 + * Disable real-time watching + * + * @returns {editormd} 返回editormd的实例对象 + */ + + unwatch : function(callback) { + var settings = this.settings; + this.state.watching = settings.watch = false; + this.preview.hide(); + + if (this.toolbar) + { + var watchIcon = settings.toolbarIconsClass.watch; + var unWatchIcon = settings.toolbarIconsClass.unwatch; + + var icon = this.toolbar.find(".fa[name=watch]"); + icon.parent().attr("title", settings.lang.toolbar.unwatch); + icon.removeClass(watchIcon).addClass(unWatchIcon); + } + + this.codeMirror.css("border-right", "none").width(this.editor.width()); + + this.resize(); + + if (!settings.onunwatch) + { + settings.onunwatch = callback || function() {}; + } + + $.proxy(settings.onunwatch, this)(); + + return this; + }, + + /** + * 显示编辑器 + * Show editor + * + * @param {Function} [callback=function()] 回调函数 + * @returns {editormd} 返回editormd的实例对象 + */ + + show : function(callback) { + callback = callback || function() {}; + + var _this = this; + this.editor.show(0, function() { + $.proxy(callback, _this)(); + }); + + return this; + }, + + /** + * 隐藏编辑器 + * Hide editor + * + * @param {Function} [callback=function()] 回调函数 + * @returns {editormd} 返回editormd的实例对象 + */ + + hide : function(callback) { + callback = callback || function() {}; + + var _this = this; + this.editor.hide(0, function() { + $.proxy(callback, _this)(); + }); + + return this; + }, + + /** + * 隐藏编辑器部分,只预览HTML + * Enter preview html state + * + * @returns {editormd} 返回editormd的实例对象 + */ + + previewing : function() { + + var _this = this; + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var codeMirror = this.codeMirror; + var previewContainer = this.previewContainer; + + if ($.inArray(settings.mode, ["gfm", "markdown"]) < 0) { + return this; + } + + if (settings.toolbar && toolbar) { + toolbar.toggle(); + toolbar.find(".fa[name=preview]").toggleClass("active"); + } + + codeMirror.toggle(); + + var escHandle = function(event) { + if (event.shiftKey && event.keyCode === 27) { + _this.previewed(); + } + }; + + if (codeMirror.css("display") === "none") // 为了兼容Zepto,而不使用codeMirror.is(":hidden") + { + this.state.preview = true; + + if (this.state.fullscreen) { + preview.css("background", "#fff"); + } + + editor.find("." + this.classPrefix + "preview-close-btn").show().bind(editormd.mouseOrTouch("click", "touchend"), function(){ + _this.previewed(); + }); + + if (!settings.watch) + { + this.save(); + } + else + { + previewContainer.css("padding", ""); + } + + previewContainer.addClass(this.classPrefix + "preview-active"); + + preview.show().css({ + position : "", + top : 0, + width : editor.width(), + height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() + }); + + if (this.state.loaded) + { + $.proxy(settings.onpreviewing, this)(); + } + + $(window).bind("keyup", escHandle); + } + else + { + $(window).unbind("keyup", escHandle); + this.previewed(); + } + }, + + /** + * 显示编辑器部分,退出只预览HTML + * Exit preview html state + * + * @returns {editormd} 返回editormd的实例对象 + */ + + previewed : function() { + + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var previewContainer = this.previewContainer; + var previewCloseBtn = editor.find("." + this.classPrefix + "preview-close-btn"); + + this.state.preview = false; + + this.codeMirror.show(); + + if (settings.toolbar) { + toolbar.show(); + } + + preview[(settings.watch) ? "show" : "hide"](); + + previewCloseBtn.hide().unbind(editormd.mouseOrTouch("click", "touchend")); + + previewContainer.removeClass(this.classPrefix + "preview-active"); + + if (settings.watch) + { + previewContainer.css("padding", "20px"); + } + + preview.css({ + background : null, + position : "absolute", + width : editor.width() / 2, + height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() - toolbar.height(), + top : (settings.toolbar) ? toolbar.height() : 0 + }); + + if (this.state.loaded) + { + $.proxy(settings.onpreviewed, this)(); + } + + return this; + }, + + /** + * 编辑器全屏显示 + * Fullscreen show + * + * @returns {editormd} 返回editormd的实例对象 + */ + + fullscreen : function() { + + var _this = this; + var state = this.state; + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var fullscreenClass = this.classPrefix + "fullscreen"; + + if (toolbar) { + toolbar.find(".fa[name=fullscreen]").parent().toggleClass("active"); + } + + var escHandle = function(event) { + if (!event.shiftKey && event.keyCode === 27) + { + if (state.fullscreen) + { + _this.fullscreenExit(); + } + } + }; + + if (!editor.hasClass(fullscreenClass)) + { + state.fullscreen = true; + + $("html,body").css("overflow", "hidden"); + + editor.css({ + width : $(window).width(), + height : $(window).height() + }).addClass(fullscreenClass); + + this.resize(); + + $.proxy(settings.onfullscreen, this)(); + + $(window).bind("keyup", escHandle); + } + else + { + $(window).unbind("keyup", escHandle); + this.fullscreenExit(); + } + + return this; + }, + + /** + * 编辑器退出全屏显示 + * Exit fullscreen state + * + * @returns {editormd} 返回editormd的实例对象 + */ + + fullscreenExit : function() { + + var editor = this.editor; + var settings = this.settings; + var toolbar = this.toolbar; + var fullscreenClass = this.classPrefix + "fullscreen"; + + this.state.fullscreen = false; + + if (toolbar) { + toolbar.find(".fa[name=fullscreen]").parent().removeClass("active"); + } + + $("html,body").css("overflow", ""); + + editor.css({ + width : editor.data("oldWidth"), + height : editor.data("oldHeight") + }).removeClass(fullscreenClass); + + this.resize(); + + $.proxy(settings.onfullscreenExit, this)(); + + return this; + }, + + /** + * 加载并执行插件 + * Load and execute the plugin + * + * @param {String} name plugin name / function name + * @param {String} path plugin load path + * @returns {editormd} 返回editormd的实例对象 + */ + + executePlugin : function(name, path) { + + var _this = this; + var cm = this.cm; + var settings = this.settings; + + path = settings.pluginPath + path; + + if (typeof define === "function") + { + if (typeof this[name] === "undefined") + { + alert("Error: " + name + " plugin is not found, you are not load this plugin."); + + return this; + } + + this[name](cm); + + return this; + } + + if ($.inArray(path, editormd.loadFiles.plugin) < 0) + { + editormd.loadPlugin(path, function() { + editormd.loadPlugins[name] = _this[name]; + _this[name](cm); + }); + } + else + { + $.proxy(editormd.loadPlugins[name], this)(cm); + } + + return this; + }, + + /** + * 搜索替换 + * Search & replace + * + * @param {String} command CodeMirror serach commands, "find, fintNext, fintPrev, clearSearch, replace, replaceAll" + * @returns {editormd} return this + */ + + search : function(command) { + var settings = this.settings; + + if (!settings.searchReplace) + { + alert("Error: settings.searchReplace == false"); + return this; + } + + if (!settings.readOnly) + { + this.cm.execCommand(command || "find"); + } + + return this; + }, + + searchReplace : function() { + this.search("replace"); + + return this; + }, + + searchReplaceAll : function() { + this.search("replaceAll"); + + return this; + } + }; + + editormd.fn.init.prototype = editormd.fn; + + /** + * 锁屏 + * lock screen when dialog opening + * + * @returns {void} + */ + + editormd.dialogLockScreen = function() { + var settings = this.settings || {dialogLockScreen : true}; + + if (settings.dialogLockScreen) + { + $("html,body").css("overflow", "hidden"); + this.resize(); + } + }; + + /** + * 显示透明背景层 + * Display mask layer when dialog opening + * + * @param {Object} dialog dialog jQuery object + * @returns {void} + */ + + editormd.dialogShowMask = function(dialog) { + var editor = this.editor; + var settings = this.settings || {dialogShowMask : true}; + + dialog.css({ + top : ($(window).height() - dialog.height()) / 2 + "px", + left : ($(window).width() - dialog.width()) / 2 + "px" + }); + + if (settings.dialogShowMask) { + editor.children("." + this.classPrefix + "mask").css("z-index", parseInt(dialog.css("z-index")) - 1).show(); + } + }; + + editormd.toolbarHandlers = { + undo : function() { + this.cm.undo(); + }, + + redo : function() { + this.cm.redo(); + }, + + bold : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("**" + selection + "**"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 2); + } + }, + + del : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("~~" + selection + "~~"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 2); + } + }, + + italic : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("*" + selection + "*"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + + quote : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("> " + selection); + cm.setCursor(cursor.line, cursor.ch + 2); + } + else + { + cm.replaceSelection("> " + selection); + } + + //cm.replaceSelection("> " + selection); + //cm.setCursor(cursor.line, (selection === "") ? cursor.ch + 2 : cursor.ch + selection.length + 2); + }, + + ucfirst : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(editormd.firstUpperCase(selection)); + cm.setSelections(selections); + }, + + ucwords : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(editormd.wordsFirstUpperCase(selection)); + cm.setSelections(selections); + }, + + uppercase : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(selection.toUpperCase()); + cm.setSelections(selections); + }, + + lowercase : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(selection.toLowerCase()); + cm.setSelections(selections); + }, + + h1 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("# " + selection); + cm.setCursor(cursor.line, cursor.ch + 2); + } + else + { + cm.replaceSelection("# " + selection); + } + }, + + h2 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("## " + selection); + cm.setCursor(cursor.line, cursor.ch + 3); + } + else + { + cm.replaceSelection("## " + selection); + } + }, + + h3 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("### " + selection); + cm.setCursor(cursor.line, cursor.ch + 4); + } + else + { + cm.replaceSelection("### " + selection); + } + }, + + h4 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("#### " + selection); + cm.setCursor(cursor.line, cursor.ch + 5); + } + else + { + cm.replaceSelection("#### " + selection); + } + }, + + h5 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("##### " + selection); + cm.setCursor(cursor.line, cursor.ch + 6); + } + else + { + cm.replaceSelection("##### " + selection); + } + }, + + h6 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("###### " + selection); + cm.setCursor(cursor.line, cursor.ch + 7); + } + else + { + cm.replaceSelection("###### " + selection); + } + }, + + "list-ul" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (selection === "") + { + cm.replaceSelection("- " + selection); + } + else + { + var selectionText = selection.split("\n"); + + for (var i = 0, len = selectionText.length; i < len; i++) + { + selectionText[i] = (selectionText[i] === "") ? "" : "- " + selectionText[i]; + } + + cm.replaceSelection(selectionText.join("\n")); + } + }, + + "list-ol" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if(selection === "") + { + cm.replaceSelection("1. " + selection); + } + else + { + var selectionText = selection.split("\n"); + + for (var i = 0, len = selectionText.length; i < len; i++) + { + selectionText[i] = (selectionText[i] === "") ? "" : (i+1) + ". " + selectionText[i]; + } + + cm.replaceSelection(selectionText.join("\n")); + } + }, + + hr : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection(((cursor.ch !== 0) ? "\n\n" : "\n") + "------------\n\n"); + }, + + tex : function() { + if (!this.settings.tex) + { + alert("settings.tex === false"); + return this; + } + + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("$$" + selection + "$$"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 2); + } + }, + + link : function() { + this.executePlugin("linkDialog", "link-dialog/link-dialog"); + }, + + "reference-link" : function() { + this.executePlugin("referenceLinkDialog", "reference-link-dialog/reference-link-dialog"); + }, + + pagebreak : function() { + if (!this.settings.pageBreak) + { + alert("settings.pageBreak === false"); + return this; + } + + var cm = this.cm; + var selection = cm.getSelection(); + + cm.replaceSelection("\r\n[========]\r\n"); + }, + + image : function() { + this.executePlugin("imageDialog", "image-dialog/image-dialog"); + }, + + code : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("`" + selection + "`"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + + "code-block" : function() { + this.executePlugin("codeBlockDialog", "code-block-dialog/code-block-dialog"); + }, + + "preformatted-text" : function() { + this.executePlugin("preformattedTextDialog", "preformatted-text-dialog/preformatted-text-dialog"); + }, + + table : function() { + this.executePlugin("tableDialog", "table-dialog/table-dialog"); + }, + + datetime : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var date = new Date(); + var langName = this.settings.lang.name; + var datefmt = editormd.dateFormat() + " " + editormd.dateFormat((langName === "zh-cn" || langName === "zh-tw") ? "cn-week-day" : "week-day"); + + cm.replaceSelection(datefmt); + }, + + emoji : function() { + this.executePlugin("emojiDialog", "emoji-dialog/emoji-dialog"); + }, + + "html-entities" : function() { + this.executePlugin("htmlEntitiesDialog", "html-entities-dialog/html-entities-dialog"); + }, + + "goto-line" : function() { + this.executePlugin("gotoLineDialog", "goto-line-dialog/goto-line-dialog"); + }, + + watch : function() { + this[this.settings.watch ? "unwatch" : "watch"](); + }, + + preview : function() { + this.previewing(); + }, + + fullscreen : function() { + this.fullscreen(); + }, + + clear : function() { + this.clear(); + }, + + search : function() { + this.search(); + }, + + help : function() { + this.executePlugin("helpDialog", "help-dialog/help-dialog"); + }, + + info : function() { + this.showInfoDialog(); + } + }; + + editormd.keyMaps = { + "Ctrl-1" : "h1", + "Ctrl-2" : "h2", + "Ctrl-3" : "h3", + "Ctrl-4" : "h4", + "Ctrl-5" : "h5", + "Ctrl-6" : "h6", + "Ctrl-B" : "bold", // if this is string == editormd.toolbarHandlers.xxxx + "Ctrl-D" : "datetime", + + "Ctrl-E" : function() { // emoji + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (!this.settings.emoji) + { + alert("Error: settings.emoji == false"); + return ; + } + + cm.replaceSelection(":" + selection + ":"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + "Ctrl-Alt-G" : "goto-line", + "Ctrl-H" : "hr", + "Ctrl-I" : "italic", + "Ctrl-K" : "code", + + "Ctrl-L" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + var title = (selection === "") ? "" : " \""+selection+"\""; + + cm.replaceSelection("[" + selection + "]("+title+")"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + "Ctrl-U" : "list-ul", + + "Shift-Ctrl-A" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (!this.settings.atLink) + { + alert("Error: settings.atLink == false"); + return ; + } + + cm.replaceSelection("@" + selection); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + + "Shift-Ctrl-C" : "code", + "Shift-Ctrl-Q" : "quote", + "Shift-Ctrl-S" : "del", + "Shift-Ctrl-K" : "tex", // KaTeX + + "Shift-Alt-C" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection(["```", selection, "```"].join("\n")); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 3); + } + }, + + "Shift-Ctrl-Alt-C" : "code-block", + "Shift-Ctrl-H" : "html-entities", + "Shift-Alt-H" : "help", + "Shift-Ctrl-E" : "emoji", + "Shift-Ctrl-U" : "uppercase", + "Shift-Alt-U" : "ucwords", + "Shift-Ctrl-Alt-U" : "ucfirst", + "Shift-Alt-L" : "lowercase", + + "Shift-Ctrl-I" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + var title = (selection === "") ? "" : " \""+selection+"\""; + + cm.replaceSelection("![" + selection + "]("+title+")"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 4); + } + }, + + "Shift-Ctrl-Alt-I" : "image", + "Shift-Ctrl-L" : "link", + "Shift-Ctrl-O" : "list-ol", + "Shift-Ctrl-P" : "preformatted-text", + "Shift-Ctrl-T" : "table", + "Shift-Alt-P" : "pagebreak", + "F9" : "watch", + "F10" : "preview", + "F11" : "fullscreen", + }; + + /** + * 清除字符串两边的空格 + * Clear the space of strings both sides. + * + * @param {String} str string + * @returns {String} trimed string + */ + + var trim = function(str) { + return (!String.prototype.trim) ? str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") : str.trim(); + }; + + editormd.trim = trim; + + /** + * 所有单词首字母大写 + * Words first to uppercase + * + * @param {String} str string + * @returns {String} string + */ + + var ucwords = function (str) { + return str.toLowerCase().replace(/\b(\w)|\s(\w)/g, function($1) { + return $1.toUpperCase(); + }); + }; + + editormd.ucwords = editormd.wordsFirstUpperCase = ucwords; + + /** + * 字符串首字母大写 + * Only string first char to uppercase + * + * @param {String} str string + * @returns {String} string + */ + + var firstUpperCase = function(str) { + return str.toLowerCase().replace(/\b(\w)/, function($1){ + return $1.toUpperCase(); + }); + }; + + var ucfirst = firstUpperCase; + + editormd.firstUpperCase = editormd.ucfirst = firstUpperCase; + + editormd.urls = { + atLinkBase : "https://github.com/" + }; + + editormd.regexs = { + atLink : /@(\w+)/g, + email : /(\w+)@(\w+)\.(\w+)\.?(\w+)?/g, + emailLink : /(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g, + emoji : /:([\w\+-]+):/g, + emojiDatetime : /(\d{2}:\d{2}:\d{2})/g, + twemoji : /:(tw-([\w]+)-?(\w+)?):/g, + fontAwesome : /:(fa-([\w]+)(-(\w+)){0,}):/g, + editormdLogo : /:(editormd-logo-?(\w+)?):/g, + pageBreak : /^\[[=]{8,}\]$/ + }; + + // Emoji graphics files url path + editormd.emoji = { + path : "http://www.emoji-cheat-sheet.com/graphics/emojis/", + ext : ".png" + }; + + // Twitter Emoji (Twemoji) graphics files url path + editormd.twemoji = { + path : "http://twemoji.maxcdn.com/36x36/", + ext : ".png" + }; + + /** + * 自定义marked的解析器 + * Custom Marked renderer rules + * + * @param {Array} markdownToC 传入用于接收TOC的数组 + * @returns {Renderer} markedRenderer 返回marked的Renderer自定义对象 + */ + + editormd.markedRenderer = function(markdownToC, options) { + var defaults = { + toc : true, // Table of contents + tocm : false, + tocStartLevel : 1, // Said from H1 to create ToC + pageBreak : true, + atLink : true, // for @link + emailLink : true, // for mail address auto link + taskList : false, // Enable Github Flavored Markdown task lists + emoji : false, // :emoji: , Support Twemoji, fontAwesome, Editor.md logo emojis. + tex : false, // TeX(LaTeX), based on KaTeX + flowChart : false, // flowChart.js only support IE9+ + sequenceDiagram : false, // sequenceDiagram.js only support IE9+ + }; + + var settings = $.extend(defaults, options || {}); + var marked = editormd.$marked; + var markedRenderer = new marked.Renderer(); + markdownToC = markdownToC || []; + + var regexs = editormd.regexs; + var atLinkReg = regexs.atLink; + var emojiReg = regexs.emoji; + var emailReg = regexs.email; + var emailLinkReg = regexs.emailLink; + var twemojiReg = regexs.twemoji; + var faIconReg = regexs.fontAwesome; + var editormdLogoReg = regexs.editormdLogo; + var pageBreakReg = regexs.pageBreak; + + markedRenderer.emoji = function(text) { + + text = text.replace(editormd.regexs.emojiDatetime, function($1) { + return $1.replace(/:/g, ":"); + }); + + var matchs = text.match(emojiReg); + + if (!matchs || !settings.emoji) { + return text; + } + + for (var i = 0, len = matchs.length; i < len; i++) + { + if (matchs[i] === ":+1:") { + matchs[i] = ":\\+1:"; + } + + text = text.replace(new RegExp(matchs[i]), function($1, $2){ + var faMatchs = $1.match(faIconReg); + var name = $1.replace(/:/g, ""); + + if (faMatchs) + { + for (var fa = 0, len1 = faMatchs.length; fa < len1; fa++) + { + var faName = faMatchs[fa].replace(/:/g, ""); + + return ""; + } + } + else + { + var emdlogoMathcs = $1.match(editormdLogoReg); + var twemojiMatchs = $1.match(twemojiReg); + + if (emdlogoMathcs) + { + for (var x = 0, len2 = emdlogoMathcs.length; x < len2; x++) + { + var logoName = emdlogoMathcs[x].replace(/:/g, ""); + return ""; + } + } + else if (twemojiMatchs) + { + for (var t = 0, len3 = twemojiMatchs.length; t < len3; t++) + { + var twe = twemojiMatchs[t].replace(/:/g, "").replace("tw-", ""); + return "\"twemoji-""; + } + } + else + { + var src = (name === "+1") ? "plus1" : name; + src = (src === "black_large_square") ? "black_square" : src; + src = (src === "moon") ? "waxing_gibbous_moon" : src; + + return "\":""; + } + } + }); + } + + return text; + }; + + markedRenderer.atLink = function(text) { + + if (atLinkReg.test(text)) + { + if (settings.atLink) + { + text = text.replace(emailReg, function($1, $2, $3, $4) { + return $1.replace(/@/g, "_#_@_#_"); + }); + + text = text.replace(atLinkReg, function($1, $2) { + return "" + $1 + ""; + }).replace(/_#_@_#_/g, "@"); + } + + if (settings.emailLink) + { + text = text.replace(emailLinkReg, function($1, $2, $3, $4, $5) { + return (!$2 && $.inArray($5, "jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|")) < 0) ? ""+$1+"" : $1; + }); + } + + return text; + } + + return text; + }; + + markedRenderer.link = function (href, title, text) { + + if (this.options.sanitize) { + try { + var prot = decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase(); + } catch(e) { + return ""; + } + + if (prot.indexOf("javascript:") === 0) { + return ""; + } + } + + var out = "" + text.replace(/@/g, "@") + ""; + } + + if (title) { + out += " title=\"" + title + "\""; + } + + out += ">" + text + ""; + + return out; + }; + + markedRenderer.heading = function(text, level, raw) { + + var linkText = text; + var hasLinkReg = /\s*\]*)\>(.*)\<\/a\>\s*/; + var getLinkTextReg = /\s*\]+)\>([^\>]*)\<\/a\>\s*/g; + + if (hasLinkReg.test(text)) + { + var tempText = []; + text = text.split(/\]+)\>([^\>]*)\<\/a\>/); + + for (var i = 0, len = text.length; i < len; i++) + { + tempText.push(text[i].replace(/\s*href\=\"(.*)\"\s*/g, "")); + } + + text = tempText.join(" "); + } + + text = trim(text); + + var escapedText = text.toLowerCase().replace(/[^\w]+/g, "-"); + var toc = { + text : text, + level : level, + slug : escapedText + }; + + var isChinese = /^[\u4e00-\u9fa5]+$/.test(text); + var id = (isChinese) ? escape(text).replace(/\%/g, "") : text.toLowerCase().replace(/[^\w]+/g, "-"); + + markdownToC.push(toc); + + var headingHTML = ""; + + headingHTML += ""; + headingHTML += ""; + headingHTML += (hasLinkReg) ? this.atLink(this.emoji(linkText)) : this.atLink(this.emoji(text)); + headingHTML += ""; + + return headingHTML; + }; + + markedRenderer.pageBreak = function(text) { + if (pageBreakReg.test(text) && settings.pageBreak) + { + text = "
    "; + } + + return text; + }; + + markedRenderer.paragraph = function(text) { + var isTeXInline = /\$\$(.*)\$\$/g.test(text); + var isTeXLine = /^\$\$(.*)\$\$$/.test(text); + var isTeXAddClass = (isTeXLine) ? " class=\"" + editormd.classNames.tex + "\"" : ""; + var isToC = (settings.tocm) ? /^(\[TOC\]|\[TOCM\])$/.test(text) : /^\[TOC\]$/.test(text); + var isToCMenu = /^\[TOCM\]$/.test(text); + + if (!isTeXLine && isTeXInline) + { + text = text.replace(/(\$\$([^\$]*)\$\$)+/g, function($1, $2) { + return "" + $2.replace(/\$/g, "") + ""; + }); + } + else + { + text = (isTeXLine) ? text.replace(/\$/g, "") : text; + } + + var tocHTML = "
    " + text + "
    "; + + return (isToC) ? ( (isToCMenu) ? "
    " + tocHTML + "

    " : tocHTML ) + : ( (pageBreakReg.test(text)) ? this.pageBreak(text) : "" + this.atLink(this.emoji(text)) + "

    \n" ); + }; + + markedRenderer.code = function (code, lang, escaped) { + + if (lang === "seq" || lang === "sequence") + { + return "
    " + code + "
    "; + } + else if ( lang === "flow") + { + return "
    " + code + "
    "; + } + else if ( lang === "math" || lang === "latex" || lang === "katex") + { + return "

    " + code + "

    "; + } + else + { + + return marked.Renderer.prototype.code.apply(this, arguments); + } + }; + + markedRenderer.tablecell = function(content, flags) { + var type = (flags.header) ? "th" : "td"; + var tag = (flags.align) ? "<" + type +" style=\"text-align:" + flags.align + "\">" : "<" + type + ">"; + + return tag + this.atLink(this.emoji(content)) + "\n"; + }; + + markedRenderer.listitem = function(text) { + if (settings.taskList && /^\s*\[[x\s]\]\s*/.test(text)) + { + text = text.replace(/^\s*\[\s\]\s*/, " ") + .replace(/^\s*\[x\]\s*/, " "); + + return "
  • " + this.atLink(this.emoji(text)) + "
  • "; + } + else + { + return "
  • " + this.atLink(this.emoji(text)) + "
  • "; + } + }; + + return markedRenderer; + }; + + /** + * + * 生成TOC(Table of Contents) + * Creating ToC (Table of Contents) + * + * @param {Array} toc 从marked获取的TOC数组列表 + * @param {Element} container 插入TOC的容器元素 + * @param {Integer} startLevel Hx 起始层级 + * @returns {Object} tocContainer 返回ToC列表容器层的jQuery对象元素 + */ + + editormd.markdownToCRenderer = function(toc, container, tocDropdown, startLevel) { + + var html = ""; + var lastLevel = 0; + var classPrefix = this.classPrefix; + + startLevel = startLevel || 1; + + for (var i = 0, len = toc.length; i < len; i++) + { + var text = toc[i].text; + var level = toc[i].level; + + if (level < startLevel) { + continue; + } + + if (level > lastLevel) + { + html += ""; + } + else if (level < lastLevel) + { + html += (new Array(lastLevel - level + 2)).join(""); + } + else + { + html += ""; + } + + html += "
  • " + text + "
      "; + lastLevel = level; + } + + var tocContainer = container.find(".markdown-toc"); + + if ((tocContainer.length < 1 && container.attr("previewContainer") === "false")) + { + var tocHTML = "
      "; + + tocHTML = (tocDropdown) ? "
      " + tocHTML + "
      " : tocHTML; + + container.html(tocHTML); + + tocContainer = container.find(".markdown-toc"); + } + + if (tocDropdown) + { + tocContainer.wrap("

      "); + } + + tocContainer.html("
        ").children(".markdown-toc-list").html(html.replace(/\r?\n?\\<\/ul\>/g, "")); + + return tocContainer; + }; + + /** + * + * 生成TOC下拉菜单 + * Creating ToC dropdown menu + * + * @param {Object} container 插入TOC的容器jQuery对象元素 + * @param {String} tocTitle ToC title + * @returns {Object} return toc-menu object + */ + + editormd.tocDropdownMenu = function(container, tocTitle) { + + tocTitle = tocTitle || "Table of Contents"; + + var zindex = 400; + var tocMenus = container.find("." + this.classPrefix + "toc-menu"); + + tocMenus.each(function() { + var $this = $(this); + var toc = $this.children(".markdown-toc"); + var icon = ""; + var btn = "" + icon + tocTitle + ""; + var menu = toc.children("ul"); + var list = menu.find("li"); + + toc.append(btn); + + list.first().before("
      • " + tocTitle + " " + icon + "

      • "); + + $this.mouseover(function(){ + menu.show(); + + list.each(function(){ + var li = $(this); + var ul = li.children("ul"); + + if (ul.html() === "") + { + ul.remove(); + } + + if (ul.length > 0 && ul.html() !== "") + { + var firstA = li.children("a").first(); + + if (firstA.children(".fa").length < 1) + { + firstA.append( $(icon).css({ float:"right", paddingTop:"4px" }) ); + } + } + + li.mouseover(function(){ + ul.css("z-index", zindex).show(); + zindex += 1; + }).mouseleave(function(){ + ul.hide(); + }); + }); + }).mouseleave(function(){ + menu.hide(); + }); + }); + + return tocMenus; + }; + + /** + * 简单地过滤指定的HTML标签 + * Filter custom html tags + * + * @param {String} html 要过滤HTML + * @param {String} filters 要过滤的标签 + * @returns {String} html 返回过滤的HTML + */ + + editormd.filterHTMLTags = function(html, filters) { + + if (typeof html !== "string") { + html = new String(html); + } + + if (typeof filters !== "string") { + return html; + } + + var expression = filters.split("|"); + var filterTags = expression[0].split(","); + var attrs = expression[1]; + + for (var i = 0, len = filterTags.length; i < len; i++) + { + var tag = filterTags[i]; + + html = html.replace(new RegExp("\<\s*" + tag + "\s*([^\>]*)\>([^\>]*)\<\s*\/" + tag + "\s*\>", "igm"), ""); + } + + //return html; + + if (typeof attrs !== "undefined") + { + var htmlTagRegex = /\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/ig; + + if (attrs === "*") + { + html = html.replace(htmlTagRegex, function($1, $2, $3, $4, $5) { + return "<" + $2 + ">" + $4 + ""; + }); + } + else if (attrs === "on*") + { + html = html.replace(htmlTagRegex, function($1, $2, $3, $4, $5) { + var el = $("<" + $2 + ">" + $4 + ""); + var _attrs = $($1)[0].attributes; + var $attrs = {}; + + $.each(_attrs, function(i, e) { + if (e.nodeName !== '"') $attrs[e.nodeName] = e.nodeValue; + }); + + $.each($attrs, function(i) { + if (i.indexOf("on") === 0) { + delete $attrs[i]; + } + }); + + el.attr($attrs); + + var text = (typeof el[1] !== "undefined") ? $(el[1]).text() : ""; + + return el[0].outerHTML + text; + }); + } + else + { + html = html.replace(htmlTagRegex, function($1, $2, $3, $4) { + var filterAttrs = attrs.split(","); + var el = $($1); + el.html($4); + + $.each(filterAttrs, function(i) { + el.attr(filterAttrs[i], null); + }); + + return el[0].outerHTML; + }); + } + } + + return html; + }; + + /** + * 将Markdown文档解析为HTML用于前台显示 + * Parse Markdown to HTML for Font-end preview. + * + * @param {String} id 用于显示HTML的对象ID + * @param {Object} [options={}] 配置选项,可选 + * @returns {Object} div 返回jQuery对象元素 + */ + + editormd.markdownToHTML = function(id, options) { + var defaults = { + gfm : true, + toc : true, + tocm : false, + tocStartLevel : 1, + tocTitle : "目录", + tocDropdown : false, + tocContainer : "", + markdown : "", + markdownSourceCode : false, + htmlDecode : false, + autoLoadKaTeX : true, + pageBreak : true, + atLink : true, // for @link + emailLink : true, // for mail address auto link + tex : false, + taskList : false, // Github Flavored Markdown task lists + emoji : false, + flowChart : false, + sequenceDiagram : false, + previewCodeHighlight : true + }; + + editormd.$marked = marked; + + var div = $("#" + id); + var settings = div.settings = $.extend(true, defaults, options || {}); + var saveTo = div.find("textarea"); + + if (saveTo.length < 1) + { + div.append(""); + saveTo = div.find("textarea"); + } + + var markdownDoc = (settings.markdown === "") ? saveTo.val() : settings.markdown; + var markdownToC = []; + + var rendererOptions = { + toc : settings.toc, + tocm : settings.tocm, + tocStartLevel : settings.tocStartLevel, + taskList : settings.taskList, + emoji : settings.emoji, + tex : settings.tex, + pageBreak : settings.pageBreak, + atLink : settings.atLink, // for @link + emailLink : settings.emailLink, // for mail address auto link + flowChart : settings.flowChart, + sequenceDiagram : settings.sequenceDiagram, + previewCodeHighlight : settings.previewCodeHighlight, + }; + + var markedOptions = { + renderer : editormd.markedRenderer(markdownToC, rendererOptions), + gfm : settings.gfm, + tables : true, + breaks : true, + pedantic : false, + sanitize : (settings.htmlDecode) ? false : true, // 是否忽略HTML标签,即是否开启HTML标签解析,为了安全性,默认不开启 + smartLists : true, + smartypants : true + }; + + markdownDoc = new String(markdownDoc); + + var markdownParsed = marked(markdownDoc, markedOptions); + + markdownParsed = editormd.filterHTMLTags(markdownParsed, settings.htmlDecode); + + if (settings.markdownSourceCode) { + saveTo.text(markdownDoc); + } else { + saveTo.remove(); + } + + div.addClass("markdown-body " + this.classPrefix + "html-preview").append(markdownParsed); + + var tocContainer = (settings.tocContainer !== "") ? $(settings.tocContainer) : div; + + if (settings.tocContainer !== "") + { + tocContainer.attr("previewContainer", false); + } + + if (settings.toc) + { + div.tocContainer = this.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel); + + if (settings.tocDropdown || div.find("." + this.classPrefix + "toc-menu").length > 0) + { + this.tocDropdownMenu(div, settings.tocTitle); + } + + if (settings.tocContainer !== "") + { + div.find(".editormd-toc-menu, .editormd-markdown-toc").remove(); + } + } + + if (settings.previewCodeHighlight) + { + div.find("pre").addClass("prettyprint linenums"); + prettyPrint(); + } + + if (!editormd.isIE8) + { + if (settings.flowChart) { + div.find(".flowchart").flowChart(); + } + + if (settings.sequenceDiagram) { + div.find(".sequence-diagram").sequenceDiagram({theme: "simple"}); + } + } + + if (settings.tex) + { + var katexHandle = function() { + div.find("." + editormd.classNames.tex).each(function(){ + var tex = $(this); + katex.render(tex.html().replace(/</g, "<").replace(/>/g, ">"), tex[0]); + tex.find(".katex").css("font-size", "1.6em"); + }); + }; + + if (settings.autoLoadKaTeX && !editormd.$katex && !editormd.kaTeXLoaded) + { + this.loadKaTeX(function() { + editormd.$katex = katex; + editormd.kaTeXLoaded = true; + katexHandle(); + }); + } + else + { + katexHandle(); + } + } + + div.getMarkdown = function() { + return saveTo.val(); + }; + + return div; + }; + + // Editor.md themes, change toolbar themes etc. + // added @1.5.0 + editormd.themes = ["default", "dark"]; + + // Preview area themes + // added @1.5.0 + editormd.previewThemes = ["default", "dark"]; + + // CodeMirror / editor area themes + // @1.5.0 rename -> editorThemes, old version -> themes + editormd.editorThemes = [ + "default", "3024-day", "3024-night", + "ambiance", "ambiance-mobile", + "base16-dark", "base16-light", "blackboard", + "cobalt", + "eclipse", "elegant", "erlang-dark", + "lesser-dark", + "mbo", "mdn-like", "midnight", "monokai", + "neat", "neo", "night", + "paraiso-dark", "paraiso-light", "pastel-on-dark", + "rubyblue", + "solarized", + "the-matrix", "tomorrow-night-eighties", "twilight", + "vibrant-ink", + "xq-dark", "xq-light" + ]; + + editormd.loadPlugins = {}; + + editormd.loadFiles = { + js : [], + css : [], + plugin : [] + }; + + /** + * 动态加载Editor.md插件,但不立即执行 + * Load editor.md plugins + * + * @param {String} fileName 插件文件路径 + * @param {Function} [callback=function()] 加载成功后执行的回调函数 + * @param {String} [into="head"] 嵌入页面的位置 + */ + + editormd.loadPlugin = function(fileName, callback, into) { + callback = callback || function() {}; + + this.loadScript(fileName, function() { + editormd.loadFiles.plugin.push(fileName); + callback(); + }, into); + }; + + /** + * 动态加载CSS文件的方法 + * Load css file method + * + * @param {String} fileName CSS文件名 + * @param {Function} [callback=function()] 加载成功后执行的回调函数 + * @param {String} [into="head"] 嵌入页面的位置 + */ + + editormd.loadCSS = function(fileName, callback, into) { + into = into || "head"; + callback = callback || function() {}; + + var css = document.createElement("link"); + css.type = "text/css"; + css.rel = "stylesheet"; + css.onload = css.onreadystatechange = function() { + editormd.loadFiles.css.push(fileName); + callback(); + }; + + css.href = fileName + ".css"; + + if(into === "head") { + document.getElementsByTagName("head")[0].appendChild(css); + } else { + document.body.appendChild(css); + } + }; + + editormd.isIE = (navigator.appName == "Microsoft Internet Explorer"); + editormd.isIE8 = (editormd.isIE && navigator.appVersion.match(/8./i) == "8."); + + /** + * 动态加载JS文件的方法 + * Load javascript file method + * + * @param {String} fileName JS文件名 + * @param {Function} [callback=function()] 加载成功后执行的回调函数 + * @param {String} [into="head"] 嵌入页面的位置 + */ + + editormd.loadScript = function(fileName, callback, into) { + + into = into || "head"; + callback = callback || function() {}; + + var script = null; + script = document.createElement("script"); + script.id = fileName.replace(/[\./]+/g, "-"); + script.type = "text/javascript"; + script.src = fileName + ".js"; + + if (editormd.isIE8) + { + script.onreadystatechange = function() { + if(script.readyState) + { + if (script.readyState === "loaded" || script.readyState === "complete") + { + script.onreadystatechange = null; + editormd.loadFiles.js.push(fileName); + callback(); + } + } + }; + } + else + { + script.onload = function() { + editormd.loadFiles.js.push(fileName); + callback(); + }; + } + + if (into === "head") { + document.getElementsByTagName("head")[0].appendChild(script); + } else { + document.body.appendChild(script); + } + }; + + // 使用国外的CDN,加载速度有时会很慢,或者自定义URL + // You can custom KaTeX load url. + editormd.katexURL = { + css : "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min", + js : "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min" + }; + + editormd.kaTeXLoaded = false; + + /** + * 加载KaTeX文件 + * load KaTeX files + * + * @param {Function} [callback=function()] 加载成功后执行的回调函数 + */ + + editormd.loadKaTeX = function (callback) { + editormd.loadCSS(editormd.katexURL.css, function(){ + editormd.loadScript(editormd.katexURL.js, callback || function(){}); + }); + }; + + /** + * 锁屏 + * lock screen + * + * @param {Boolean} lock Boolean 布尔值,是否锁屏 + * @returns {void} + */ + + editormd.lockScreen = function(lock) { + $("html,body").css("overflow", (lock) ? "hidden" : ""); + }; + + /** + * 动态创建对话框 + * Creating custom dialogs + * + * @param {Object} options 配置项键值对 Key/Value + * @returns {dialog} 返回创建的dialog的jQuery实例对象 + */ + + editormd.createDialog = function(options) { + var defaults = { + name : "", + width : 420, + height: 240, + title : "", + drag : true, + closed : true, + content : "", + mask : true, + maskStyle : { + backgroundColor : "#fff", + opacity : 0.1 + }, + lockScreen : true, + footer : true, + buttons : false + }; + + options = $.extend(true, defaults, options); + + var $this = this; + var editor = this.editor; + var classPrefix = editormd.classPrefix; + var guid = (new Date()).getTime(); + var dialogName = ( (options.name === "") ? classPrefix + "dialog-" + guid : options.name); + var mouseOrTouch = editormd.mouseOrTouch; + + var html = "
        "; + + if (options.title !== "") + { + html += "
        "; + html += "" + options.title + ""; + html += "
        "; + } + + if (options.closed) + { + html += ""; + } + + html += "
        " + options.content; + + if (options.footer || typeof options.footer === "string") + { + html += "
        " + ( (typeof options.footer === "boolean") ? "" : options.footer) + "
        "; + } + + html += "
        "; + + html += "
        "; + html += "
        "; + html += "
        "; + + editor.append(html); + + var dialog = editor.find("." + dialogName); + + dialog.lockScreen = function(lock) { + if (options.lockScreen) + { + $("html,body").css("overflow", (lock) ? "hidden" : ""); + $this.resize(); + } + + return dialog; + }; + + dialog.showMask = function() { + if (options.mask) + { + editor.find("." + classPrefix + "mask").css(options.maskStyle).css("z-index", editormd.dialogZindex - 1).show(); + } + return dialog; + }; + + dialog.hideMask = function() { + if (options.mask) + { + editor.find("." + classPrefix + "mask").hide(); + } + + return dialog; + }; + + dialog.loading = function(show) { + var loading = dialog.find("." + classPrefix + "dialog-mask"); + loading[(show) ? "show" : "hide"](); + + return dialog; + }; + + dialog.lockScreen(true).showMask(); + + dialog.show().css({ + zIndex : editormd.dialogZindex, + border : (editormd.isIE8) ? "1px solid #ddd" : "", + width : (typeof options.width === "number") ? options.width + "px" : options.width, + height : (typeof options.height === "number") ? options.height + "px" : options.height + }); + + var dialogPosition = function(){ + dialog.css({ + top : ($(window).height() - dialog.height()) / 2 + "px", + left : ($(window).width() - dialog.width()) / 2 + "px" + }); + }; + + dialogPosition(); + + $(window).resize(dialogPosition); + + dialog.children("." + classPrefix + "dialog-close").bind(mouseOrTouch("click", "touchend"), function() { + dialog.hide().lockScreen(false).hideMask(); + }); + + if (typeof options.buttons === "object") + { + var footer = dialog.footer = dialog.find("." + classPrefix + "dialog-footer"); + + for (var key in options.buttons) + { + var btn = options.buttons[key]; + var btnClassName = classPrefix + key + "-btn"; + + footer.append(""); + btn[1] = $.proxy(btn[1], dialog); + footer.children("." + btnClassName).bind(mouseOrTouch("click", "touchend"), btn[1]); + } + } + + if (options.title !== "" && options.drag) + { + var posX, posY; + var dialogHeader = dialog.children("." + classPrefix + "dialog-header"); + + if (!options.mask) { + dialogHeader.bind(mouseOrTouch("click", "touchend"), function(){ + editormd.dialogZindex += 2; + dialog.css("z-index", editormd.dialogZindex); + }); + } + + dialogHeader.mousedown(function(e) { + e = e || window.event; //IE + posX = e.clientX - parseInt(dialog[0].style.left); + posY = e.clientY - parseInt(dialog[0].style.top); + + document.onmousemove = moveAction; + }); + + var userCanSelect = function (obj) { + obj.removeClass(classPrefix + "user-unselect").off("selectstart"); + }; + + var userUnselect = function (obj) { + obj.addClass(classPrefix + "user-unselect").on("selectstart", function(event) { // selectstart for IE + return false; + }); + }; + + var moveAction = function (e) { + e = e || window.event; //IE + + var left, top, nowLeft = parseInt(dialog[0].style.left), nowTop = parseInt(dialog[0].style.top); + + if( nowLeft >= 0 ) { + if( nowLeft + dialog.width() <= $(window).width()) { + left = e.clientX - posX; + } else { + left = $(window).width() - dialog.width(); + document.onmousemove = null; + } + } else { + left = 0; + document.onmousemove = null; + } + + if( nowTop >= 0 ) { + top = e.clientY - posY; + } else { + top = 0; + document.onmousemove = null; + } + + + document.onselectstart = function() { + return false; + }; + + userUnselect($("body")); + userUnselect(dialog); + dialog[0].style.left = left + "px"; + dialog[0].style.top = top + "px"; + }; + + document.onmouseup = function() { + userCanSelect($("body")); + userCanSelect(dialog); + + document.onselectstart = null; + document.onmousemove = null; + }; + + dialogHeader.touchDraggable = function() { + var offset = null; + var start = function(e) { + var orig = e.originalEvent; + var pos = $(this).parent().position(); + + offset = { + x : orig.changedTouches[0].pageX - pos.left, + y : orig.changedTouches[0].pageY - pos.top + }; + }; + + var move = function(e) { + e.preventDefault(); + var orig = e.originalEvent; + + $(this).parent().css({ + top : orig.changedTouches[0].pageY - offset.y, + left : orig.changedTouches[0].pageX - offset.x + }); + }; + + this.bind("touchstart", start).bind("touchmove", move); + }; + + dialogHeader.touchDraggable(); + } + + editormd.dialogZindex += 2; + + return dialog; + }; + + /** + * 鼠标和触摸事件的判断/选择方法 + * MouseEvent or TouchEvent type switch + * + * @param {String} [mouseEventType="click"] 供选择的鼠标事件 + * @param {String} [touchEventType="touchend"] 供选择的触摸事件 + * @returns {String} EventType 返回事件类型名称 + */ + + editormd.mouseOrTouch = function(mouseEventType, touchEventType) { + mouseEventType = mouseEventType || "click"; + touchEventType = touchEventType || "touchend"; + + var eventType = mouseEventType; + + try { + document.createEvent("TouchEvent"); + eventType = touchEventType; + } catch(e) {} + + return eventType; + }; + + /** + * 日期时间的格式化方法 + * Datetime format method + * + * @param {String} [format=""] 日期时间的格式,类似PHP的格式 + * @returns {String} datefmt 返回格式化后的日期时间字符串 + */ + + editormd.dateFormat = function(format) { + format = format || ""; + + var addZero = function(d) { + return (d < 10) ? "0" + d : d; + }; + + var date = new Date(); + var year = date.getFullYear(); + var year2 = year.toString().slice(2, 4); + var month = addZero(date.getMonth() + 1); + var day = addZero(date.getDate()); + var weekDay = date.getDay(); + var hour = addZero(date.getHours()); + var min = addZero(date.getMinutes()); + var second = addZero(date.getSeconds()); + var ms = addZero(date.getMilliseconds()); + var datefmt = ""; + + var ymd = year2 + "-" + month + "-" + day; + var fymd = year + "-" + month + "-" + day; + var hms = hour + ":" + min + ":" + second; + + switch (format) + { + case "UNIX Time" : + datefmt = date.getTime(); + break; + + case "UTC" : + datefmt = date.toUTCString(); + break; + + case "yy" : + datefmt = year2; + break; + + case "year" : + case "yyyy" : + datefmt = year; + break; + + case "month" : + case "mm" : + datefmt = month; + break; + + case "cn-week-day" : + case "cn-wd" : + var cnWeekDays = ["日", "一", "二", "三", "四", "五", "六"]; + datefmt = "星期" + cnWeekDays[weekDay]; + break; + + case "week-day" : + case "wd" : + var weekDays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; + datefmt = weekDays[weekDay]; + break; + + case "day" : + case "dd" : + datefmt = day; + break; + + case "hour" : + case "hh" : + datefmt = hour; + break; + + case "min" : + case "ii" : + datefmt = min; + break; + + case "second" : + case "ss" : + datefmt = second; + break; + + case "ms" : + datefmt = ms; + break; + + case "yy-mm-dd" : + datefmt = ymd; + break; + + case "yyyy-mm-dd" : + datefmt = fymd; + break; + + case "yyyy-mm-dd h:i:s ms" : + case "full + ms" : + datefmt = fymd + " " + hms + " " + ms; + break; + + case "full" : + case "yyyy-mm-dd h:i:s" : + default: + datefmt = fymd + " " + hms; + break; + } + + return datefmt; + }; + + return editormd; + +})); diff --git a/static/editor.md/editormd.amd.min.js b/static/editor.md/editormd.amd.min.js new file mode 100644 index 0000000..2301369 --- /dev/null +++ b/static/editor.md/editormd.amd.min.js @@ -0,0 +1,4 @@ +/*! Editor.md v1.5.0 | editormd.amd.min.js | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ +!function(e){"use strict";if("function"==typeof require&&"object"==typeof exports&&"object"==typeof module)module.exports=e;else if("function"==typeof define)if(define.amd){var t="codemirror/mode/",i="codemirror/addon/",o=["jquery","marked","prettify","katex","raphael","underscore","flowchart","jqueryflowchart","sequenceDiagram","codemirror/lib/codemirror",t+"css/css",t+"sass/sass",t+"shell/shell",t+"sql/sql",t+"clike/clike",t+"php/php",t+"xml/xml",t+"markdown/markdown",t+"javascript/javascript",t+"htmlmixed/htmlmixed",t+"gfm/gfm",t+"http/http",t+"go/go",t+"dart/dart",t+"coffeescript/coffeescript",t+"nginx/nginx",t+"python/python",t+"perl/perl",t+"lua/lua",t+"r/r",t+"ruby/ruby",t+"rst/rst",t+"smartymixed/smartymixed",t+"vb/vb",t+"vbscript/vbscript",t+"velocity/velocity",t+"xquery/xquery",t+"yaml/yaml",t+"erlang/erlang",t+"jade/jade",i+"edit/trailingspace",i+"dialog/dialog",i+"search/searchcursor",i+"search/search",i+"scroll/annotatescrollbar",i+"search/matchesonscrollbar",i+"display/placeholder",i+"edit/closetag",i+"fold/foldcode",i+"fold/foldgutter",i+"fold/indent-fold",i+"fold/brace-fold",i+"fold/xml-fold",i+"fold/markdown-fold",i+"fold/comment-fold",i+"mode/overlay",i+"selection/active-line",i+"edit/closebrackets",i+"display/fullscreen",i+"search/match-highlighter"];define(o,e)}else define(["jquery"],e);else window.editormd=e()}(function(){"function"==typeof define&&define.amd&&(e=arguments[0],marked=arguments[1],prettify=arguments[2],katex=arguments[3],Raphael=arguments[4],_=arguments[5],flowchart=arguments[6],CodeMirror=arguments[9]);var e="undefined"!=typeof jQuery?jQuery:Zepto;if("undefined"!=typeof e){var t=function(e,i){return new t.fn.init(e,i)};t.title=t.$name="Editor.md",t.version="1.5.0",t.homePage="https://pandao.github.io/editor.md/",t.classPrefix="editormd-",t.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],mini:["undo","redo","|","watch","preview","|","help","info"]},t.defaults={mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:"",appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",delay:300,autoLoadModules:!0,watch:!0,placeholder:"Enjoy Markdown! coding now...",gotoLine:!0,codeFold:!1,autoHeight:!1,autoFocus:!0,autoCloseTags:!0,searchReplace:!0,syncScrolling:!0,readOnly:!1,tabSize:4,indentUnit:4,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,showTrailingSpace:!0,matchBrackets:!0,indentWithTabs:!0,styleSelectedText:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:!1,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",toc:!0,tocm:!1,tocTitle:"",tocDropdown:!1,tocContainer:"",tocStartLevel:1,htmlDecode:!1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0,toolbar:!0,toolbarAutoFixed:!0,toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return t.toolbarHandlers.ucwords},lowercase:function(){return t.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'a',ucwords:'Aa'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",h1:t.classPrefix+"bold",h2:t.classPrefix+"bold",h3:t.classPrefix+"bold",h4:t.classPrefix+"bold",h5:t.classPrefix+"bold",h6:t.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",info:"fa-info-circle"},toolbarIconTexts:{},lang:{name:"zh-cn",description:"开源在线Markdown编辑器
        Open source online Markdown editor.",tocTitle:"目录",toolbar:{undo:"撤销(Ctrl+Z)",redo:"重做(Ctrl+Y)",bold:"粗体",del:"删除线",italic:"斜体",quote:"引用",ucwords:"将每个单词首字母转成大写",uppercase:"将所选转换成大写",lowercase:"将所选转换成小写",h1:"标题1",h2:"标题2",h3:"标题3",h4:"标题4",h5:"标题5",h6:"标题6","list-ul":"无序列表","list-ol":"有序列表",hr:"横线",link:"链接","reference-link":"引用链接",image:"添加图片",code:"行内代码","preformatted-text":"预格式文本 / 代码块(缩进风格)","code-block":"代码块(多语言风格)",table:"添加表格",datetime:"日期时间",emoji:"Emoji表情","html-entities":"HTML实体字符",pagebreak:"插入分页符","goto-line":"跳转到行",watch:"关闭实时预览",unwatch:"开启实时预览",preview:"全窗口预览HTML(按 Shift + ESC还原)",fullscreen:"全屏(按ESC还原)",clear:"清空",search:"搜索",help:"使用帮助",info:"关于"+t.title},buttons:{enter:"确定",cancel:"取消",close:"关闭"},dialog:{link:{title:"添加链接",url:"链接地址",urlTitle:"链接标题",urlEmpty:"错误:请填写链接地址。"},referenceLink:{title:"添加引用链接",name:"引用名称",url:"链接地址",urlId:"链接ID",urlTitle:"链接标题",nameEmpty:"错误:引用链接的名称不能为空。",idEmpty:"错误:请填写引用链接的ID。",urlEmpty:"错误:请填写引用链接的URL地址。"},image:{title:"添加图片",url:"图片地址",link:"图片链接",alt:"图片描述",uploadButton:"本地上传",imageURLEmpty:"错误:图片地址不能为空。",uploadFileEmpty:"错误:上传的图片不能为空。",formatNotAllowed:"错误:只允许上传图片文件,允许上传的图片文件格式有:"},preformattedText:{title:"添加预格式文本或代码块",emptyAlert:"错误:请填写预格式文本或代码的内容。"},codeBlock:{title:"添加代码块",selectLabel:"代码语言:",selectDefaultText:"请选择代码语言",otherLanguage:"其他语言",unselectedLanguageAlert:"错误:请选择代码所属的语言类型。",codeEmptyAlert:"错误:请填写代码内容。"},htmlEntities:{title:"HTML 实体字符"},help:{title:"使用帮助"}}}},t.classNames={tex:t.classPrefix+"tex"},t.dialogZindex=99999,t.$katex=null,t.$marked=null,t.$CodeMirror=null,t.$prettyPrint=null;var i,o;t.prototype=t.fn={state:{watching:!1,loaded:!1,preview:!1,fullscreen:!1},init:function(i,o){o=o||{},"object"==typeof i&&(o=i);var r=this.classPrefix=t.classPrefix,n=this.settings=e.extend(!0,t.defaults,o);i="object"==typeof i?n.id:i;var a=this.editor=e("#"+i);this.id=i,this.lang=n.lang;var s=this.classNames={textarea:{html:r+"html-textarea",markdown:r+"markdown-textarea"}};n.pluginPath=""===n.pluginPath?n.path+"../plugins/":n.pluginPath,this.state.watching=n.watch?!0:!1,a.hasClass("editormd")||a.addClass("editormd"),a.css({width:"number"==typeof n.width?n.width+"px":n.width,height:"number"==typeof n.height?n.height+"px":n.height}),n.autoHeight&&a.css("height","auto");var l=this.markdownTextarea=a.children("textarea");l.length<1&&(a.append(""),l=this.markdownTextarea=a.children("textarea")),l.addClass(s.textarea.markdown).attr("placeholder",n.placeholder),("undefined"==typeof l.attr("name")||""===l.attr("name"))&&l.attr("name",""!==n.name?n.name:i+"-markdown-doc");var c=[n.readOnly?"":'',n.saveHTMLToTextarea?'':"",'
        ','
        ','
        '].join("\n");return a.append(c).addClass(r+"vertical"),""!==n.theme&&a.addClass(r+"theme-"+n.theme),this.mask=a.children("."+r+"mask"),this.containerMask=a.children("."+r+"container-mask"),""!==n.markdown&&l.val(n.markdown),""!==n.appendMarkdown&&l.val(l.val()+n.appendMarkdown),this.htmlTextarea=a.children("."+s.textarea.html),this.preview=a.children("."+r+"preview"),this.previewContainer=this.preview.children("."+r+"preview-container"),""!==n.previewTheme&&this.preview.addClass(r+"preview-theme-"+n.previewTheme),"function"==typeof define&&define.amd&&("undefined"!=typeof katex&&(t.$katex=katex),n.searchReplace&&!n.readOnly&&(t.loadCSS(n.path+"codemirror/addon/dialog/dialog"),t.loadCSS(n.path+"codemirror/addon/search/matchesonscrollbar"))),"function"==typeof define&&define.amd||!n.autoLoadModules?("undefined"!=typeof CodeMirror&&(t.$CodeMirror=CodeMirror),"undefined"!=typeof marked&&(t.$marked=marked),this.setCodeMirror().setToolbar().loadedDisplay()):this.loadQueues(),this},loadQueues:function(){var e=this,i=this.settings,o=i.path,r=function(){return t.isIE8?void e.loadedDisplay():void(i.flowChart||i.sequenceDiagram?t.loadScript(o+"raphael.min",function(){t.loadScript(o+"underscore.min",function(){!i.flowChart&&i.sequenceDiagram?t.loadScript(o+"sequence-diagram.min",function(){e.loadedDisplay()}):i.flowChart&&!i.sequenceDiagram?t.loadScript(o+"flowchart.min",function(){t.loadScript(o+"jquery.flowchart.min",function(){e.loadedDisplay()})}):i.flowChart&&i.sequenceDiagram&&t.loadScript(o+"flowchart.min",function(){t.loadScript(o+"jquery.flowchart.min",function(){t.loadScript(o+"sequence-diagram.min",function(){e.loadedDisplay()})})})})}):e.loadedDisplay())};return t.loadCSS(o+"codemirror/codemirror.min"),i.searchReplace&&!i.readOnly&&(t.loadCSS(o+"codemirror/addon/dialog/dialog"),t.loadCSS(o+"codemirror/addon/search/matchesonscrollbar")),i.codeFold&&t.loadCSS(o+"codemirror/addon/fold/foldgutter"),t.loadScript(o+"codemirror/codemirror.min",function(){t.$CodeMirror=CodeMirror,t.loadScript(o+"codemirror/modes.min",function(){t.loadScript(o+"codemirror/addons.min",function(){return e.setCodeMirror(),"gfm"!==i.mode&&"markdown"!==i.mode?(e.loadedDisplay(),!1):(e.setToolbar(),void t.loadScript(o+"marked.min",function(){t.$marked=marked,i.previewCodeHighlight?t.loadScript(o+"prettify.min",function(){r()}):r()}))})})}),this},setTheme:function(e){var t=this.editor,i=this.settings.theme,o=this.classPrefix+"theme-";return t.removeClass(o+i).addClass(o+e),this.settings.theme=e,this},setEditorTheme:function(e){var i=this.settings;return i.editorTheme=e,"default"!==e&&t.loadCSS(i.path+"codemirror/theme/"+i.editorTheme),this.cm.setOption("theme",e),this},setCodeMirrorTheme:function(e){return this.setEditorTheme(e),this},setPreviewTheme:function(e){var t=this.preview,i=this.settings.previewTheme,o=this.classPrefix+"preview-theme-";return t.removeClass(o+i).addClass(o+e),this.settings.previewTheme=e,this},setCodeMirror:function(){var e=this.settings,i=this.editor;"default"!==e.editorTheme&&t.loadCSS(e.path+"codemirror/theme/"+e.editorTheme);var o={mode:e.mode,theme:e.editorTheme,tabSize:e.tabSize,dragDrop:!1,autofocus:e.autoFocus,autoCloseTags:e.autoCloseTags,readOnly:e.readOnly?"nocursor":!1,indentUnit:e.indentUnit,lineNumbers:e.lineNumbers,lineWrapping:e.lineWrapping,extraKeys:{"Ctrl-Q":function(e){e.foldCode(e.getCursor())}},foldGutter:e.codeFold,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:e.matchBrackets,indentWithTabs:e.indentWithTabs,styleActiveLine:e.styleActiveLine,styleSelectedText:e.styleSelectedText,autoCloseBrackets:e.autoCloseBrackets,showTrailingSpace:e.showTrailingSpace,highlightSelectionMatches:e.matchWordHighlight?{showToken:"onselected"===e.matchWordHighlight?!1:/\w/}:!1};return this.codeEditor=this.cm=t.$CodeMirror.fromTextArea(this.markdownTextarea[0],o),this.codeMirror=this.cmElement=i.children(".CodeMirror"),""!==e.value&&this.cm.setValue(e.value),this.codeMirror.css({fontSize:e.fontSize,width:e.watch?"50%":"100%"}),e.autoHeight&&(this.codeMirror.css("height","auto"),this.cm.setOption("viewportMargin",1/0)),e.lineNumbers||this.codeMirror.find(".CodeMirror-gutters").css("border-right","none"),this},getCodeMirrorOption:function(e){return this.cm.getOption(e)},setCodeMirrorOption:function(e,t){return this.cm.setOption(e,t),this},addKeyMap:function(e,t){return this.cm.addKeyMap(e,t),this},removeKeyMap:function(e){return this.cm.removeKeyMap(e),this},gotoLine:function(t){var i=this.settings;if(!i.gotoLine)return this;var o=this.cm,r=(this.editor,o.lineCount()),n=this.preview;if("string"==typeof t&&("last"===t&&(t=r),"first"===t&&(t=1)),"number"!=typeof t)return alert("Error: The line number must be an integer."),this;if(t=parseInt(t)-1,t>r)return alert("Error: The line number range 1-"+r),this;o.setCursor({line:t,ch:0});var a=o.getScrollInfo(),s=a.clientHeight,l=o.charCoords({line:t,ch:0},"local");if(o.scrollTo(null,(l.top+l.bottom-s)/2),i.watch){var c=this.codeMirror.find(".CodeMirror-scroll")[0],h=e(c).height(),d=c.scrollTop,u=d/c.scrollHeight;n.scrollTop(0===d?0:d+h>=c.scrollHeight-16?n[0].scrollHeight:n[0].scrollHeight*u)}return o.focus(),this},extend:function(){return"undefined"!=typeof arguments[1]&&("function"==typeof arguments[1]&&(arguments[1]=e.proxy(arguments[1],this)),this[arguments[0]]=arguments[1]),"object"==typeof arguments[0]&&"undefined"==typeof arguments[0].length&&e.extend(!0,this,arguments[0]),this},set:function(t,i){return"undefined"!=typeof i&&"function"==typeof i&&(i=e.proxy(i,this)),this[t]=i,this},config:function(t,i){var o=this.settings;return"object"==typeof t&&(o=e.extend(!0,o,t)),"string"==typeof t&&(o[t]=i),this.settings=o,this.recreate(),this},on:function(t,i){var o=this.settings;return"undefined"!=typeof o["on"+t]&&(o["on"+t]=e.proxy(i,this)),this},off:function(e){var t=this.settings;return"undefined"!=typeof t["on"+e]&&(t["on"+e]=function(){}),this},showToolbar:function(t){var i=this.settings;return i.readOnly?this:(i.toolbar&&(this.toolbar.length<1||""===this.toolbar.find("."+this.classPrefix+"menu").html())&&this.setToolbar(),i.toolbar=!0,this.toolbar.show(),this.resize(),e.proxy(t||function(){},this)(),this)},hideToolbar:function(t){var i=this.settings;return i.toolbar=!1,this.toolbar.hide(),this.resize(),e.proxy(t||function(){},this)(),this},setToolbarAutoFixed:function(t){var i=this.state,o=this.editor,r=this.toolbar,n=this.settings;"undefined"!=typeof t&&(n.toolbarAutoFixed=t);var a=function(){var t=e(window),i=t.scrollTop();return n.toolbarAutoFixed?void r.css(i-o.offset().top>10&&i
          ';i.append(n),r=this.toolbar=i.children("."+o+"toolbar")}if(!e.toolbar)return r.hide(),this;r.show();for(var a="function"==typeof e.toolbarIcons?e.toolbarIcons():"string"==typeof e.toolbarIcons?t.toolbarModes[e.toolbarIcons]:e.toolbarIcons,s=r.find("."+this.classPrefix+"menu"),l="",c=!1,h=0,d=a.length;d>h;h++){var u=a[h];if("||"===u)c=!0;else if("|"===u)l+='
        • |
        • ';else{var f=/h(\d)/.test(u),g=u;"watch"!==u||e.watch||(g="unwatch");var p=e.lang.toolbar[g],m=e.toolbarIconTexts[g],w=e.toolbarIconsClass[g];p="undefined"==typeof p?"":p,m="undefined"==typeof m?"":m,w="undefined"==typeof w?"":w;var v=c?'
        • ':"
        • ";"undefined"!=typeof e.toolbarCustomIcons[u]&&"function"!=typeof e.toolbarCustomIcons[u]?v+=e.toolbarCustomIcons[u]:(v+='',v+=''+(f?u.toUpperCase():""===w?m:"")+"",v+=""),v+="
        • ",l=c?v+l:l+v}}return s.html(l),s.find('[title="Lowercase"]').attr("title",e.lang.toolbar.lowercase),s.find('[title="ucwords"]').attr("title",e.lang.toolbar.ucwords),this.setToolbarHandler(),this.setToolbarAutoFixed(),this},dialogLockScreen:function(){return e.proxy(t.dialogLockScreen,this)(),this},dialogShowMask:function(i){return e.proxy(t.dialogShowMask,this)(i),this},getToolbarHandles:function(e){var i=this.toolbarHandlers=t.toolbarHandlers;return e&&"undefined"!=typeof toolbarIconHandlers[e]?i[e]:i},setToolbarHandler:function(){var i=this,o=this.settings;if(!o.toolbar||o.readOnly)return this;var r=this.toolbar,n=this.cm,a=this.classPrefix,s=this.toolbarIcons=r.find("."+a+"menu > li > a"),l=this.getToolbarHandles();return s.bind(t.mouseOrTouch("click","touchend"),function(t){var r=e(this).children(".fa"),a=r.attr("name"),s=n.getCursor(),c=n.getSelection();return""!==a?(i.activeIcon=r,"undefined"!=typeof l[a]?e.proxy(l[a],i)(n):"undefined"!=typeof o.toolbarHandlers[a]&&e.proxy(o.toolbarHandlers[a],i)(n,r,s,c),"link"!==a&&"reference-link"!==a&&"image"!==a&&"code-block"!==a&&"preformatted-text"!==a&&"watch"!==a&&"preview"!==a&&"search"!==a&&"fullscreen"!==a&&"info"!==a&&n.focus(),!1):void 0}),this},createDialog:function(i){return e.proxy(t.createDialog,this)(i)},createInfoDialog:function(){var e=this,i=this.editor,o=this.classPrefix,r=['
          ','
          ','

          '+t.title+"v"+t.version+"

          ","

          "+this.lang.description+"

          ",'

          '+t.homePage+'

          ','

          Copyright © 2015 Pandao, The MIT License.

          ',"
          ",'',"
          "].join("\n");i.append(r);var n=this.infoDialog=i.children("."+o+"dialog-info");return n.find("."+o+"dialog-close").bind(t.mouseOrTouch("click","touchend"),function(){e.hideInfoDialog()}),n.css("border",t.isIE8?"1px solid #ddd":"").css("z-index",t.dialogZindex).show(),this.infoDialogPosition(),this},infoDialogPosition:function(){var t=this.infoDialog,i=function(){t.css({top:(e(window).height()-t.height())/2+"px",left:(e(window).width()-t.width())/2+"px"})};return i(),e(window).resize(i),this},showInfoDialog:function(){e("html,body").css("overflow-x","hidden");var i=this.editor,o=this.settings,r=this.infoDialog=i.children("."+this.classPrefix+"dialog-info");return r.length<1&&this.createInfoDialog(),this.lockScreen(!0),this.mask.css({opacity:o.dialogMaskOpacity,backgroundColor:o.dialogMaskBgColor}).show(),r.css("z-index",t.dialogZindex).show(),this.infoDialogPosition(),this},hideInfoDialog:function(){return e("html,body").css("overflow-x",""),this.infoDialog.hide(),this.mask.hide(),this.lockScreen(!1),this},lockScreen:function(e){return t.lockScreen(e),this.resize(),this},recreate:function(){var e=this.editor,t=this.settings;return this.codeMirror.remove(),this.setCodeMirror(),t.readOnly||(e.find(".editormd-dialog").length>0&&e.find(".editormd-dialog").remove(),t.toolbar&&(this.getToolbarHandles(),this.setToolbar())),this.loadedDisplay(!0),this},previewCodeHighlight:function(){var e=this.settings,t=this.previewContainer;return e.previewCodeHighlight&&(t.find("pre").addClass("prettyprint linenums"),"undefined"!=typeof prettyPrint&&prettyPrint()),this},katexRender:function(){return null===i?this:(this.previewContainer.find("."+t.classNames.tex).each(function(){var i=e(this);t.$katex.render(i.text(),i[0]),i.find(".katex").css("font-size","1.6em")}),this)},flowChartAndSequenceDiagramRender:function(){var i=this,r=this.settings,n=this.previewContainer;if(t.isIE8)return this;if(r.flowChart){if(null===o)return this;n.find(".flowchart").flowChart()}r.sequenceDiagram&&n.find(".sequence-diagram").sequenceDiagram({theme:"simple"});var a=i.preview,s=i.codeMirror,l=s.find(".CodeMirror-scroll"),c=l.height(),h=l.scrollTop(),d=h/l[0].scrollHeight,u=0;a.find(".markdown-toc-list").each(function(){u+=e(this).height()});var f=a.find(".editormd-toc-menu").height();return f=f?f:0,a.scrollTop(0===h?0:h+c>=l[0].scrollHeight-16?a[0].scrollHeight:(a[0].scrollHeight+u+f)*d),this},registerKeyMaps:function(i){var o=this,r=this.cm,n=this.settings,a=t.toolbarHandlers,s=n.disabledKeyMaps;if(i=i||null){for(var l in i)if(e.inArray(l,s)<0){var c={};c[l]=i[l],r.addKeyMap(i)}}else{for(var h in t.keyMaps){var d=t.keyMaps[h],u="string"==typeof d?e.proxy(a[d],o):e.proxy(d,o);if(e.inArray(h,["F9","F10","F11"])<0&&e.inArray(h,s)<0){var f={};f[h]=u,r.addKeyMap(f)}}e(window).keydown(function(t){var i={120:"F9",121:"F10",122:"F11"};if(e.inArray(i[t.keyCode],s)<0)switch(t.keyCode){case 120:return e.proxy(a.watch,o)(),!1;case 121:return e.proxy(a.preview,o)(),!1;case 122:return e.proxy(a.fullscreen,o)(),!1}})}return this},bindScrollEvent:function(){var i=this,o=this.preview,r=this.settings,n=this.codeMirror,a=t.mouseOrTouch;if(!r.syncScrolling)return this;var s=function(){n.find(".CodeMirror-scroll").bind(a("scroll","touchmove"),function(t){var n=e(this).height(),a=e(this).scrollTop(),s=a/e(this)[0].scrollHeight,l=0;o.find(".markdown-toc-list").each(function(){l+=e(this).height()});var c=o.find(".editormd-toc-menu").height();c=c?c:0,o.scrollTop(0===a?0:a+n>=e(this)[0].scrollHeight-16?o[0].scrollHeight:(o[0].scrollHeight+l+c)*s),e.proxy(r.onscroll,i)(t)})},l=function(){n.find(".CodeMirror-scroll").unbind(a("scroll","touchmove"))},c=function(){o.bind(a("scroll","touchmove"),function(t){var o=e(this).height(),a=e(this).scrollTop(),s=a/e(this)[0].scrollHeight,l=n.find(".CodeMirror-scroll");l.scrollTop(0===a?0:a+o>=e(this)[0].scrollHeight?l[0].scrollHeight:l[0].scrollHeight*s),e.proxy(r.onpreviewscroll,i)(t)})},h=function(){o.unbind(a("scroll","touchmove"))};return n.bind({mouseover:s,mouseout:l,touchstart:s,touchend:l}),"single"===r.syncScrolling?this:(o.bind({mouseover:c,mouseout:h,touchstart:c,touchend:h}),this)},bindChangeEvent:function(){var e=this,t=this.cm,o=this.settings;return o.syncScrolling?(t.on("change",function(t,r){o.watch&&e.previewContainer.css("padding",o.autoHeight?"20px 20px 50px 40px":"20px"),i=setTimeout(function(){clearTimeout(i),e.save(),i=null},o.delay)}),this):this},loadedDisplay:function(t){t=t||!1;var i=this,o=this.editor,r=this.preview,n=this.settings;return this.containerMask.hide(),this.save(),n.watch&&r.show(),o.data("oldWidth",o.width()).data("oldHeight",o.height()),this.resize(),this.registerKeyMaps(),e(window).resize(function(){i.resize()}),this.bindScrollEvent().bindChangeEvent(),t||e.proxy(n.onload,this)(),this.state.loaded=!0,this},width:function(e){return this.editor.css("width","number"==typeof e?e+"px":e),this.resize(),this},height:function(e){return this.editor.css("height","number"==typeof e?e+"px":e),this.resize(),this},resize:function(t,i){t=t||null,i=i||null;var o=this.state,r=this.editor,n=this.preview,a=this.toolbar,s=this.settings,l=this.codeMirror;if(t&&r.css("width","number"==typeof t?t+"px":t),!s.autoHeight||o.fullscreen||o.preview?(i&&r.css("height","number"==typeof i?i+"px":i),o.fullscreen&&r.height(e(window).height()),s.toolbar&&!s.readOnly?l.css("margin-top",a.height()+1).height(r.height()-a.height()):l.css("margin-top",0).height(r.height())):(r.css("height","auto"),l.css("height","auto")),s.watch)if(l.width(r.width()/2),n.width(o.preview?r.width():r.width()/2),this.previewContainer.css("padding",s.autoHeight?"20px 20px 50px 40px":"20px"),s.toolbar&&!s.readOnly?n.css("top",a.height()+1):n.css("top",0),!s.autoHeight||o.fullscreen||o.preview){var c=s.toolbar&&!s.readOnly?r.height()-a.height():r.height();n.height(c)}else n.height("");else l.width(r.width()),n.hide();return o.loaded&&e.proxy(s.onresize,this)(),this},save:function(){if(null===i)return this;var r=this,n=this.state,a=this.settings,s=this.cm,l=s.getValue(),c=this.previewContainer;if("gfm"!==a.mode&&"markdown"!==a.mode)return this.markdownTextarea.val(l),this;var h=t.$marked,d=this.markdownToC=[],u=this.markedRendererOptions={toc:a.toc,tocm:a.tocm,tocStartLevel:a.tocStartLevel,pageBreak:a.pageBreak,taskList:a.taskList,emoji:a.emoji,tex:a.tex,atLink:a.atLink,emailLink:a.emailLink,flowChart:a.flowChart,sequenceDiagram:a.sequenceDiagram,previewCodeHighlight:a.previewCodeHighlight},f=this.markedOptions={renderer:t.markedRenderer(d,u),gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:a.htmlDecode?!1:!0,smartLists:!0,smartypants:!0};h.setOptions(f);var g=t.$marked(l,f);if(g=t.filterHTMLTags(g,a.htmlDecode),this.markdownTextarea.text(l),s.save(),a.saveHTMLToTextarea&&this.htmlTextarea.text(g),a.watch||!a.watch&&n.preview){if(c.html(g),this.previewCodeHighlight(),a.toc){var p=""===a.tocContainer?c:e(a.tocContainer),m=p.find("."+this.classPrefix+"toc-menu");p.attr("previewContainer",""===a.tocContainer?"true":"false"),""!==a.tocContainer&&m.length>0&&m.remove(),t.markdownToCRenderer(d,p,a.tocDropdown,a.tocStartLevel),(a.tocDropdown||p.find("."+this.classPrefix+"toc-menu").length>0)&&t.tocDropdownMenu(p,""!==a.tocTitle?a.tocTitle:this.lang.tocTitle),""!==a.tocContainer&&c.find(".markdown-toc").css("border","none")}a.tex&&(!t.kaTeXLoaded&&a.autoLoadModules?t.loadKaTeX(function(){t.$katex=katex,t.kaTeXLoaded=!0,r.katexRender()}):(t.$katex=katex,this.katexRender())),(a.flowChart||a.sequenceDiagram)&&(o=setTimeout(function(){clearTimeout(o),r.flowChartAndSequenceDiagramRender(),o=null},10)),n.loaded&&e.proxy(a.onchange,this)()}return this},focus:function(){return this.cm.focus(),this},setCursor:function(e){return this.cm.setCursor(e),this},getCursor:function(){return this.cm.getCursor()},setSelection:function(e,t){return this.cm.setSelection(e,t),this},getSelection:function(){return this.cm.getSelection()},setSelections:function(e){return this.cm.setSelections(e),this},getSelections:function(){return this.cm.getSelections()},replaceSelection:function(e){return this.cm.replaceSelection(e),this},insertValue:function(e){return this.replaceSelection(e),this},appendMarkdown:function(e){var t=(this.settings,this.cm);return t.setValue(t.getValue()+e),this},setMarkdown:function(e){return this.cm.setValue(e||this.settings.markdown),this},getMarkdown:function(){return this.cm.getValue()},getValue:function(){return this.cm.getValue()},setValue:function(e){return this.cm.setValue(e),this},clear:function(){return this.cm.setValue(""),this},getHTML:function(){return this.settings.saveHTMLToTextarea?this.htmlTextarea.val():(alert("Error: settings.saveHTMLToTextarea == false"),!1)},getTextareaSavedHTML:function(){return this.getHTML()},getPreviewedHTML:function(){return this.settings.watch?this.previewContainer.html():(alert("Error: settings.watch == false"),!1)},watch:function(t){var o=this.settings;if(e.inArray(o.mode,["gfm","markdown"])<0)return this;if(this.state.watching=o.watch=!0,this.preview.show(),this.toolbar){var r=o.toolbarIconsClass.watch,n=o.toolbarIconsClass.unwatch,a=this.toolbar.find(".fa[name=watch]");a.parent().attr("title",o.lang.toolbar.watch),a.removeClass(n).addClass(r)}return this.codeMirror.css("border-right","1px solid #ddd").width(this.editor.width()/2),i=0,this.save().resize(),o.onwatch||(o.onwatch=t||function(){}),e.proxy(o.onwatch,this)(),this},unwatch:function(t){var i=this.settings;if(this.state.watching=i.watch=!1,this.preview.hide(),this.toolbar){var o=i.toolbarIconsClass.watch,r=i.toolbarIconsClass.unwatch,n=this.toolbar.find(".fa[name=watch]");n.parent().attr("title",i.lang.toolbar.unwatch),n.removeClass(o).addClass(r)}return this.codeMirror.css("border-right","none").width(this.editor.width()),this.resize(),i.onunwatch||(i.onunwatch=t||function(){}),e.proxy(i.onunwatch,this)(),this},show:function(t){t=t||function(){};var i=this;return this.editor.show(0,function(){e.proxy(t,i)()}),this},hide:function(t){t=t||function(){};var i=this;return this.editor.hide(0,function(){e.proxy(t,i)()}),this},previewing:function(){var i=this,o=this.editor,r=this.preview,n=this.toolbar,a=this.settings,s=this.codeMirror,l=this.previewContainer;if(e.inArray(a.mode,["gfm","markdown"])<0)return this;a.toolbar&&n&&(n.toggle(),n.find(".fa[name=preview]").toggleClass("active")),s.toggle();var c=function(e){e.shiftKey&&27===e.keyCode&&i.previewed()};"none"===s.css("display")?(this.state.preview=!0,this.state.fullscreen&&r.css("background","#fff"),o.find("."+this.classPrefix+"preview-close-btn").show().bind(t.mouseOrTouch("click","touchend"),function(){i.previewed()}),a.watch?l.css("padding",""):this.save(),l.addClass(this.classPrefix+"preview-active"),r.show().css({position:"",top:0,width:o.width(),height:a.autoHeight&&!this.state.fullscreen?"auto":o.height()}),this.state.loaded&&e.proxy(a.onpreviewing,this)(),e(window).bind("keyup",c)):(e(window).unbind("keyup",c),this.previewed())},previewed:function(){var i=this.editor,o=this.preview,r=this.toolbar,n=this.settings,a=this.previewContainer,s=i.find("."+this.classPrefix+"preview-close-btn");return this.state.preview=!1,this.codeMirror.show(),n.toolbar&&r.show(),o[n.watch?"show":"hide"](),s.hide().unbind(t.mouseOrTouch("click","touchend")),a.removeClass(this.classPrefix+"preview-active"),n.watch&&a.css("padding","20px"),o.css({background:null,position:"absolute",width:i.width()/2,height:n.autoHeight&&!this.state.fullscreen?"auto":i.height()-r.height(),top:n.toolbar?r.height():0}),this.state.loaded&&e.proxy(n.onpreviewed,this)(),this},fullscreen:function(){var t=this,i=this.state,o=this.editor,r=(this.preview,this.toolbar),n=this.settings,a=this.classPrefix+"fullscreen";r&&r.find(".fa[name=fullscreen]").parent().toggleClass("active");var s=function(e){e.shiftKey||27!==e.keyCode||i.fullscreen&&t.fullscreenExit()};return o.hasClass(a)?(e(window).unbind("keyup",s),this.fullscreenExit()):(i.fullscreen=!0,e("html,body").css("overflow","hidden"),o.css({width:e(window).width(),height:e(window).height()}).addClass(a),this.resize(),e.proxy(n.onfullscreen,this)(),e(window).bind("keyup",s)),this},fullscreenExit:function(){var t=this.editor,i=this.settings,o=this.toolbar,r=this.classPrefix+"fullscreen";return this.state.fullscreen=!1,o&&o.find(".fa[name=fullscreen]").parent().removeClass("active"),e("html,body").css("overflow",""),t.css({width:t.data("oldWidth"),height:t.data("oldHeight")}).removeClass(r),this.resize(),e.proxy(i.onfullscreenExit,this)(),this},executePlugin:function(i,o){var r=this,n=this.cm,a=this.settings;return o=a.pluginPath+o,"function"==typeof define?"undefined"==typeof this[i]?(alert("Error: "+i+" plugin is not found, you are not load this plugin."),this):(this[i](n),this):(e.inArray(o,t.loadFiles.plugin)<0?t.loadPlugin(o,function(){t.loadPlugins[i]=r[i],r[i](n)}):e.proxy(t.loadPlugins[i],this)(n),this)},search:function(e){var t=this.settings;return t.searchReplace?(t.readOnly||this.cm.execCommand(e||"find"),this):(alert("Error: settings.searchReplace == false"),this)},searchReplace:function(){return this.search("replace"),this},searchReplaceAll:function(){return this.search("replaceAll"),this}},t.fn.init.prototype=t.fn,t.dialogLockScreen=function(){var t=this.settings||{dialogLockScreen:!0};t.dialogLockScreen&&(e("html,body").css("overflow","hidden"),this.resize())},t.dialogShowMask=function(t){var i=this.editor,o=this.settings||{dialogShowMask:!0};t.css({top:(e(window).height()-t.height())/2+"px",left:(e(window).width()-t.width())/2+"px"}),o.dialogShowMask&&i.children("."+this.classPrefix+"mask").css("z-index",parseInt(t.css("z-index"))-1).show()},t.toolbarHandlers={undo:function(){this.cm.undo()},redo:function(){this.cm.redo()},bold:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(); + +e.replaceSelection("**"+i+"**"),""===i&&e.setCursor(t.line,t.ch+2)},del:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("~~"+i+"~~"),""===i&&e.setCursor(t.line,t.ch+2)},italic:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("*"+i+"*"),""===i&&e.setCursor(t.line,t.ch+1)},quote:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("> "+i),e.setCursor(t.line,t.ch+2)):e.replaceSelection("> "+i)},ucfirst:function(){var e=this.cm,i=e.getSelection(),o=e.listSelections();e.replaceSelection(t.firstUpperCase(i)),e.setSelections(o)},ucwords:function(){var e=this.cm,i=e.getSelection(),o=e.listSelections();e.replaceSelection(t.wordsFirstUpperCase(i)),e.setSelections(o)},uppercase:function(){var e=this.cm,t=e.getSelection(),i=e.listSelections();e.replaceSelection(t.toUpperCase()),e.setSelections(i)},lowercase:function(){var e=this.cm,t=(e.getCursor(),e.getSelection()),i=e.listSelections();e.replaceSelection(t.toLowerCase()),e.setSelections(i)},h1:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("# "+i),e.setCursor(t.line,t.ch+2)):e.replaceSelection("# "+i)},h2:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("## "+i),e.setCursor(t.line,t.ch+3)):e.replaceSelection("## "+i)},h3:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("### "+i),e.setCursor(t.line,t.ch+4)):e.replaceSelection("### "+i)},h4:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("#### "+i),e.setCursor(t.line,t.ch+5)):e.replaceSelection("#### "+i)},h5:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("##### "+i),e.setCursor(t.line,t.ch+6)):e.replaceSelection("##### "+i)},h6:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("###### "+i),e.setCursor(t.line,t.ch+7)):e.replaceSelection("###### "+i)},"list-ul":function(){var e=this.cm,t=(e.getCursor(),e.getSelection());if(""===t)e.replaceSelection("- "+t);else{for(var i=t.split("\n"),o=0,r=i.length;r>o;o++)i[o]=""===i[o]?"":"- "+i[o];e.replaceSelection(i.join("\n"))}},"list-ol":function(){var e=this.cm,t=(e.getCursor(),e.getSelection());if(""===t)e.replaceSelection("1. "+t);else{for(var i=t.split("\n"),o=0,r=i.length;r>o;o++)i[o]=""===i[o]?"":o+1+". "+i[o];e.replaceSelection(i.join("\n"))}},hr:function(){{var e=this.cm,t=e.getCursor();e.getSelection()}e.replaceSelection((0!==t.ch?"\n\n":"\n")+"------------\n\n")},tex:function(){if(!this.settings.tex)return alert("settings.tex === false"),this;var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("$$"+i+"$$"),""===i&&e.setCursor(t.line,t.ch+2)},link:function(){this.executePlugin("linkDialog","link-dialog/link-dialog")},"reference-link":function(){this.executePlugin("referenceLinkDialog","reference-link-dialog/reference-link-dialog")},pagebreak:function(){if(!this.settings.pageBreak)return alert("settings.pageBreak === false"),this;{var e=this.cm;e.getSelection()}e.replaceSelection("\r\n[========]\r\n")},image:function(){this.executePlugin("imageDialog","image-dialog/image-dialog")},code:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("`"+i+"`"),""===i&&e.setCursor(t.line,t.ch+1)},"code-block":function(){this.executePlugin("codeBlockDialog","code-block-dialog/code-block-dialog")},"preformatted-text":function(){this.executePlugin("preformattedTextDialog","preformatted-text-dialog/preformatted-text-dialog")},table:function(){this.executePlugin("tableDialog","table-dialog/table-dialog")},datetime:function(){var e=this.cm,i=(e.getSelection(),new Date,this.settings.lang.name),o=t.dateFormat()+" "+t.dateFormat("zh-cn"===i||"zh-tw"===i?"cn-week-day":"week-day");e.replaceSelection(o)},emoji:function(){this.executePlugin("emojiDialog","emoji-dialog/emoji-dialog")},"html-entities":function(){this.executePlugin("htmlEntitiesDialog","html-entities-dialog/html-entities-dialog")},"goto-line":function(){this.executePlugin("gotoLineDialog","goto-line-dialog/goto-line-dialog")},watch:function(){this[this.settings.watch?"unwatch":"watch"]()},preview:function(){this.previewing()},fullscreen:function(){this.fullscreen()},clear:function(){this.clear()},search:function(){this.search()},help:function(){this.executePlugin("helpDialog","help-dialog/help-dialog")},info:function(){this.showInfoDialog()}},t.keyMaps={"Ctrl-1":"h1","Ctrl-2":"h2","Ctrl-3":"h3","Ctrl-4":"h4","Ctrl-5":"h5","Ctrl-6":"h6","Ctrl-B":"bold","Ctrl-D":"datetime","Ctrl-E":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();return this.settings.emoji?(e.replaceSelection(":"+i+":"),void(""===i&&e.setCursor(t.line,t.ch+1))):void alert("Error: settings.emoji == false")},"Ctrl-Alt-G":"goto-line","Ctrl-H":"hr","Ctrl-I":"italic","Ctrl-K":"code","Ctrl-L":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=""===i?"":' "'+i+'"';e.replaceSelection("["+i+"]("+o+")"),""===i&&e.setCursor(t.line,t.ch+1)},"Ctrl-U":"list-ul","Shift-Ctrl-A":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();return this.settings.atLink?(e.replaceSelection("@"+i),void(""===i&&e.setCursor(t.line,t.ch+1))):void alert("Error: settings.atLink == false")},"Shift-Ctrl-C":"code","Shift-Ctrl-Q":"quote","Shift-Ctrl-S":"del","Shift-Ctrl-K":"tex","Shift-Alt-C":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection(["```",i,"```"].join("\n")),""===i&&e.setCursor(t.line,t.ch+3)},"Shift-Ctrl-Alt-C":"code-block","Shift-Ctrl-H":"html-entities","Shift-Alt-H":"help","Shift-Ctrl-E":"emoji","Shift-Ctrl-U":"uppercase","Shift-Alt-U":"ucwords","Shift-Ctrl-Alt-U":"ucfirst","Shift-Alt-L":"lowercase","Shift-Ctrl-I":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=""===i?"":' "'+i+'"';e.replaceSelection("!["+i+"]("+o+")"),""===i&&e.setCursor(t.line,t.ch+4)},"Shift-Ctrl-Alt-I":"image","Shift-Ctrl-L":"link","Shift-Ctrl-O":"list-ol","Shift-Ctrl-P":"preformatted-text","Shift-Ctrl-T":"table","Shift-Alt-P":"pagebreak",F9:"watch",F10:"preview",F11:"fullscreen"};var r=function(e){return String.prototype.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};t.trim=r;var n=function(e){return e.toLowerCase().replace(/\b(\w)|\s(\w)/g,function(e){return e.toUpperCase()})};t.ucwords=t.wordsFirstUpperCase=n;var a=function(e){return e.toLowerCase().replace(/\b(\w)/,function(e){return e.toUpperCase()})};return t.firstUpperCase=t.ucfirst=a,t.urls={atLinkBase:"https://github.com/"},t.regexs={atLink:/@(\w+)/g,email:/(\w+)@(\w+)\.(\w+)\.?(\w+)?/g,emailLink:/(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g,emoji:/:([\w\+-]+):/g,emojiDatetime:/(\d{2}:\d{2}:\d{2})/g,twemoji:/:(tw-([\w]+)-?(\w+)?):/g,fontAwesome:/:(fa-([\w]+)(-(\w+)){0,}):/g,editormdLogo:/:(editormd-logo-?(\w+)?):/g,pageBreak:/^\[[=]{8,}\]$/},t.emoji={path:"http://www.emoji-cheat-sheet.com/graphics/emojis/",ext:".png"},t.twemoji={path:"http://twemoji.maxcdn.com/36x36/",ext:".png"},t.markedRenderer=function(i,o){var n={toc:!0,tocm:!1,tocStartLevel:1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1},a=e.extend(n,o||{}),s=t.$marked,l=new s.Renderer;i=i||[];var c=t.regexs,h=c.atLink,d=c.emoji,u=c.email,f=c.emailLink,g=c.twemoji,p=c.fontAwesome,m=c.editormdLogo,w=c.pageBreak;return l.emoji=function(e){e=e.replace(t.regexs.emojiDatetime,function(e){return e.replace(/:/g,":")});var i=e.match(d);if(!i||!a.emoji)return e;for(var o=0,r=i.length;r>o;o++)":+1:"===i[o]&&(i[o]=":\\+1:"),e=e.replace(new RegExp(i[o]),function(e,i){var o=e.match(p),r=e.replace(/:/g,"");if(o)for(var n=0,a=o.length;a>n;n++){var s=o[n].replace(/:/g,"");return''}else{var l=e.match(m),c=e.match(g);if(l)for(var h=0,d=l.length;d>h;h++){var u=l[h].replace(/:/g,"");return''}else{if(!c){var f="+1"===r?"plus1":r;return f="black_large_square"===f?"black_square":f,f="moon"===f?"waxing_gibbous_moon":f,':'+r+':'}for(var w=0,v=c.length;v>w;w++){var k=c[w].replace(/:/g,"").replace("tw-","");return'twemoji-'+k+''}}}});return e},l.atLink=function(i){return h.test(i)?(a.atLink&&(i=i.replace(u,function(e,t,i,o){return e.replace(/@/g,"_#_@_#_")}),i=i.replace(h,function(e,i){return''+e+""}).replace(/_#_@_#_/g,"@")),a.emailLink&&(i=i.replace(f,function(t,i,o,r,n){return!i&&e.inArray(n,"jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|"))<0?''+t+"":t})),i):i},l.link=function(e,t,i){if(this.options.sanitize){try{var o=decodeURIComponent(unescape(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(r){return""}if(0===o.indexOf("javascript:"))return""}var n=''+i.replace(/@/g,"@")+""):(t&&(n+=' title="'+t+'"'),n+=">"+i+"")},l.heading=function(e,t,o){var n=e,a=/\s*\]*)\>(.*)\<\/a\>\s*/;if(a.test(e)){var s=[];e=e.split(/\]+)\>([^\>]*)\<\/a\>/);for(var l=0,c=e.length;c>l;l++)s.push(e[l].replace(/\s*href\=\"(.*)\"\s*/g,""));e=s.join(" ")}e=r(e);var h=e.toLowerCase().replace(/[^\w]+/g,"-"),d={text:e,level:t,slug:h},u=/^[\u4e00-\u9fa5]+$/.test(e),f=u?escape(e).replace(/\%/g,""):e.toLowerCase().replace(/[^\w]+/g,"-");i.push(d);var g="';return g+='',g+='',g+=this.atLink(a?this.emoji(n):this.emoji(e)),g+=""},l.pageBreak=function(e){return w.test(e)&&a.pageBreak&&(e='
          '),e},l.paragraph=function(e){var i=/\$\$(.*)\$\$/g.test(e),o=/^\$\$(.*)\$\$$/.test(e),r=o?' class="'+t.classNames.tex+'"':"",n=a.tocm?/^(\[TOC\]|\[TOCM\])$/.test(e):/^\[TOC\]$/.test(e),s=/^\[TOCM\]$/.test(e);e=!o&&i?e.replace(/(\$\$([^\$]*)\$\$)+/g,function(e,i){return''+i.replace(/\$/g,"")+""}):o?e.replace(/\$/g,""):e;var l='
          '+e+"
          ";return n?s?'
          '+l+"

          ":l:w.test(e)?this.pageBreak(e):""+this.atLink(this.emoji(e))+"

          \n"},l.code=function(e,i,o){return"seq"===i||"sequence"===i?'
          '+e+"
          ":"flow"===i?'
          '+e+"
          ":"math"===i||"latex"===i||"katex"===i?'

          '+e+"

          ":s.Renderer.prototype.code.apply(this,arguments)},l.tablecell=function(e,t){var i=t.header?"th":"td",o=t.align?"<"+i+' style="text-align:'+t.align+'">':"<"+i+">";return o+this.atLink(this.emoji(e))+"\n"},l.listitem=function(e){return a.taskList&&/^\s*\[[x\s]\]\s*/.test(e)?(e=e.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'
        • '+this.atLink(this.emoji(e))+"
        • "):"
        • "+this.atLink(this.emoji(e))+"
        • "},l},t.markdownToCRenderer=function(e,t,i,o){var r="",n=0,a=this.classPrefix;o=o||1;for(var s=0,l=e.length;l>s;s++){var c=e[s].text,h=e[s].level;o>h||(r+=h>n?"":n>h?new Array(n-h+2).join("
      • "):"",r+='
      • '+c+"
          ",n=h)}var d=t.find(".markdown-toc");if(d.length<1&&"false"===t.attr("previewContainer")){var u='
          ';u=i?'
          '+u+"
          ":u,t.html(u),d=t.find(".markdown-toc")}return i&&d.wrap('

          '),d.html('
            ').children(".markdown-toc-list").html(r.replace(/\r?\n?\\<\/ul\>/g,"")),d},t.tocDropdownMenu=function(t,i){i=i||"Table of Contents";var o=400,r=t.find("."+this.classPrefix+"toc-menu");return r.each(function(){var t=e(this),r=t.children(".markdown-toc"),n='',a=''+n+i+"",s=r.children("ul"),l=s.find("li");r.append(a),l.first().before("
          • "+i+" "+n+"

          • "),t.mouseover(function(){s.show(),l.each(function(){var t=e(this),i=t.children("ul");if(""===i.html()&&i.remove(),i.length>0&&""!==i.html()){var r=t.children("a").first();r.children(".fa").length<1&&r.append(e(n).css({"float":"right",paddingTop:"4px"}))}t.mouseover(function(){i.css("z-index",o).show(),o+=1}).mouseleave(function(){i.hide()})})}).mouseleave(function(){s.hide()})}),r},t.filterHTMLTags=function(t,i){if("string"!=typeof t&&(t=new String(t)),"string"!=typeof i)return t;for(var o=i.split("|"),r=o[0].split(","),n=o[1],a=0,s=r.length;s>a;a++){var l=r[a];t=t.replace(new RegExp("]*)>([^>]*)","igm"),"")}if("undefined"!=typeof n){var c=/\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/gi;t="*"===n?t.replace(c,function(e,t,i,o,r){return"<"+t+">"+o+""}):"on*"===n?t.replace(c,function(t,i,o,r,n){var a=e("<"+i+">"+r+""),s=e(t)[0].attributes,l={};e.each(s,function(e,t){'"'!==t.nodeName&&(l[t.nodeName]=t.nodeValue)}),e.each(l,function(e){0===e.indexOf("on")&&delete l[e]}),a.attr(l);var c="undefined"!=typeof a[1]?e(a[1]).text():"";return a[0].outerHTML+c}):t.replace(c,function(t,i,o,r){var a=n.split(","),s=e(t);return s.html(r),e.each(a,function(e){s.attr(a[e],null)}),s[0].outerHTML})}return t},t.markdownToHTML=function(i,o){var r={gfm:!0,toc:!0,tocm:!1,tocStartLevel:1,tocTitle:"目录",tocDropdown:!1,tocContainer:"",markdown:"",markdownSourceCode:!1,htmlDecode:!1,autoLoadKaTeX:!0,pageBreak:!0,atLink:!0,emailLink:!0,tex:!1,taskList:!1,emoji:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0};t.$marked=marked;var n=e("#"+i),a=n.settings=e.extend(!0,r,o||{}),s=n.find("textarea");s.length<1&&(n.append(""),s=n.find("textarea"));var l=""===a.markdown?s.val():a.markdown,c=[],h={toc:a.toc,tocm:a.tocm,tocStartLevel:a.tocStartLevel,taskList:a.taskList,emoji:a.emoji,tex:a.tex,pageBreak:a.pageBreak,atLink:a.atLink,emailLink:a.emailLink,flowChart:a.flowChart,sequenceDiagram:a.sequenceDiagram,previewCodeHighlight:a.previewCodeHighlight},d={renderer:t.markedRenderer(c,h),gfm:a.gfm,tables:!0,breaks:!0,pedantic:!1,sanitize:a.htmlDecode?!1:!0,smartLists:!0,smartypants:!0};l=new String(l);var u=marked(l,d);u=t.filterHTMLTags(u,a.htmlDecode),a.markdownSourceCode?s.text(l):s.remove(),n.addClass("markdown-body "+this.classPrefix+"html-preview").append(u);var f=""!==a.tocContainer?e(a.tocContainer):n;if(""!==a.tocContainer&&f.attr("previewContainer",!1),a.toc&&(n.tocContainer=this.markdownToCRenderer(c,f,a.tocDropdown,a.tocStartLevel),(a.tocDropdown||n.find("."+this.classPrefix+"toc-menu").length>0)&&this.tocDropdownMenu(n,a.tocTitle),""!==a.tocContainer&&n.find(".editormd-toc-menu, .editormd-markdown-toc").remove()),a.previewCodeHighlight&&(n.find("pre").addClass("prettyprint linenums"),prettyPrint()),t.isIE8||(a.flowChart&&n.find(".flowchart").flowChart(),a.sequenceDiagram&&n.find(".sequence-diagram").sequenceDiagram({theme:"simple"})),a.tex){var g=function(){n.find("."+t.classNames.tex).each(function(){var t=e(this);katex.render(t.html().replace(/</g,"<").replace(/>/g,">"),t[0]),t.find(".katex").css("font-size","1.6em")})};!a.autoLoadKaTeX||t.$katex||t.kaTeXLoaded?g():this.loadKaTeX(function(){t.$katex=katex,t.kaTeXLoaded=!0,g()})}return n.getMarkdown=function(){return s.val()},n},t.themes=["default","dark"],t.previewThemes=["default","dark"],t.editorThemes=["default","3024-day","3024-night","ambiance","ambiance-mobile","base16-dark","base16-light","blackboard","cobalt","eclipse","elegant","erlang-dark","lesser-dark","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","rubyblue","solarized","the-matrix","tomorrow-night-eighties","twilight","vibrant-ink","xq-dark","xq-light"],t.loadPlugins={},t.loadFiles={js:[],css:[],plugin:[]},t.loadPlugin=function(e,i,o){i=i||function(){},this.loadScript(e,function(){t.loadFiles.plugin.push(e),i()},o)},t.loadCSS=function(e,i,o){o=o||"head",i=i||function(){};var r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.onload=r.onreadystatechange=function(){t.loadFiles.css.push(e),i()},r.href=e+".css","head"===o?document.getElementsByTagName("head")[0].appendChild(r):document.body.appendChild(r)},t.isIE="Microsoft Internet Explorer"==navigator.appName,t.isIE8=t.isIE&&"8."==navigator.appVersion.match(/8./i),t.loadScript=function(e,i,o){o=o||"head",i=i||function(){};var r=null;r=document.createElement("script"),r.id=e.replace(/[\./]+/g,"-"),r.type="text/javascript",r.src=e+".js",t.isIE8?r.onreadystatechange=function(){r.readyState&&("loaded"===r.readyState||"complete"===r.readyState)&&(r.onreadystatechange=null,t.loadFiles.js.push(e),i())}:r.onload=function(){t.loadFiles.js.push(e),i()},"head"===o?document.getElementsByTagName("head")[0].appendChild(r):document.body.appendChild(r)},t.katexURL={css:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min",js:"//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min"},t.kaTeXLoaded=!1,t.loadKaTeX=function(e){t.loadCSS(t.katexURL.css,function(){t.loadScript(t.katexURL.js,e||function(){})})},t.lockScreen=function(t){e("html,body").css("overflow",t?"hidden":"")},t.createDialog=function(i){var o={name:"",width:420,height:240,title:"",drag:!0,closed:!0,content:"",mask:!0,maskStyle:{backgroundColor:"#fff",opacity:.1},lockScreen:!0,footer:!0,buttons:!1};i=e.extend(!0,o,i);var r=this,n=this.editor,a=t.classPrefix,s=(new Date).getTime(),l=""===i.name?a+"dialog-"+s:i.name,c=t.mouseOrTouch,h='
            ';""!==i.title&&(h+='
            ",h+=''+i.title+"",h+="
            "),i.closed&&(h+=''),h+='
            '+i.content,(i.footer||"string"==typeof i.footer)&&(h+='"),h+="
            ",h+='
            ',h+='
            ',h+="
            ",n.append(h);var d=n.find("."+l);d.lockScreen=function(t){return i.lockScreen&&(e("html,body").css("overflow",t?"hidden":""),r.resize()),d},d.showMask=function(){return i.mask&&n.find("."+a+"mask").css(i.maskStyle).css("z-index",t.dialogZindex-1).show(),d},d.hideMask=function(){return i.mask&&n.find("."+a+"mask").hide(),d},d.loading=function(e){var t=d.find("."+a+"dialog-mask");return t[e?"show":"hide"](),d},d.lockScreen(!0).showMask(),d.show().css({zIndex:t.dialogZindex,border:t.isIE8?"1px solid #ddd":"",width:"number"==typeof i.width?i.width+"px":i.width,height:"number"==typeof i.height?i.height+"px":i.height});var u=function(){d.css({top:(e(window).height()-d.height())/2+"px",left:(e(window).width()-d.width())/2+"px"})};if(u(),e(window).resize(u),d.children("."+a+"dialog-close").bind(c("click","touchend"),function(){d.hide().lockScreen(!1).hideMask()}),"object"==typeof i.buttons){var f=d.footer=d.find("."+a+"dialog-footer");for(var g in i.buttons){var p=i.buttons[g],m=a+g+"-btn";f.append('"),p[1]=e.proxy(p[1],d),f.children("."+m).bind(c("click","touchend"),p[1])}}if(""!==i.title&&i.drag){var w,v,k=d.children("."+a+"dialog-header");i.mask||k.bind(c("click","touchend"),function(){t.dialogZindex+=2,d.css("z-index",t.dialogZindex)}),k.mousedown(function(e){e=e||window.event,w=e.clientX-parseInt(d[0].style.left),v=e.clientY-parseInt(d[0].style.top),document.onmousemove=y});var b=function(e){e.removeClass(a+"user-unselect").off("selectstart")},x=function(e){e.addClass(a+"user-unselect").on("selectstart",function(e){return!1})},y=function(t){t=t||window.event;var i,o,r=parseInt(d[0].style.left),n=parseInt(d[0].style.top);r>=0?r+d.width()<=e(window).width()?i=t.clientX-w:(i=e(window).width()-d.width(),document.onmousemove=null):(i=0,document.onmousemove=null),n>=0?o=t.clientY-v:(o=0,document.onmousemove=null),document.onselectstart=function(){return!1},x(e("body")),x(d),d[0].style.left=i+"px",d[0].style.top=o+"px"};document.onmouseup=function(){b(e("body")),b(d),document.onselectstart=null,document.onmousemove=null},k.touchDraggable=function(){var t=null,i=function(i){var o=i.originalEvent,r=e(this).parent().position();t={x:o.changedTouches[0].pageX-r.left,y:o.changedTouches[0].pageY-r.top}},o=function(i){i.preventDefault();var o=i.originalEvent;e(this).parent().css({top:o.changedTouches[0].pageY-t.y,left:o.changedTouches[0].pageX-t.x})};this.bind("touchstart",i).bind("touchmove",o)},k.touchDraggable()}return t.dialogZindex+=2,d},t.mouseOrTouch=function(e,t){e=e||"click",t=t||"touchend";var i=e;try{document.createEvent("TouchEvent"),i=t}catch(o){}return i},t.dateFormat=function(e){e=e||"";var t=function(e){return 10>e?"0"+e:e},i=new Date,o=i.getFullYear(),r=o.toString().slice(2,4),n=t(i.getMonth()+1),a=t(i.getDate()),s=i.getDay(),l=t(i.getHours()),c=t(i.getMinutes()),h=t(i.getSeconds()),d=t(i.getMilliseconds()),u="",f=r+"-"+n+"-"+a,g=o+"-"+n+"-"+a,p=l+":"+c+":"+h;switch(e){case"UNIX Time":u=i.getTime();break;case"UTC":u=i.toUTCString();break;case"yy":u=r;break;case"year":case"yyyy":u=o;break;case"month":case"mm":u=n;break;case"cn-week-day":case"cn-wd":var m=["日","一","二","三","四","五","六"];u="星期"+m[s];break;case"week-day":case"wd":var w=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];u=w[s];break;case"day":case"dd":u=a;break;case"hour":case"hh":u=l;break;case"min":case"ii":u=c;break;case"second":case"ss":u=h;break;case"ms":u=d;break;case"yy-mm-dd":u=f;break;case"yyyy-mm-dd":u=g;break;case"yyyy-mm-dd h:i:s ms":case"full + ms":u=g+" "+p+" "+d;break;case"full":case"yyyy-mm-dd h:i:s":default:u=g+" "+p}return u},t}}); \ No newline at end of file diff --git a/static/editor.md/editormd.js b/static/editor.md/editormd.js new file mode 100644 index 0000000..5427fcd --- /dev/null +++ b/static/editor.md/editormd.js @@ -0,0 +1,4601 @@ +/* + * Editor.md + * + * @file editormd.js + * @version v1.5.0 + * @description Open source online markdown editor. + * @license MIT License + * @author Pandao + * {@link https://github.com/pandao/editor.md} + * @updateTime 2015-06-09 + */ + +;(function(factory) { + "use strict"; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) // for Require.js + { + /* Require.js define replace */ + } + else + { + define(["jquery"], factory); // for Sea.js + } + } + else + { + window.editormd = factory(); + } + +}(function() { + + /* Require.js assignment replace */ + + "use strict"; + + var $ = (typeof (jQuery) !== "undefined") ? jQuery : Zepto; + + if (typeof ($) === "undefined") { + return ; + } + + /** + * editormd + * + * @param {String} id 编辑器的ID + * @param {Object} options 配置选项 Key/Value + * @returns {Object} editormd 返回editormd对象 + */ + + var editormd = function (id, options) { + return new editormd.fn.init(id, options); + }; + + editormd.title = editormd.$name = "Editor.md"; + editormd.version = "1.5.0"; + editormd.homePage = "https://pandao.github.io/editor.md/"; + editormd.classPrefix = "editormd-"; + + editormd.toolbarModes = { + full : [ + "undo", "redo", "|", + "bold", "del", "italic", "quote", "ucwords", "uppercase", "lowercase", "|", + "h1", "h2", "h3", "h4", "h5", "h6", "|", + "list-ul", "list-ol", "hr", "|", + "link", "reference-link", "image", "code", "preformatted-text", "code-block", "table", "datetime", "emoji", "html-entities", "pagebreak", "|", + "goto-line", "watch", "preview", "fullscreen", "clear", "search", "|", + "help", "info" + ], + simple : [ + "undo", "redo", "|", + "bold", "del", "italic", "quote", "uppercase", "lowercase", "|", + "h1", "h2", "h3", "h4", "h5", "h6", "|", + "list-ul", "list-ol", "hr", "|", + "watch", "preview", "fullscreen", "|", + "help", "info" + ], + mini : [ + "undo", "redo", "|", + "watch", "preview", "|", + "help", "info" + ] + }; + + editormd.defaults = { + mode : "gfm", //gfm or markdown + name : "", // Form element name + value : "", // value for CodeMirror, if mode not gfm/markdown + theme : "", // Editor.md self themes, before v1.5.0 is CodeMirror theme, default empty + editorTheme : "default", // Editor area, this is CodeMirror theme at v1.5.0 + previewTheme : "", // Preview area theme, default empty + markdown : "", // Markdown source code + appendMarkdown : "", // if in init textarea value not empty, append markdown to textarea + width : "100%", + height : "100%", + path : "./lib/", // Dependents module file directory + pluginPath : "", // If this empty, default use settings.path + "../plugins/" + delay : 300, // Delay parse markdown to html, Uint : ms + autoLoadModules : true, // Automatic load dependent module files + watch : true, + placeholder : "Enjoy Markdown! coding now...", + gotoLine : true, + codeFold : false, + autoHeight : false, + autoFocus : true, + autoCloseTags : true, + searchReplace : true, + syncScrolling : true, // true | false | "single", default true + readOnly : false, + tabSize : 4, + indentUnit : 4, + lineNumbers : true, + lineWrapping : true, + autoCloseBrackets : true, + showTrailingSpace : true, + matchBrackets : true, + indentWithTabs : true, + styleSelectedText : true, + matchWordHighlight : true, // options: true, false, "onselected" + styleActiveLine : true, // Highlight the current line + dialogLockScreen : true, + dialogShowMask : true, + dialogDraggable : true, + dialogMaskBgColor : "#fff", + dialogMaskOpacity : 0.1, + fontSize : "13px", + saveHTMLToTextarea : false, + disabledKeyMaps : [], + + onload : function() {}, + onresize : function() {}, + onchange : function() {}, + onwatch : null, + onunwatch : null, + onpreviewing : function() {}, + onpreviewed : function() {}, + onfullscreen : function() {}, + onfullscreenExit : function() {}, + onscroll : function() {}, + onpreviewscroll : function() {}, + + imageUpload : false, + imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"], + imageUploadURL : "", + crossDomainUpload : false, + uploadCallbackURL : "", + + toc : true, // Table of contents + tocm : false, // Using [TOCM], auto create ToC dropdown menu + tocTitle : "", // for ToC dropdown menu btn + tocDropdown : false, + tocContainer : "", + tocStartLevel : 1, // Said from H1 to create ToC + htmlDecode : false, // Open the HTML tag identification + pageBreak : true, // Enable parse page break [========] + atLink : true, // for @link + emailLink : true, // for email address auto link + taskList : false, // Enable Github Flavored Markdown task lists + emoji : false, // :emoji: , Support Github emoji, Twitter Emoji (Twemoji); + // Support FontAwesome icon emoji :fa-xxx: > Using fontAwesome icon web fonts; + // Support Editor.md logo icon emoji :editormd-logo: :editormd-logo-1x: > 1~8x; + tex : false, // TeX(LaTeX), based on KaTeX + flowChart : false, // flowChart.js only support IE9+ + sequenceDiagram : false, // sequenceDiagram.js only support IE9+ + previewCodeHighlight : true, + + toolbar : true, // show/hide toolbar + toolbarAutoFixed : true, // on window scroll auto fixed position + toolbarIcons : "full", + toolbarTitles : {}, + toolbarHandlers : { + ucwords : function() { + return editormd.toolbarHandlers.ucwords; + }, + lowercase : function() { + return editormd.toolbarHandlers.lowercase; + } + }, + toolbarCustomIcons : { // using html tag create toolbar icon, unused default tag. + lowercase : "a", + "ucwords" : "Aa" + }, + toolbarIconsClass : { + undo : "fa-undo", + redo : "fa-repeat", + bold : "fa-bold", + del : "fa-strikethrough", + italic : "fa-italic", + quote : "fa-quote-left", + uppercase : "fa-font", + h1 : editormd.classPrefix + "bold", + h2 : editormd.classPrefix + "bold", + h3 : editormd.classPrefix + "bold", + h4 : editormd.classPrefix + "bold", + h5 : editormd.classPrefix + "bold", + h6 : editormd.classPrefix + "bold", + "list-ul" : "fa-list-ul", + "list-ol" : "fa-list-ol", + hr : "fa-minus", + link : "fa-link", + "reference-link" : "fa-anchor", + image : "fa-picture-o", + code : "fa-code", + "preformatted-text" : "fa-file-code-o", + "code-block" : "fa-file-code-o", + table : "fa-table", + datetime : "fa-clock-o", + emoji : "fa-smile-o", + "html-entities" : "fa-copyright", + pagebreak : "fa-newspaper-o", + "goto-line" : "fa-terminal", // fa-crosshairs + watch : "fa-eye-slash", + unwatch : "fa-eye", + preview : "fa-desktop", + search : "fa-search", + fullscreen : "fa-arrows-alt", + clear : "fa-eraser", + help : "fa-question-circle", + info : "fa-info-circle" + }, + toolbarIconTexts : {}, + + lang : { + name : "zh-cn", + description : "开源在线Markdown编辑器
            Open source online Markdown editor.", + tocTitle : "目录", + toolbar : { + undo : "撤销(Ctrl+Z)", + redo : "重做(Ctrl+Y)", + bold : "粗体", + del : "删除线", + italic : "斜体", + quote : "引用", + ucwords : "将每个单词首字母转成大写", + uppercase : "将所选转换成大写", + lowercase : "将所选转换成小写", + h1 : "标题1", + h2 : "标题2", + h3 : "标题3", + h4 : "标题4", + h5 : "标题5", + h6 : "标题6", + "list-ul" : "无序列表", + "list-ol" : "有序列表", + hr : "横线", + link : "链接", + "reference-link" : "引用链接", + image : "添加图片", + code : "行内代码", + "preformatted-text" : "预格式文本 / 代码块(缩进风格)", + "code-block" : "代码块(多语言风格)", + table : "添加表格", + datetime : "日期时间", + emoji : "Emoji表情", + "html-entities" : "HTML实体字符", + pagebreak : "插入分页符", + "goto-line" : "跳转到行", + watch : "关闭实时预览", + unwatch : "开启实时预览", + preview : "全窗口预览HTML(按 Shift + ESC还原)", + fullscreen : "全屏(按ESC还原)", + clear : "清空", + search : "搜索", + help : "使用帮助", + info : "关于" + editormd.title + }, + buttons : { + enter : "确定", + cancel : "取消", + close : "关闭" + }, + dialog : { + link : { + title : "添加链接", + url : "链接地址", + urlTitle : "链接标题", + urlEmpty : "错误:请填写链接地址。" + }, + referenceLink : { + title : "添加引用链接", + name : "引用名称", + url : "链接地址", + urlId : "链接ID", + urlTitle : "链接标题", + nameEmpty: "错误:引用链接的名称不能为空。", + idEmpty : "错误:请填写引用链接的ID。", + urlEmpty : "错误:请填写引用链接的URL地址。" + }, + image : { + title : "添加图片", + url : "图片地址", + link : "图片链接", + alt : "图片描述", + uploadButton : "本地上传", + imageURLEmpty : "错误:图片地址不能为空。", + uploadFileEmpty : "错误:上传的图片不能为空。", + formatNotAllowed : "错误:只允许上传图片文件,允许上传的图片文件格式有:" + }, + preformattedText : { + title : "添加预格式文本或代码块", + emptyAlert : "错误:请填写预格式文本或代码的内容。" + }, + codeBlock : { + title : "添加代码块", + selectLabel : "代码语言:", + selectDefaultText : "请选择代码语言", + otherLanguage : "其他语言", + unselectedLanguageAlert : "错误:请选择代码所属的语言类型。", + codeEmptyAlert : "错误:请填写代码内容。" + }, + htmlEntities : { + title : "HTML 实体字符" + }, + help : { + title : "使用帮助" + } + } + } + }; + + editormd.classNames = { + tex : editormd.classPrefix + "tex" + }; + + editormd.dialogZindex = 99999; + + editormd.$katex = null; + editormd.$marked = null; + editormd.$CodeMirror = null; + editormd.$prettyPrint = null; + + var timer, flowchartTimer; + + editormd.prototype = editormd.fn = { + state : { + watching : false, + loaded : false, + preview : false, + fullscreen : false + }, + + /** + * 构造函数/实例初始化 + * Constructor / instance initialization + * + * @param {String} id 编辑器的ID + * @param {Object} [options={}] 配置选项 Key/Value + * @returns {editormd} 返回editormd的实例对象 + */ + + init : function (id, options) { + + options = options || {}; + + if (typeof id === "object") + { + options = id; + } + + var _this = this; + var classPrefix = this.classPrefix = editormd.classPrefix; + var settings = this.settings = $.extend(true, editormd.defaults, options); + + id = (typeof id === "object") ? settings.id : id; + + var editor = this.editor = $("#" + id); + + this.id = id; + this.lang = settings.lang; + + var classNames = this.classNames = { + textarea : { + html : classPrefix + "html-textarea", + markdown : classPrefix + "markdown-textarea" + } + }; + + settings.pluginPath = (settings.pluginPath === "") ? settings.path + "../plugins/" : settings.pluginPath; + + this.state.watching = (settings.watch) ? true : false; + + if ( !editor.hasClass("editormd") ) { + editor.addClass("editormd"); + } + + editor.css({ + width : (typeof settings.width === "number") ? settings.width + "px" : settings.width, + height : (typeof settings.height === "number") ? settings.height + "px" : settings.height + }); + + if (settings.autoHeight) + { + editor.css("height", "auto"); + } + + var markdownTextarea = this.markdownTextarea = editor.children("textarea"); + + if (markdownTextarea.length < 1) + { + editor.append(""); + markdownTextarea = this.markdownTextarea = editor.children("textarea"); + } + + markdownTextarea.addClass(classNames.textarea.markdown).attr("placeholder", settings.placeholder); + + if (typeof markdownTextarea.attr("name") === "undefined" || markdownTextarea.attr("name") === "") + { + markdownTextarea.attr("name", (settings.name !== "") ? settings.name : id + "-markdown-doc"); + } + + var appendElements = [ + (!settings.readOnly) ? "" : "", + ( (settings.saveHTMLToTextarea) ? "" : "" ), + "
            ", + "
            ", + "
            " + ].join("\n"); + + editor.append(appendElements).addClass(classPrefix + "vertical"); + + if (settings.theme !== "") + { + editor.addClass(classPrefix + "theme-" + settings.theme); + } + + this.mask = editor.children("." + classPrefix + "mask"); + this.containerMask = editor.children("." + classPrefix + "container-mask"); + + if (settings.markdown !== "") + { + markdownTextarea.val(settings.markdown); + } + + if (settings.appendMarkdown !== "") + { + markdownTextarea.val(markdownTextarea.val() + settings.appendMarkdown); + } + + this.htmlTextarea = editor.children("." + classNames.textarea.html); + this.preview = editor.children("." + classPrefix + "preview"); + this.previewContainer = this.preview.children("." + classPrefix + "preview-container"); + + if (settings.previewTheme !== "") + { + this.preview.addClass(classPrefix + "preview-theme-" + settings.previewTheme); + } + + if (typeof define === "function" && define.amd) + { + if (typeof katex !== "undefined") + { + editormd.$katex = katex; + } + + if (settings.searchReplace && !settings.readOnly) + { + editormd.loadCSS(settings.path + "codemirror/addon/dialog/dialog"); + editormd.loadCSS(settings.path + "codemirror/addon/search/matchesonscrollbar"); + } + } + + if ((typeof define === "function" && define.amd) || !settings.autoLoadModules) + { + if (typeof CodeMirror !== "undefined") { + editormd.$CodeMirror = CodeMirror; + } + + if (typeof marked !== "undefined") { + editormd.$marked = marked; + } + + this.setCodeMirror().setToolbar().loadedDisplay(); + } + else + { + this.loadQueues(); + } + + return this; + }, + + /** + * 所需组件加载队列 + * Required components loading queue + * + * @returns {editormd} 返回editormd的实例对象 + */ + + loadQueues : function() { + var _this = this; + var settings = this.settings; + var loadPath = settings.path; + + var loadFlowChartOrSequenceDiagram = function() { + + if (editormd.isIE8) + { + _this.loadedDisplay(); + + return ; + } + + if (settings.flowChart || settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "raphael.min", function() { + + editormd.loadScript(loadPath + "underscore.min", function() { + + if (!settings.flowChart && settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "sequence-diagram.min", function() { + _this.loadedDisplay(); + }); + } + else if (settings.flowChart && !settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "flowchart.min", function() { + editormd.loadScript(loadPath + "jquery.flowchart.min", function() { + _this.loadedDisplay(); + }); + }); + } + else if (settings.flowChart && settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "flowchart.min", function() { + editormd.loadScript(loadPath + "jquery.flowchart.min", function() { + editormd.loadScript(loadPath + "sequence-diagram.min", function() { + _this.loadedDisplay(); + }); + }); + }); + } + }); + + }); + } + else + { + _this.loadedDisplay(); + } + }; + + editormd.loadCSS(loadPath + "codemirror/codemirror.min"); + + if (settings.searchReplace && !settings.readOnly) + { + editormd.loadCSS(loadPath + "codemirror/addon/dialog/dialog"); + editormd.loadCSS(loadPath + "codemirror/addon/search/matchesonscrollbar"); + } + + if (settings.codeFold) + { + editormd.loadCSS(loadPath + "codemirror/addon/fold/foldgutter"); + } + + editormd.loadScript(loadPath + "codemirror/codemirror.min", function() { + editormd.$CodeMirror = CodeMirror; + + editormd.loadScript(loadPath + "codemirror/modes.min", function() { + + editormd.loadScript(loadPath + "codemirror/addons.min", function() { + + _this.setCodeMirror(); + + if (settings.mode !== "gfm" && settings.mode !== "markdown") + { + _this.loadedDisplay(); + + return false; + } + + _this.setToolbar(); + + editormd.loadScript(loadPath + "marked.min", function() { + + editormd.$marked = marked; + + if (settings.previewCodeHighlight) + { + editormd.loadScript(loadPath + "prettify.min", function() { + loadFlowChartOrSequenceDiagram(); + }); + } + else + { + loadFlowChartOrSequenceDiagram(); + } + }); + + }); + + }); + + }); + + return this; + }, + + /** + * 设置 Editor.md 的整体主题,主要是工具栏 + * Setting Editor.md theme + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setTheme : function(theme) { + var editor = this.editor; + var oldTheme = this.settings.theme; + var themePrefix = this.classPrefix + "theme-"; + + editor.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme); + + this.settings.theme = theme; + + return this; + }, + + /** + * 设置 CodeMirror(编辑区)的主题 + * Setting CodeMirror (Editor area) theme + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setEditorTheme : function(theme) { + var settings = this.settings; + settings.editorTheme = theme; + + if (theme !== "default") + { + editormd.loadCSS(settings.path + "codemirror/theme/" + settings.editorTheme); + } + + this.cm.setOption("theme", theme); + + return this; + }, + + /** + * setEditorTheme() 的别名 + * setEditorTheme() alias + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setCodeMirrorTheme : function (theme) { + this.setEditorTheme(theme); + + return this; + }, + + /** + * 设置 Editor.md 的主题 + * Setting Editor.md theme + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setPreviewTheme : function(theme) { + var preview = this.preview; + var oldTheme = this.settings.previewTheme; + var themePrefix = this.classPrefix + "preview-theme-"; + + preview.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme); + + this.settings.previewTheme = theme; + + return this; + }, + + /** + * 配置和初始化CodeMirror组件 + * CodeMirror initialization + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setCodeMirror : function() { + var settings = this.settings; + var editor = this.editor; + + if (settings.editorTheme !== "default") + { + editormd.loadCSS(settings.path + "codemirror/theme/" + settings.editorTheme); + } + + var codeMirrorConfig = { + mode : settings.mode, + theme : settings.editorTheme, + tabSize : settings.tabSize, + dragDrop : false, + autofocus : settings.autoFocus, + autoCloseTags : settings.autoCloseTags, + readOnly : (settings.readOnly) ? "nocursor" : false, + indentUnit : settings.indentUnit, + lineNumbers : settings.lineNumbers, + lineWrapping : settings.lineWrapping, + extraKeys : { + "Ctrl-Q": function(cm) { + cm.foldCode(cm.getCursor()); + } + }, + foldGutter : settings.codeFold, + gutters : ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + matchBrackets : settings.matchBrackets, + indentWithTabs : settings.indentWithTabs, + styleActiveLine : settings.styleActiveLine, + styleSelectedText : settings.styleSelectedText, + autoCloseBrackets : settings.autoCloseBrackets, + showTrailingSpace : settings.showTrailingSpace, + highlightSelectionMatches : ( (!settings.matchWordHighlight) ? false : { showToken: (settings.matchWordHighlight === "onselected") ? false : /\w/ } ) + }; + + this.codeEditor = this.cm = editormd.$CodeMirror.fromTextArea(this.markdownTextarea[0], codeMirrorConfig); + this.codeMirror = this.cmElement = editor.children(".CodeMirror"); + + if (settings.value !== "") + { + this.cm.setValue(settings.value); + } + + this.codeMirror.css({ + fontSize : settings.fontSize, + width : (!settings.watch) ? "100%" : "50%" + }); + + if (settings.autoHeight) + { + this.codeMirror.css("height", "auto"); + this.cm.setOption("viewportMargin", Infinity); + } + + if (!settings.lineNumbers) + { + this.codeMirror.find(".CodeMirror-gutters").css("border-right", "none"); + } + + return this; + }, + + /** + * 获取CodeMirror的配置选项 + * Get CodeMirror setting options + * + * @returns {Mixed} return CodeMirror setting option value + */ + + getCodeMirrorOption : function(key) { + return this.cm.getOption(key); + }, + + /** + * 配置和重配置CodeMirror的选项 + * CodeMirror setting options / resettings + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setCodeMirrorOption : function(key, value) { + + this.cm.setOption(key, value); + + return this; + }, + + /** + * 添加 CodeMirror 键盘快捷键 + * Add CodeMirror keyboard shortcuts key map + * + * @returns {editormd} 返回editormd的实例对象 + */ + + addKeyMap : function(map, bottom) { + this.cm.addKeyMap(map, bottom); + + return this; + }, + + /** + * 移除 CodeMirror 键盘快捷键 + * Remove CodeMirror keyboard shortcuts key map + * + * @returns {editormd} 返回editormd的实例对象 + */ + + removeKeyMap : function(map) { + this.cm.removeKeyMap(map); + + return this; + }, + + /** + * 跳转到指定的行 + * Goto CodeMirror line + * + * @param {String|Intiger} line line number or "first"|"last" + * @returns {editormd} 返回editormd的实例对象 + */ + + gotoLine : function (line) { + + var settings = this.settings; + + if (!settings.gotoLine) + { + return this; + } + + var cm = this.cm; + var editor = this.editor; + var count = cm.lineCount(); + var preview = this.preview; + + if (typeof line === "string") + { + if(line === "last") + { + line = count; + } + + if (line === "first") + { + line = 1; + } + } + + if (typeof line !== "number") + { + alert("Error: The line number must be an integer."); + return this; + } + + line = parseInt(line) - 1; + + if (line > count) + { + alert("Error: The line number range 1-" + count); + + return this; + } + + cm.setCursor( {line : line, ch : 0} ); + + var scrollInfo = cm.getScrollInfo(); + var clientHeight = scrollInfo.clientHeight; + var coords = cm.charCoords({line : line, ch : 0}, "local"); + + cm.scrollTo(null, (coords.top + coords.bottom - clientHeight) / 2); + + if (settings.watch) + { + var cmScroll = this.codeMirror.find(".CodeMirror-scroll")[0]; + var height = $(cmScroll).height(); + var scrollTop = cmScroll.scrollTop; + var percent = (scrollTop / cmScroll.scrollHeight); + + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= cmScroll.scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop(preview[0].scrollHeight * percent); + } + } + + cm.focus(); + + return this; + }, + + /** + * 扩展当前实例对象,可同时设置多个或者只设置一个 + * Extend editormd instance object, can mutil setting. + * + * @returns {editormd} this(editormd instance object.) + */ + + extend : function() { + if (typeof arguments[1] !== "undefined") + { + if (typeof arguments[1] === "function") + { + arguments[1] = $.proxy(arguments[1], this); + } + + this[arguments[0]] = arguments[1]; + } + + if (typeof arguments[0] === "object" && typeof arguments[0].length === "undefined") + { + $.extend(true, this, arguments[0]); + } + + return this; + }, + + /** + * 设置或扩展当前实例对象,单个设置 + * Extend editormd instance object, one by one + * + * @param {String|Object} key option key + * @param {String|Object} value option value + * @returns {editormd} this(editormd instance object.) + */ + + set : function (key, value) { + + if (typeof value !== "undefined" && typeof value === "function") + { + value = $.proxy(value, this); + } + + this[key] = value; + + return this; + }, + + /** + * 重新配置 + * Resetting editor options + * + * @param {String|Object} key option key + * @param {String|Object} value option value + * @returns {editormd} this(editormd instance object.) + */ + + config : function(key, value) { + var settings = this.settings; + + if (typeof key === "object") + { + settings = $.extend(true, settings, key); + } + + if (typeof key === "string") + { + settings[key] = value; + } + + this.settings = settings; + this.recreate(); + + return this; + }, + + /** + * 注册事件处理方法 + * Bind editor event handle + * + * @param {String} eventType event type + * @param {Function} callback 回调函数 + * @returns {editormd} this(editormd instance object.) + */ + + on : function(eventType, callback) { + var settings = this.settings; + + if (typeof settings["on" + eventType] !== "undefined") + { + settings["on" + eventType] = $.proxy(callback, this); + } + + return this; + }, + + /** + * 解除事件处理方法 + * Unbind editor event handle + * + * @param {String} eventType event type + * @returns {editormd} this(editormd instance object.) + */ + + off : function(eventType) { + var settings = this.settings; + + if (typeof settings["on" + eventType] !== "undefined") + { + settings["on" + eventType] = function(){}; + } + + return this; + }, + + /** + * 显示工具栏 + * Display toolbar + * + * @param {Function} [callback=function(){}] 回调函数 + * @returns {editormd} 返回editormd的实例对象 + */ + + showToolbar : function(callback) { + var settings = this.settings; + + if(settings.readOnly) { + return this; + } + + if (settings.toolbar && (this.toolbar.length < 1 || this.toolbar.find("." + this.classPrefix + "menu").html() === "") ) + { + this.setToolbar(); + } + + settings.toolbar = true; + + this.toolbar.show(); + this.resize(); + + $.proxy(callback || function(){}, this)(); + + return this; + }, + + /** + * 隐藏工具栏 + * Hide toolbar + * + * @param {Function} [callback=function(){}] 回调函数 + * @returns {editormd} this(editormd instance object.) + */ + + hideToolbar : function(callback) { + var settings = this.settings; + + settings.toolbar = false; + this.toolbar.hide(); + this.resize(); + + $.proxy(callback || function(){}, this)(); + + return this; + }, + + /** + * 页面滚动时工具栏的固定定位 + * Set toolbar in window scroll auto fixed position + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setToolbarAutoFixed : function(fixed) { + + var state = this.state; + var editor = this.editor; + var toolbar = this.toolbar; + var settings = this.settings; + + if (typeof fixed !== "undefined") + { + settings.toolbarAutoFixed = fixed; + } + + var autoFixedHandle = function(){ + var $window = $(window); + var top = $window.scrollTop(); + + if (!settings.toolbarAutoFixed) + { + return false; + } + + if (top - editor.offset().top > 10 && top < editor.height()) + { + toolbar.css({ + position : "fixed", + width : editor.width() + "px", + left : ($window.width() - editor.width()) / 2 + "px" + }); + } + else + { + toolbar.css({ + position : "absolute", + width : "100%", + left : 0 + }); + } + }; + + if (!state.fullscreen && !state.preview && settings.toolbar && settings.toolbarAutoFixed) + { + $(window).bind("scroll", autoFixedHandle); + } + + return this; + }, + + /** + * 配置和初始化工具栏 + * Set toolbar and Initialization + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setToolbar : function() { + var settings = this.settings; + + if(settings.readOnly) { + return this; + } + + var editor = this.editor; + var preview = this.preview; + var classPrefix = this.classPrefix; + + var toolbar = this.toolbar = editor.children("." + classPrefix + "toolbar"); + + if (settings.toolbar && toolbar.length < 1) + { + var toolbarHTML = "
              "; + + editor.append(toolbarHTML); + toolbar = this.toolbar = editor.children("." + classPrefix + "toolbar"); + } + + if (!settings.toolbar) + { + toolbar.hide(); + + return this; + } + + toolbar.show(); + + var icons = (typeof settings.toolbarIcons === "function") ? settings.toolbarIcons() + : ((typeof settings.toolbarIcons === "string") ? editormd.toolbarModes[settings.toolbarIcons] : settings.toolbarIcons); + + var toolbarMenu = toolbar.find("." + this.classPrefix + "menu"), menu = ""; + var pullRight = false; + + for (var i = 0, len = icons.length; i < len; i++) + { + var name = icons[i]; + + if (name === "||") + { + pullRight = true; + } + else if (name === "|") + { + menu += "
            • |
            • "; + } + else + { + var isHeader = (/h(\d)/.test(name)); + var index = name; + + if (name === "watch" && !settings.watch) { + index = "unwatch"; + } + + var title = settings.lang.toolbar[index]; + var iconTexts = settings.toolbarIconTexts[index]; + var iconClass = settings.toolbarIconsClass[index]; + + title = (typeof title === "undefined") ? "" : title; + iconTexts = (typeof iconTexts === "undefined") ? "" : iconTexts; + iconClass = (typeof iconClass === "undefined") ? "" : iconClass; + + var menuItem = pullRight ? "
            • " : "
            • "; + + if (typeof settings.toolbarCustomIcons[name] !== "undefined" && typeof settings.toolbarCustomIcons[name] !== "function") + { + menuItem += settings.toolbarCustomIcons[name]; + } + else + { + menuItem += ""; + menuItem += ""+((isHeader) ? name.toUpperCase() : ( (iconClass === "") ? iconTexts : "") ) + ""; + menuItem += ""; + } + + menuItem += "
            • "; + + menu = pullRight ? menuItem + menu : menu + menuItem; + } + } + + toolbarMenu.html(menu); + + toolbarMenu.find("[title=\"Lowercase\"]").attr("title", settings.lang.toolbar.lowercase); + toolbarMenu.find("[title=\"ucwords\"]").attr("title", settings.lang.toolbar.ucwords); + + this.setToolbarHandler(); + this.setToolbarAutoFixed(); + + return this; + }, + + /** + * 工具栏图标事件处理对象序列 + * Get toolbar icons event handlers + * + * @param {Object} cm CodeMirror的实例对象 + * @param {String} name 要获取的事件处理器名称 + * @returns {Object} 返回处理对象序列 + */ + + dialogLockScreen : function() { + $.proxy(editormd.dialogLockScreen, this)(); + + return this; + }, + + dialogShowMask : function(dialog) { + $.proxy(editormd.dialogShowMask, this)(dialog); + + return this; + }, + + getToolbarHandles : function(name) { + var toolbarHandlers = this.toolbarHandlers = editormd.toolbarHandlers; + + return (name && typeof toolbarIconHandlers[name] !== "undefined") ? toolbarHandlers[name] : toolbarHandlers; + }, + + /** + * 工具栏图标事件处理器 + * Bind toolbar icons event handle + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setToolbarHandler : function() { + var _this = this; + var settings = this.settings; + + if (!settings.toolbar || settings.readOnly) { + return this; + } + + var toolbar = this.toolbar; + var cm = this.cm; + var classPrefix = this.classPrefix; + var toolbarIcons = this.toolbarIcons = toolbar.find("." + classPrefix + "menu > li > a"); + var toolbarIconHandlers = this.getToolbarHandles(); + + toolbarIcons.bind(editormd.mouseOrTouch("click", "touchend"), function(event) { + + var icon = $(this).children(".fa"); + var name = icon.attr("name"); + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (name === "") { + return ; + } + + _this.activeIcon = icon; + + if (typeof toolbarIconHandlers[name] !== "undefined") + { + $.proxy(toolbarIconHandlers[name], _this)(cm); + } + else + { + if (typeof settings.toolbarHandlers[name] !== "undefined") + { + $.proxy(settings.toolbarHandlers[name], _this)(cm, icon, cursor, selection); + } + } + + if (name !== "link" && name !== "reference-link" && name !== "image" && name !== "code-block" && + name !== "preformatted-text" && name !== "watch" && name !== "preview" && name !== "search" && name !== "fullscreen" && name !== "info") + { + cm.focus(); + } + + return false; + + }); + + return this; + }, + + /** + * 动态创建对话框 + * Creating custom dialogs + * + * @param {Object} options 配置项键值对 Key/Value + * @returns {dialog} 返回创建的dialog的jQuery实例对象 + */ + + createDialog : function(options) { + return $.proxy(editormd.createDialog, this)(options); + }, + + /** + * 创建关于Editor.md的对话框 + * Create about Editor.md dialog + * + * @returns {editormd} 返回editormd的实例对象 + */ + + createInfoDialog : function() { + var _this = this; + var editor = this.editor; + var classPrefix = this.classPrefix; + + var infoDialogHTML = [ + "
              ", + "
              ", + "

              " + editormd.title + "v" + editormd.version + "

              ", + "

              " + this.lang.description + "

              ", + "

              " + editormd.homePage + "

              ", + "

              Copyright © 2015 Pandao, The MIT License.

              ", + "
              ", + "", + "
              " + ].join("\n"); + + editor.append(infoDialogHTML); + + var infoDialog = this.infoDialog = editor.children("." + classPrefix + "dialog-info"); + + infoDialog.find("." + classPrefix + "dialog-close").bind(editormd.mouseOrTouch("click", "touchend"), function() { + _this.hideInfoDialog(); + }); + + infoDialog.css("border", (editormd.isIE8) ? "1px solid #ddd" : "").css("z-index", editormd.dialogZindex).show(); + + this.infoDialogPosition(); + + return this; + }, + + /** + * 关于Editor.md对话居中定位 + * Editor.md dialog position handle + * + * @returns {editormd} 返回editormd的实例对象 + */ + + infoDialogPosition : function() { + var infoDialog = this.infoDialog; + + var _infoDialogPosition = function() { + infoDialog.css({ + top : ($(window).height() - infoDialog.height()) / 2 + "px", + left : ($(window).width() - infoDialog.width()) / 2 + "px" + }); + }; + + _infoDialogPosition(); + + $(window).resize(_infoDialogPosition); + + return this; + }, + + /** + * 显示关于Editor.md + * Display about Editor.md dialog + * + * @returns {editormd} 返回editormd的实例对象 + */ + + showInfoDialog : function() { + + $("html,body").css("overflow-x", "hidden"); + + var _this = this; + var editor = this.editor; + var settings = this.settings; + var infoDialog = this.infoDialog = editor.children("." + this.classPrefix + "dialog-info"); + + if (infoDialog.length < 1) + { + this.createInfoDialog(); + } + + this.lockScreen(true); + + this.mask.css({ + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }).show(); + + infoDialog.css("z-index", editormd.dialogZindex).show(); + + this.infoDialogPosition(); + + return this; + }, + + /** + * 隐藏关于Editor.md + * Hide about Editor.md dialog + * + * @returns {editormd} 返回editormd的实例对象 + */ + + hideInfoDialog : function() { + $("html,body").css("overflow-x", ""); + this.infoDialog.hide(); + this.mask.hide(); + this.lockScreen(false); + + return this; + }, + + /** + * 锁屏 + * lock screen + * + * @param {Boolean} lock Boolean 布尔值,是否锁屏 + * @returns {editormd} 返回editormd的实例对象 + */ + + lockScreen : function(lock) { + editormd.lockScreen(lock); + this.resize(); + + return this; + }, + + /** + * 编辑器界面重建,用于动态语言包或模块加载等 + * Recreate editor + * + * @returns {editormd} 返回editormd的实例对象 + */ + + recreate : function() { + var _this = this; + var editor = this.editor; + var settings = this.settings; + + this.codeMirror.remove(); + + this.setCodeMirror(); + + if (!settings.readOnly) + { + if (editor.find(".editormd-dialog").length > 0) { + editor.find(".editormd-dialog").remove(); + } + + if (settings.toolbar) + { + this.getToolbarHandles(); + this.setToolbar(); + } + } + + this.loadedDisplay(true); + + return this; + }, + + /** + * 高亮预览HTML的pre代码部分 + * highlight of preview codes + * + * @returns {editormd} 返回editormd的实例对象 + */ + + previewCodeHighlight : function() { + var settings = this.settings; + var previewContainer = this.previewContainer; + + if (settings.previewCodeHighlight) + { + previewContainer.find("pre").addClass("prettyprint linenums"); + + if (typeof prettyPrint !== "undefined") + { + prettyPrint(); + } + } + + return this; + }, + + /** + * 解析TeX(KaTeX)科学公式 + * TeX(KaTeX) Renderer + * + * @returns {editormd} 返回editormd的实例对象 + */ + + katexRender : function() { + + if (timer === null) + { + return this; + } + + this.previewContainer.find("." + editormd.classNames.tex).each(function(){ + var tex = $(this); + editormd.$katex.render(tex.text(), tex[0]); + + tex.find(".katex").css("font-size", "1.6em"); + }); + + return this; + }, + + /** + * 解析和渲染流程图及时序图 + * FlowChart and SequenceDiagram Renderer + * + * @returns {editormd} 返回editormd的实例对象 + */ + + flowChartAndSequenceDiagramRender : function() { + var $this = this; + var settings = this.settings; + var previewContainer = this.previewContainer; + + if (editormd.isIE8) { + return this; + } + + if (settings.flowChart) { + if (flowchartTimer === null) { + return this; + } + + previewContainer.find(".flowchart").flowChart(); + } + + if (settings.sequenceDiagram) { + previewContainer.find(".sequence-diagram").sequenceDiagram({theme: "simple"}); + } + + var preview = $this.preview; + var codeMirror = $this.codeMirror; + var codeView = codeMirror.find(".CodeMirror-scroll"); + + var height = codeView.height(); + var scrollTop = codeView.scrollTop(); + var percent = (scrollTop / codeView[0].scrollHeight); + var tocHeight = 0; + + preview.find(".markdown-toc-list").each(function(){ + tocHeight += $(this).height(); + }); + + var tocMenuHeight = preview.find(".editormd-toc-menu").height(); + tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; + + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= codeView[0].scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); + } + + return this; + }, + + /** + * 注册键盘快捷键处理 + * Register CodeMirror keyMaps (keyboard shortcuts). + * + * @param {Object} keyMap KeyMap key/value {"(Ctrl/Shift/Alt)-Key" : function(){}} + * @returns {editormd} return this + */ + + registerKeyMaps : function(keyMap) { + + var _this = this; + var cm = this.cm; + var settings = this.settings; + var toolbarHandlers = editormd.toolbarHandlers; + var disabledKeyMaps = settings.disabledKeyMaps; + + keyMap = keyMap || null; + + if (keyMap) + { + for (var i in keyMap) + { + if ($.inArray(i, disabledKeyMaps) < 0) + { + var map = {}; + map[i] = keyMap[i]; + + cm.addKeyMap(keyMap); + } + } + } + else + { + for (var k in editormd.keyMaps) + { + var _keyMap = editormd.keyMaps[k]; + var handle = (typeof _keyMap === "string") ? $.proxy(toolbarHandlers[_keyMap], _this) : $.proxy(_keyMap, _this); + + if ($.inArray(k, ["F9", "F10", "F11"]) < 0 && $.inArray(k, disabledKeyMaps) < 0) + { + var _map = {}; + _map[k] = handle; + + cm.addKeyMap(_map); + } + } + + $(window).keydown(function(event) { + + var keymaps = { + "120" : "F9", + "121" : "F10", + "122" : "F11" + }; + + if ( $.inArray(keymaps[event.keyCode], disabledKeyMaps) < 0 ) + { + switch (event.keyCode) + { + case 120: + $.proxy(toolbarHandlers["watch"], _this)(); + return false; + break; + + case 121: + $.proxy(toolbarHandlers["preview"], _this)(); + return false; + break; + + case 122: + $.proxy(toolbarHandlers["fullscreen"], _this)(); + return false; + break; + + default: + break; + } + } + }); + } + + return this; + }, + + /** + * 绑定同步滚动 + * + * @returns {editormd} return this + */ + + bindScrollEvent : function() { + + var _this = this; + var preview = this.preview; + var settings = this.settings; + var codeMirror = this.codeMirror; + var mouseOrTouch = editormd.mouseOrTouch; + + if (!settings.syncScrolling) { + return this; + } + + var cmBindScroll = function() { + codeMirror.find(".CodeMirror-scroll").bind(mouseOrTouch("scroll", "touchmove"), function(event) { + var height = $(this).height(); + var scrollTop = $(this).scrollTop(); + var percent = (scrollTop / $(this)[0].scrollHeight); + + var tocHeight = 0; + + preview.find(".markdown-toc-list").each(function(){ + tocHeight += $(this).height(); + }); + + var tocMenuHeight = preview.find(".editormd-toc-menu").height(); + tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; + + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= $(this)[0].scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); + } + + $.proxy(settings.onscroll, _this)(event); + }); + }; + + var cmUnbindScroll = function() { + codeMirror.find(".CodeMirror-scroll").unbind(mouseOrTouch("scroll", "touchmove")); + }; + + var previewBindScroll = function() { + + preview.bind(mouseOrTouch("scroll", "touchmove"), function(event) { + var height = $(this).height(); + var scrollTop = $(this).scrollTop(); + var percent = (scrollTop / $(this)[0].scrollHeight); + var codeView = codeMirror.find(".CodeMirror-scroll"); + + if(scrollTop === 0) + { + codeView.scrollTop(0); + } + else if (scrollTop + height >= $(this)[0].scrollHeight) + { + codeView.scrollTop(codeView[0].scrollHeight); + } + else + { + codeView.scrollTop(codeView[0].scrollHeight * percent); + } + + $.proxy(settings.onpreviewscroll, _this)(event); + }); + + }; + + var previewUnbindScroll = function() { + preview.unbind(mouseOrTouch("scroll", "touchmove")); + }; + + codeMirror.bind({ + mouseover : cmBindScroll, + mouseout : cmUnbindScroll, + touchstart : cmBindScroll, + touchend : cmUnbindScroll + }); + + if (settings.syncScrolling === "single") { + return this; + } + + preview.bind({ + mouseover : previewBindScroll, + mouseout : previewUnbindScroll, + touchstart : previewBindScroll, + touchend : previewUnbindScroll + }); + + return this; + }, + + bindChangeEvent : function() { + + var _this = this; + var cm = this.cm; + var settings = this.settings; + + if (!settings.syncScrolling) { + return this; + } + + cm.on("change", function(_cm, changeObj) { + + if (settings.watch) + { + _this.previewContainer.css("padding", settings.autoHeight ? "20px 20px 50px 40px" : "20px"); + } + + timer = setTimeout(function() { + clearTimeout(timer); + _this.save(); + timer = null; + }, settings.delay); + }); + + return this; + }, + + /** + * 加载队列完成之后的显示处理 + * Display handle of the module queues loaded after. + * + * @param {Boolean} recreate 是否为重建编辑器 + * @returns {editormd} 返回editormd的实例对象 + */ + + loadedDisplay : function(recreate) { + + recreate = recreate || false; + + var _this = this; + var editor = this.editor; + var preview = this.preview; + var settings = this.settings; + + this.containerMask.hide(); + + this.save(); + + if (settings.watch) { + preview.show(); + } + + editor.data("oldWidth", editor.width()).data("oldHeight", editor.height()); // 为了兼容Zepto + + this.resize(); + this.registerKeyMaps(); + + $(window).resize(function(){ + _this.resize(); + }); + + this.bindScrollEvent().bindChangeEvent(); + + if (!recreate) + { + $.proxy(settings.onload, this)(); + } + + this.state.loaded = true; + + return this; + }, + + /** + * 设置编辑器的宽度 + * Set editor width + * + * @param {Number|String} width 编辑器宽度值 + * @returns {editormd} 返回editormd的实例对象 + */ + + width : function(width) { + + this.editor.css("width", (typeof width === "number") ? width + "px" : width); + this.resize(); + + return this; + }, + + /** + * 设置编辑器的高度 + * Set editor height + * + * @param {Number|String} height 编辑器高度值 + * @returns {editormd} 返回editormd的实例对象 + */ + + height : function(height) { + + this.editor.css("height", (typeof height === "number") ? height + "px" : height); + this.resize(); + + return this; + }, + + /** + * 调整编辑器的尺寸和布局 + * Resize editor layout + * + * @param {Number|String} [width=null] 编辑器宽度值 + * @param {Number|String} [height=null] 编辑器高度值 + * @returns {editormd} 返回editormd的实例对象 + */ + + resize : function(width, height) { + + width = width || null; + height = height || null; + + var state = this.state; + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var codeMirror = this.codeMirror; + + if (width) + { + editor.css("width", (typeof width === "number") ? width + "px" : width); + } + + if (settings.autoHeight && !state.fullscreen && !state.preview) + { + editor.css("height", "auto"); + codeMirror.css("height", "auto"); + } + else + { + if (height) + { + editor.css("height", (typeof height === "number") ? height + "px" : height); + } + + if (state.fullscreen) + { + editor.height($(window).height()); + } + + if (settings.toolbar && !settings.readOnly) + { + codeMirror.css("margin-top", toolbar.height() + 1).height(editor.height() - toolbar.height()); + } + else + { + codeMirror.css("margin-top", 0).height(editor.height()); + } + } + + if(settings.watch) + { + codeMirror.width(editor.width() / 2); + preview.width((!state.preview) ? editor.width() / 2 : editor.width()); + + this.previewContainer.css("padding", settings.autoHeight ? "20px 20px 50px 40px" : "20px"); + + if (settings.toolbar && !settings.readOnly) + { + preview.css("top", toolbar.height() + 1); + } + else + { + preview.css("top", 0); + } + + if (settings.autoHeight && !state.fullscreen && !state.preview) + { + preview.height(""); + } + else + { + var previewHeight = (settings.toolbar && !settings.readOnly) ? editor.height() - toolbar.height() : editor.height(); + + preview.height(previewHeight); + } + } + else + { + codeMirror.width(editor.width()); + preview.hide(); + } + + if (state.loaded) + { + $.proxy(settings.onresize, this)(); + } + + return this; + }, + + /** + * 解析和保存Markdown代码 + * Parse & Saving Markdown source code + * + * @returns {editormd} 返回editormd的实例对象 + */ + + save : function() { + + var _this = this; + var state = this.state; + var settings = this.settings; + + if (timer === null && !(!settings.watch && state.preview)) + { + return this; + } + + var cm = this.cm; + var cmValue = cm.getValue(); + var previewContainer = this.previewContainer; + + if (settings.mode !== "gfm" && settings.mode !== "markdown") + { + this.markdownTextarea.val(cmValue); + + return this; + } + + var marked = editormd.$marked; + var markdownToC = this.markdownToC = []; + var rendererOptions = this.markedRendererOptions = { + toc : settings.toc, + tocm : settings.tocm, + tocStartLevel : settings.tocStartLevel, + pageBreak : settings.pageBreak, + taskList : settings.taskList, + emoji : settings.emoji, + tex : settings.tex, + atLink : settings.atLink, // for @link + emailLink : settings.emailLink, // for mail address auto link + flowChart : settings.flowChart, + sequenceDiagram : settings.sequenceDiagram, + previewCodeHighlight : settings.previewCodeHighlight, + }; + + var markedOptions = this.markedOptions = { + renderer : editormd.markedRenderer(markdownToC, rendererOptions), + gfm : true, + tables : true, + breaks : true, + pedantic : false, + sanitize : (settings.htmlDecode) ? false : true, // 关闭忽略HTML标签,即开启识别HTML标签,默认为false + smartLists : true, + smartypants : true + }; + + marked.setOptions(markedOptions); + + var newMarkdownDoc = editormd.$marked(cmValue, markedOptions); + + //console.info("cmValue", cmValue, newMarkdownDoc); + + newMarkdownDoc = editormd.filterHTMLTags(newMarkdownDoc, settings.htmlDecode); + + //console.error("cmValue", cmValue, newMarkdownDoc); + + this.markdownTextarea.text(cmValue); + + cm.save(); + + if (settings.saveHTMLToTextarea) + { + this.htmlTextarea.text(newMarkdownDoc); + } + + if(settings.watch || (!settings.watch && state.preview)) + { + previewContainer.html(newMarkdownDoc); + + this.previewCodeHighlight(); + + if (settings.toc) + { + var tocContainer = (settings.tocContainer === "") ? previewContainer : $(settings.tocContainer); + var tocMenu = tocContainer.find("." + this.classPrefix + "toc-menu"); + + tocContainer.attr("previewContainer", (settings.tocContainer === "") ? "true" : "false"); + + if (settings.tocContainer !== "" && tocMenu.length > 0) + { + tocMenu.remove(); + } + + editormd.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel); + + if (settings.tocDropdown || tocContainer.find("." + this.classPrefix + "toc-menu").length > 0) + { + editormd.tocDropdownMenu(tocContainer, (settings.tocTitle !== "") ? settings.tocTitle : this.lang.tocTitle); + } + + if (settings.tocContainer !== "") + { + previewContainer.find(".markdown-toc").css("border", "none"); + } + } + + if (settings.tex) + { + if (!editormd.kaTeXLoaded && settings.autoLoadModules) + { + editormd.loadKaTeX(function() { + editormd.$katex = katex; + editormd.kaTeXLoaded = true; + _this.katexRender(); + }); + } + else + { + editormd.$katex = katex; + this.katexRender(); + } + } + + if (settings.flowChart || settings.sequenceDiagram) + { + flowchartTimer = setTimeout(function(){ + clearTimeout(flowchartTimer); + _this.flowChartAndSequenceDiagramRender(); + flowchartTimer = null; + }, 10); + } + + if (state.loaded) + { + $.proxy(settings.onchange, this)(); + } + } + + return this; + }, + + /** + * 聚焦光标位置 + * Focusing the cursor position + * + * @returns {editormd} 返回editormd的实例对象 + */ + + focus : function() { + this.cm.focus(); + + return this; + }, + + /** + * 设置光标的位置 + * Set cursor position + * + * @param {Object} cursor 要设置的光标位置键值对象,例:{line:1, ch:0} + * @returns {editormd} 返回editormd的实例对象 + */ + + setCursor : function(cursor) { + this.cm.setCursor(cursor); + + return this; + }, + + /** + * 获取当前光标的位置 + * Get the current position of the cursor + * + * @returns {Cursor} 返回一个光标Cursor对象 + */ + + getCursor : function() { + return this.cm.getCursor(); + }, + + /** + * 设置光标选中的范围 + * Set cursor selected ranges + * + * @param {Object} from 开始位置的光标键值对象,例:{line:1, ch:0} + * @param {Object} to 结束位置的光标键值对象,例:{line:1, ch:0} + * @returns {editormd} 返回editormd的实例对象 + */ + + setSelection : function(from, to) { + + this.cm.setSelection(from, to); + + return this; + }, + + /** + * 获取光标选中的文本 + * Get the texts from cursor selected + * + * @returns {String} 返回选中文本的字符串形式 + */ + + getSelection : function() { + return this.cm.getSelection(); + }, + + /** + * 设置光标选中的文本范围 + * Set the cursor selection ranges + * + * @param {Array} ranges cursor selection ranges array + * @returns {Array} return this + */ + + setSelections : function(ranges) { + this.cm.setSelections(ranges); + + return this; + }, + + /** + * 获取光标选中的文本范围 + * Get the cursor selection ranges + * + * @returns {Array} return selection ranges array + */ + + getSelections : function() { + return this.cm.getSelections(); + }, + + /** + * 替换当前光标选中的文本或在当前光标处插入新字符 + * Replace the text at the current cursor selected or insert a new character at the current cursor position + * + * @param {String} value 要插入的字符值 + * @returns {editormd} 返回editormd的实例对象 + */ + + replaceSelection : function(value) { + this.cm.replaceSelection(value); + + return this; + }, + + /** + * 在当前光标处插入新字符 + * Insert a new character at the current cursor position + * + * 同replaceSelection()方法 + * With the replaceSelection() method + * + * @param {String} value 要插入的字符值 + * @returns {editormd} 返回editormd的实例对象 + */ + + insertValue : function(value) { + this.replaceSelection(value); + + return this; + }, + + /** + * 追加markdown + * append Markdown to editor + * + * @param {String} md 要追加的markdown源文档 + * @returns {editormd} 返回editormd的实例对象 + */ + + appendMarkdown : function(md) { + var settings = this.settings; + var cm = this.cm; + + cm.setValue(cm.getValue() + md); + + return this; + }, + + /** + * 设置和传入编辑器的markdown源文档 + * Set Markdown source document + * + * @param {String} md 要传入的markdown源文档 + * @returns {editormd} 返回editormd的实例对象 + */ + + setMarkdown : function(md) { + this.cm.setValue(md || this.settings.markdown); + + return this; + }, + + /** + * 获取编辑器的markdown源文档 + * Set Editor.md markdown/CodeMirror value + * + * @returns {editormd} 返回editormd的实例对象 + */ + + getMarkdown : function() { + return this.cm.getValue(); + }, + + /** + * 获取编辑器的源文档 + * Get CodeMirror value + * + * @returns {editormd} 返回editormd的实例对象 + */ + + getValue : function() { + return this.cm.getValue(); + }, + + /** + * 设置编辑器的源文档 + * Set CodeMirror value + * + * @param {String} value set code/value/string/text + * @returns {editormd} 返回editormd的实例对象 + */ + + setValue : function(value) { + this.cm.setValue(value); + + return this; + }, + + /** + * 清空编辑器 + * Empty CodeMirror editor container + * + * @returns {editormd} 返回editormd的实例对象 + */ + + clear : function() { + this.cm.setValue(""); + + return this; + }, + + /** + * 获取解析后存放在Textarea的HTML源码 + * Get parsed html code from Textarea + * + * @returns {String} 返回HTML源码 + */ + + getHTML : function() { + if (!this.settings.saveHTMLToTextarea) + { + alert("Error: settings.saveHTMLToTextarea == false"); + + return false; + } + + return this.htmlTextarea.val(); + }, + + /** + * getHTML()的别名 + * getHTML (alias) + * + * @returns {String} Return html code 返回HTML源码 + */ + + getTextareaSavedHTML : function() { + return this.getHTML(); + }, + + /** + * 获取预览窗口的HTML源码 + * Get html from preview container + * + * @returns {editormd} 返回editormd的实例对象 + */ + + getPreviewedHTML : function() { + if (!this.settings.watch) + { + alert("Error: settings.watch == false"); + + return false; + } + + return this.previewContainer.html(); + }, + + /** + * 开启实时预览 + * Enable real-time watching + * + * @returns {editormd} 返回editormd的实例对象 + */ + + watch : function(callback) { + var settings = this.settings; + + if ($.inArray(settings.mode, ["gfm", "markdown"]) < 0) + { + return this; + } + + this.state.watching = settings.watch = true; + this.preview.show(); + + if (this.toolbar) + { + var watchIcon = settings.toolbarIconsClass.watch; + var unWatchIcon = settings.toolbarIconsClass.unwatch; + + var icon = this.toolbar.find(".fa[name=watch]"); + icon.parent().attr("title", settings.lang.toolbar.watch); + icon.removeClass(unWatchIcon).addClass(watchIcon); + } + + this.codeMirror.css("border-right", "1px solid #ddd").width(this.editor.width() / 2); + + timer = 0; + + this.save().resize(); + + if (!settings.onwatch) + { + settings.onwatch = callback || function() {}; + } + + $.proxy(settings.onwatch, this)(); + + return this; + }, + + /** + * 关闭实时预览 + * Disable real-time watching + * + * @returns {editormd} 返回editormd的实例对象 + */ + + unwatch : function(callback) { + var settings = this.settings; + this.state.watching = settings.watch = false; + this.preview.hide(); + + if (this.toolbar) + { + var watchIcon = settings.toolbarIconsClass.watch; + var unWatchIcon = settings.toolbarIconsClass.unwatch; + + var icon = this.toolbar.find(".fa[name=watch]"); + icon.parent().attr("title", settings.lang.toolbar.unwatch); + icon.removeClass(watchIcon).addClass(unWatchIcon); + } + + this.codeMirror.css("border-right", "none").width(this.editor.width()); + + this.resize(); + + if (!settings.onunwatch) + { + settings.onunwatch = callback || function() {}; + } + + $.proxy(settings.onunwatch, this)(); + + return this; + }, + + /** + * 显示编辑器 + * Show editor + * + * @param {Function} [callback=function()] 回调函数 + * @returns {editormd} 返回editormd的实例对象 + */ + + show : function(callback) { + callback = callback || function() {}; + + var _this = this; + this.editor.show(0, function() { + $.proxy(callback, _this)(); + }); + + return this; + }, + + /** + * 隐藏编辑器 + * Hide editor + * + * @param {Function} [callback=function()] 回调函数 + * @returns {editormd} 返回editormd的实例对象 + */ + + hide : function(callback) { + callback = callback || function() {}; + + var _this = this; + this.editor.hide(0, function() { + $.proxy(callback, _this)(); + }); + + return this; + }, + + /** + * 隐藏编辑器部分,只预览HTML + * Enter preview html state + * + * @returns {editormd} 返回editormd的实例对象 + */ + + previewing : function() { + + var _this = this; + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var codeMirror = this.codeMirror; + var previewContainer = this.previewContainer; + + if ($.inArray(settings.mode, ["gfm", "markdown"]) < 0) { + return this; + } + + if (settings.toolbar && toolbar) { + toolbar.toggle(); + toolbar.find(".fa[name=preview]").toggleClass("active"); + } + + codeMirror.toggle(); + + var escHandle = function(event) { + if (event.shiftKey && event.keyCode === 27) { + _this.previewed(); + } + }; + + if (codeMirror.css("display") === "none") // 为了兼容Zepto,而不使用codeMirror.is(":hidden") + { + this.state.preview = true; + + if (this.state.fullscreen) { + preview.css("background", "#fff"); + } + + editor.find("." + this.classPrefix + "preview-close-btn").show().bind(editormd.mouseOrTouch("click", "touchend"), function(){ + _this.previewed(); + }); + + if (!settings.watch) + { + this.save(); + } + else + { + previewContainer.css("padding", ""); + } + + previewContainer.addClass(this.classPrefix + "preview-active"); + + preview.show().css({ + position : "", + top : 0, + width : editor.width(), + height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() + }); + + if (this.state.loaded) + { + $.proxy(settings.onpreviewing, this)(); + } + + $(window).bind("keyup", escHandle); + } + else + { + $(window).unbind("keyup", escHandle); + this.previewed(); + } + }, + + /** + * 显示编辑器部分,退出只预览HTML + * Exit preview html state + * + * @returns {editormd} 返回editormd的实例对象 + */ + + previewed : function() { + + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var previewContainer = this.previewContainer; + var previewCloseBtn = editor.find("." + this.classPrefix + "preview-close-btn"); + + this.state.preview = false; + + this.codeMirror.show(); + + if (settings.toolbar) { + toolbar.show(); + } + + preview[(settings.watch) ? "show" : "hide"](); + + previewCloseBtn.hide().unbind(editormd.mouseOrTouch("click", "touchend")); + + previewContainer.removeClass(this.classPrefix + "preview-active"); + + if (settings.watch) + { + previewContainer.css("padding", "20px"); + } + + preview.css({ + background : null, + position : "absolute", + width : editor.width() / 2, + height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() - toolbar.height(), + top : (settings.toolbar) ? toolbar.height() : 0 + }); + + if (this.state.loaded) + { + $.proxy(settings.onpreviewed, this)(); + } + + return this; + }, + + /** + * 编辑器全屏显示 + * Fullscreen show + * + * @returns {editormd} 返回editormd的实例对象 + */ + + fullscreen : function() { + + var _this = this; + var state = this.state; + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var fullscreenClass = this.classPrefix + "fullscreen"; + + if (toolbar) { + toolbar.find(".fa[name=fullscreen]").parent().toggleClass("active"); + } + + var escHandle = function(event) { + if (!event.shiftKey && event.keyCode === 27) + { + if (state.fullscreen) + { + _this.fullscreenExit(); + } + } + }; + + if (!editor.hasClass(fullscreenClass)) + { + state.fullscreen = true; + + $("html,body").css("overflow", "hidden"); + + editor.css({ + width : $(window).width(), + height : $(window).height() + }).addClass(fullscreenClass); + + this.resize(); + + $.proxy(settings.onfullscreen, this)(); + + $(window).bind("keyup", escHandle); + } + else + { + $(window).unbind("keyup", escHandle); + this.fullscreenExit(); + } + + return this; + }, + + /** + * 编辑器退出全屏显示 + * Exit fullscreen state + * + * @returns {editormd} 返回editormd的实例对象 + */ + + fullscreenExit : function() { + + var editor = this.editor; + var settings = this.settings; + var toolbar = this.toolbar; + var fullscreenClass = this.classPrefix + "fullscreen"; + + this.state.fullscreen = false; + + if (toolbar) { + toolbar.find(".fa[name=fullscreen]").parent().removeClass("active"); + } + + $("html,body").css("overflow", ""); + + editor.css({ + width : editor.data("oldWidth"), + height : editor.data("oldHeight") + }).removeClass(fullscreenClass); + + this.resize(); + + $.proxy(settings.onfullscreenExit, this)(); + + return this; + }, + + /** + * 加载并执行插件 + * Load and execute the plugin + * + * @param {String} name plugin name / function name + * @param {String} path plugin load path + * @returns {editormd} 返回editormd的实例对象 + */ + + executePlugin : function(name, path) { + + var _this = this; + var cm = this.cm; + var settings = this.settings; + + path = settings.pluginPath + path; + + if (typeof define === "function") + { + if (typeof this[name] === "undefined") + { + alert("Error: " + name + " plugin is not found, you are not load this plugin."); + + return this; + } + + this[name](cm); + + return this; + } + + if ($.inArray(path, editormd.loadFiles.plugin) < 0) + { + editormd.loadPlugin(path, function() { + editormd.loadPlugins[name] = _this[name]; + _this[name](cm); + }); + } + else + { + $.proxy(editormd.loadPlugins[name], this)(cm); + } + + return this; + }, + + /** + * 搜索替换 + * Search & replace + * + * @param {String} command CodeMirror serach commands, "find, fintNext, fintPrev, clearSearch, replace, replaceAll" + * @returns {editormd} return this + */ + + search : function(command) { + var settings = this.settings; + + if (!settings.searchReplace) + { + alert("Error: settings.searchReplace == false"); + return this; + } + + if (!settings.readOnly) + { + this.cm.execCommand(command || "find"); + } + + return this; + }, + + searchReplace : function() { + this.search("replace"); + + return this; + }, + + searchReplaceAll : function() { + this.search("replaceAll"); + + return this; + } + }; + + editormd.fn.init.prototype = editormd.fn; + + /** + * 锁屏 + * lock screen when dialog opening + * + * @returns {void} + */ + + editormd.dialogLockScreen = function() { + var settings = this.settings || {dialogLockScreen : true}; + + if (settings.dialogLockScreen) + { + $("html,body").css("overflow", "hidden"); + this.resize(); + } + }; + + /** + * 显示透明背景层 + * Display mask layer when dialog opening + * + * @param {Object} dialog dialog jQuery object + * @returns {void} + */ + + editormd.dialogShowMask = function(dialog) { + var editor = this.editor; + var settings = this.settings || {dialogShowMask : true}; + + dialog.css({ + top : ($(window).height() - dialog.height()) / 2 + "px", + left : ($(window).width() - dialog.width()) / 2 + "px" + }); + + if (settings.dialogShowMask) { + editor.children("." + this.classPrefix + "mask").css("z-index", parseInt(dialog.css("z-index")) - 1).show(); + } + }; + + editormd.toolbarHandlers = { + undo : function() { + this.cm.undo(); + }, + + redo : function() { + this.cm.redo(); + }, + + bold : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("**" + selection + "**"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 2); + } + }, + + del : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("~~" + selection + "~~"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 2); + } + }, + + italic : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("*" + selection + "*"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + + quote : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("> " + selection); + cm.setCursor(cursor.line, cursor.ch + 2); + } + else + { + cm.replaceSelection("> " + selection); + } + + //cm.replaceSelection("> " + selection); + //cm.setCursor(cursor.line, (selection === "") ? cursor.ch + 2 : cursor.ch + selection.length + 2); + }, + + ucfirst : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(editormd.firstUpperCase(selection)); + cm.setSelections(selections); + }, + + ucwords : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(editormd.wordsFirstUpperCase(selection)); + cm.setSelections(selections); + }, + + uppercase : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(selection.toUpperCase()); + cm.setSelections(selections); + }, + + lowercase : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(selection.toLowerCase()); + cm.setSelections(selections); + }, + + h1 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("# " + selection); + cm.setCursor(cursor.line, cursor.ch + 2); + } + else + { + cm.replaceSelection("# " + selection); + } + }, + + h2 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("## " + selection); + cm.setCursor(cursor.line, cursor.ch + 3); + } + else + { + cm.replaceSelection("## " + selection); + } + }, + + h3 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("### " + selection); + cm.setCursor(cursor.line, cursor.ch + 4); + } + else + { + cm.replaceSelection("### " + selection); + } + }, + + h4 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("#### " + selection); + cm.setCursor(cursor.line, cursor.ch + 5); + } + else + { + cm.replaceSelection("#### " + selection); + } + }, + + h5 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("##### " + selection); + cm.setCursor(cursor.line, cursor.ch + 6); + } + else + { + cm.replaceSelection("##### " + selection); + } + }, + + h6 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("###### " + selection); + cm.setCursor(cursor.line, cursor.ch + 7); + } + else + { + cm.replaceSelection("###### " + selection); + } + }, + + "list-ul" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (selection === "") + { + cm.replaceSelection("- " + selection); + } + else + { + var selectionText = selection.split("\n"); + + for (var i = 0, len = selectionText.length; i < len; i++) + { + selectionText[i] = (selectionText[i] === "") ? "" : "- " + selectionText[i]; + } + + cm.replaceSelection(selectionText.join("\n")); + } + }, + + "list-ol" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if(selection === "") + { + cm.replaceSelection("1. " + selection); + } + else + { + var selectionText = selection.split("\n"); + + for (var i = 0, len = selectionText.length; i < len; i++) + { + selectionText[i] = (selectionText[i] === "") ? "" : (i+1) + ". " + selectionText[i]; + } + + cm.replaceSelection(selectionText.join("\n")); + } + }, + + hr : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection(((cursor.ch !== 0) ? "\n\n" : "\n") + "------------\n\n"); + }, + + tex : function() { + if (!this.settings.tex) + { + alert("settings.tex === false"); + return this; + } + + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("$$" + selection + "$$"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 2); + } + }, + + link : function() { + this.executePlugin("linkDialog", "link-dialog/link-dialog"); + }, + + "reference-link" : function() { + this.executePlugin("referenceLinkDialog", "reference-link-dialog/reference-link-dialog"); + }, + + pagebreak : function() { + if (!this.settings.pageBreak) + { + alert("settings.pageBreak === false"); + return this; + } + + var cm = this.cm; + var selection = cm.getSelection(); + + cm.replaceSelection("\r\n[========]\r\n"); + }, + + image : function() { + this.executePlugin("imageDialog", "image-dialog/image-dialog"); + }, + + code : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("`" + selection + "`"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + + "code-block" : function() { + this.executePlugin("codeBlockDialog", "code-block-dialog/code-block-dialog"); + }, + + "preformatted-text" : function() { + this.executePlugin("preformattedTextDialog", "preformatted-text-dialog/preformatted-text-dialog"); + }, + + table : function() { + this.executePlugin("tableDialog", "table-dialog/table-dialog"); + }, + + datetime : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var date = new Date(); + var langName = this.settings.lang.name; + var datefmt = editormd.dateFormat() + " " + editormd.dateFormat((langName === "zh-cn" || langName === "zh-tw") ? "cn-week-day" : "week-day"); + + cm.replaceSelection(datefmt); + }, + + emoji : function() { + this.executePlugin("emojiDialog", "emoji-dialog/emoji-dialog"); + }, + + "html-entities" : function() { + this.executePlugin("htmlEntitiesDialog", "html-entities-dialog/html-entities-dialog"); + }, + + "goto-line" : function() { + this.executePlugin("gotoLineDialog", "goto-line-dialog/goto-line-dialog"); + }, + + watch : function() { + this[this.settings.watch ? "unwatch" : "watch"](); + }, + + preview : function() { + this.previewing(); + }, + + fullscreen : function() { + this.fullscreen(); + }, + + clear : function() { + this.clear(); + }, + + search : function() { + this.search(); + }, + + help : function() { + this.executePlugin("helpDialog", "help-dialog/help-dialog"); + }, + + info : function() { + this.showInfoDialog(); + } + }; + + editormd.keyMaps = { + "Ctrl-1" : "h1", + "Ctrl-2" : "h2", + "Ctrl-3" : "h3", + "Ctrl-4" : "h4", + "Ctrl-5" : "h5", + "Ctrl-6" : "h6", + "Ctrl-B" : "bold", // if this is string == editormd.toolbarHandlers.xxxx + "Ctrl-D" : "datetime", + + "Ctrl-E" : function() { // emoji + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (!this.settings.emoji) + { + alert("Error: settings.emoji == false"); + return ; + } + + cm.replaceSelection(":" + selection + ":"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + "Ctrl-Alt-G" : "goto-line", + "Ctrl-H" : "hr", + "Ctrl-I" : "italic", + "Ctrl-K" : "code", + + "Ctrl-L" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + var title = (selection === "") ? "" : " \""+selection+"\""; + + cm.replaceSelection("[" + selection + "]("+title+")"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + "Ctrl-U" : "list-ul", + + "Shift-Ctrl-A" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (!this.settings.atLink) + { + alert("Error: settings.atLink == false"); + return ; + } + + cm.replaceSelection("@" + selection); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + + "Shift-Ctrl-C" : "code", + "Shift-Ctrl-Q" : "quote", + "Shift-Ctrl-S" : "del", + "Shift-Ctrl-K" : "tex", // KaTeX + + "Shift-Alt-C" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection(["```", selection, "```"].join("\n")); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 3); + } + }, + + "Shift-Ctrl-Alt-C" : "code-block", + "Shift-Ctrl-H" : "html-entities", + "Shift-Alt-H" : "help", + "Shift-Ctrl-E" : "emoji", + "Shift-Ctrl-U" : "uppercase", + "Shift-Alt-U" : "ucwords", + "Shift-Ctrl-Alt-U" : "ucfirst", + "Shift-Alt-L" : "lowercase", + + "Shift-Ctrl-I" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + var title = (selection === "") ? "" : " \""+selection+"\""; + + cm.replaceSelection("![" + selection + "]("+title+")"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 4); + } + }, + + "Shift-Ctrl-Alt-I" : "image", + "Shift-Ctrl-L" : "link", + "Shift-Ctrl-O" : "list-ol", + "Shift-Ctrl-P" : "preformatted-text", + "Shift-Ctrl-T" : "table", + "Shift-Alt-P" : "pagebreak", + "F9" : "watch", + "F10" : "preview", + "F11" : "fullscreen", + }; + + /** + * 清除字符串两边的空格 + * Clear the space of strings both sides. + * + * @param {String} str string + * @returns {String} trimed string + */ + + var trim = function(str) { + return (!String.prototype.trim) ? str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") : str.trim(); + }; + + editormd.trim = trim; + + /** + * 所有单词首字母大写 + * Words first to uppercase + * + * @param {String} str string + * @returns {String} string + */ + + var ucwords = function (str) { + return str.toLowerCase().replace(/\b(\w)|\s(\w)/g, function($1) { + return $1.toUpperCase(); + }); + }; + + editormd.ucwords = editormd.wordsFirstUpperCase = ucwords; + + /** + * 字符串首字母大写 + * Only string first char to uppercase + * + * @param {String} str string + * @returns {String} string + */ + + var firstUpperCase = function(str) { + return str.toLowerCase().replace(/\b(\w)/, function($1){ + return $1.toUpperCase(); + }); + }; + + var ucfirst = firstUpperCase; + + editormd.firstUpperCase = editormd.ucfirst = firstUpperCase; + + editormd.urls = { + atLinkBase : "https://github.com/" + }; + + editormd.regexs = { + atLink : /@(\w+)/g, + email : /(\w+)@(\w+)\.(\w+)\.?(\w+)?/g, + emailLink : /(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g, + emoji : /:([\w\+-]+):/g, + emojiDatetime : /(\d{2}:\d{2}:\d{2})/g, + twemoji : /:(tw-([\w]+)-?(\w+)?):/g, + fontAwesome : /:(fa-([\w]+)(-(\w+)){0,}):/g, + editormdLogo : /:(editormd-logo-?(\w+)?):/g, + pageBreak : /^\[[=]{8,}\]$/ + }; + + // Emoji graphics files url path + editormd.emoji = { + //path : "http://www.emoji-cheat-sheet.com/graphics/emojis/", + path : "/static/editor.md/plugins/emoji-dialog/emoji/", + ext : ".png" + }; + + // Twitter Emoji (Twemoji) graphics files url path + editormd.twemoji = { + path : "http://twemoji.maxcdn.com/36x36/", + ext : ".png" + }; + + /** + * 自定义marked的解析器 + * Custom Marked renderer rules + * + * @param {Array} markdownToC 传入用于接收TOC的数组 + * @returns {Renderer} markedRenderer 返回marked的Renderer自定义对象 + */ + + editormd.markedRenderer = function(markdownToC, options) { + var defaults = { + toc : true, // Table of contents + tocm : false, + tocStartLevel : 1, // Said from H1 to create ToC + pageBreak : true, + atLink : true, // for @link + emailLink : true, // for mail address auto link + taskList : false, // Enable Github Flavored Markdown task lists + emoji : false, // :emoji: , Support Twemoji, fontAwesome, Editor.md logo emojis. + tex : false, // TeX(LaTeX), based on KaTeX + flowChart : false, // flowChart.js only support IE9+ + sequenceDiagram : false, // sequenceDiagram.js only support IE9+ + }; + + var settings = $.extend(defaults, options || {}); + var marked = editormd.$marked; + var markedRenderer = new marked.Renderer(); + markdownToC = markdownToC || []; + + var regexs = editormd.regexs; + var atLinkReg = regexs.atLink; + var emojiReg = regexs.emoji; + var emailReg = regexs.email; + var emailLinkReg = regexs.emailLink; + var twemojiReg = regexs.twemoji; + var faIconReg = regexs.fontAwesome; + var editormdLogoReg = regexs.editormdLogo; + var pageBreakReg = regexs.pageBreak; + + markedRenderer.emoji = function(text) { + + text = text.replace(editormd.regexs.emojiDatetime, function($1) { + return $1.replace(/:/g, ":"); + }); + + var matchs = text.match(emojiReg); + + if (!matchs || !settings.emoji) { + return text; + } + + for (var i = 0, len = matchs.length; i < len; i++) + { + if (matchs[i] === ":+1:") { + matchs[i] = ":\\+1:"; + } + + text = text.replace(new RegExp(matchs[i]), function($1, $2){ + var faMatchs = $1.match(faIconReg); + var name = $1.replace(/:/g, ""); + + if (faMatchs) + { + for (var fa = 0, len1 = faMatchs.length; fa < len1; fa++) + { + var faName = faMatchs[fa].replace(/:/g, ""); + + return ""; + } + } + else + { + var emdlogoMathcs = $1.match(editormdLogoReg); + var twemojiMatchs = $1.match(twemojiReg); + + if (emdlogoMathcs) + { + for (var x = 0, len2 = emdlogoMathcs.length; x < len2; x++) + { + var logoName = emdlogoMathcs[x].replace(/:/g, ""); + return ""; + } + } + else if (twemojiMatchs) + { + for (var t = 0, len3 = twemojiMatchs.length; t < len3; t++) + { + var twe = twemojiMatchs[t].replace(/:/g, "").replace("tw-", ""); + return "\"twemoji-""; + } + } + else + { + var src = (name === "+1") ? "plus1" : name; + src = (src === "black_large_square") ? "black_square" : src; + src = (src === "moon") ? "waxing_gibbous_moon" : src; + + return "\":""; + } + } + }); + } + + return text; + }; + + markedRenderer.atLink = function(text) { + + if (atLinkReg.test(text)) + { + if (settings.atLink) + { + text = text.replace(emailReg, function($1, $2, $3, $4) { + return $1.replace(/@/g, "_#_@_#_"); + }); + + text = text.replace(atLinkReg, function($1, $2) { + return "" + $1 + ""; + }).replace(/_#_@_#_/g, "@"); + } + + if (settings.emailLink) + { + text = text.replace(emailLinkReg, function($1, $2, $3, $4, $5) { + return (!$2 && $.inArray($5, "jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|")) < 0) ? ""+$1+"" : $1; + }); + } + + return text; + } + + return text; + }; + + markedRenderer.link = function (href, title, text) { + + if (this.options.sanitize) { + try { + var prot = decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase(); + } catch(e) { + return ""; + } + + if (prot.indexOf("javascript:") === 0) { + return ""; + } + } + + var out = "" + text.replace(/@/g, "@") + ""; + } + + if (title) { + out += " title=\"" + title + "\""; + } + + out += ">" + text + ""; + + return out; + }; + + markedRenderer.heading = function(text, level, raw) { + + var linkText = text; + var hasLinkReg = /\s*\]*)\>(.*)\<\/a\>\s*/; + var getLinkTextReg = /\s*\]+)\>([^\>]*)\<\/a\>\s*/g; + + if (hasLinkReg.test(text)) + { + var tempText = []; + text = text.split(/\]+)\>([^\>]*)\<\/a\>/); + + for (var i = 0, len = text.length; i < len; i++) + { + tempText.push(text[i].replace(/\s*href\=\"(.*)\"\s*/g, "")); + } + + text = tempText.join(" "); + } + + text = trim(text); + + var escapedText = text.toLowerCase().replace(/[^\w]+/g, "-"); + var toc = { + text : text, + level : level, + slug : escapedText + }; + + var isChinese = /^[\u4e00-\u9fa5]+$/.test(text); + var id = (isChinese) ? escape(text).replace(/\%/g, "") : text.toLowerCase().replace(/[^\w]+/g, "-"); + + markdownToC.push(toc); + + var headingHTML = ""; + + headingHTML += ""; + headingHTML += ""; + headingHTML += (hasLinkReg) ? this.atLink(this.emoji(linkText)) : this.atLink(this.emoji(text)); + headingHTML += ""; + + return headingHTML; + }; + + markedRenderer.pageBreak = function(text) { + if (pageBreakReg.test(text) && settings.pageBreak) + { + text = "
              "; + } + + return text; + }; + + markedRenderer.paragraph = function(text) { + var isTeXInline = /\$\$(.*)\$\$/g.test(text); + var isTeXLine = /^\$\$(.*)\$\$$/.test(text); + var isTeXAddClass = (isTeXLine) ? " class=\"" + editormd.classNames.tex + "\"" : ""; + var isToC = (settings.tocm) ? /^(\[TOC\]|\[TOCM\])$/.test(text) : /^\[TOC\]$/.test(text); + var isToCMenu = /^\[TOCM\]$/.test(text); + + if (!isTeXLine && isTeXInline) + { + text = text.replace(/(\$\$([^\$]*)\$\$)+/g, function($1, $2) { + return "" + $2.replace(/\$/g, "") + ""; + }); + } + else + { + text = (isTeXLine) ? text.replace(/\$/g, "") : text; + } + + var tocHTML = "
              " + text + "
              "; + + return (isToC) ? ( (isToCMenu) ? "
              " + tocHTML + "

              " : tocHTML ) + : ( (pageBreakReg.test(text)) ? this.pageBreak(text) : "" + this.atLink(this.emoji(text)) + "

              \n" ); + }; + + markedRenderer.code = function (code, lang, escaped) { + + if (lang === "seq" || lang === "sequence") + { + return "
              " + code + "
              "; + } + else if ( lang === "flow") + { + return "
              " + code + "
              "; + } + else if ( lang === "math" || lang === "latex" || lang === "katex") + { + return "

              " + code + "

              "; + } + else + { + + return marked.Renderer.prototype.code.apply(this, arguments); + } + }; + + markedRenderer.tablecell = function(content, flags) { + var type = (flags.header) ? "th" : "td"; + var tag = (flags.align) ? "<" + type +" style=\"text-align:" + flags.align + "\">" : "<" + type + ">"; + + return tag + this.atLink(this.emoji(content)) + "\n"; + }; + + markedRenderer.listitem = function(text) { + if (settings.taskList && /^\s*\[[x\s]\]\s*/.test(text)) + { + text = text.replace(/^\s*\[\s\]\s*/, " ") + .replace(/^\s*\[x\]\s*/, " "); + + return "
            • " + this.atLink(this.emoji(text)) + "
            • "; + } + else + { + return "
            • " + this.atLink(this.emoji(text)) + "
            • "; + } + }; + + return markedRenderer; + }; + + /** + * + * 生成TOC(Table of Contents) + * Creating ToC (Table of Contents) + * + * @param {Array} toc 从marked获取的TOC数组列表 + * @param {Element} container 插入TOC的容器元素 + * @param {Integer} startLevel Hx 起始层级 + * @returns {Object} tocContainer 返回ToC列表容器层的jQuery对象元素 + */ + + editormd.markdownToCRenderer = function(toc, container, tocDropdown, startLevel) { + + var html = ""; + var lastLevel = 0; + var classPrefix = this.classPrefix; + + startLevel = startLevel || 1; + + for (var i = 0, len = toc.length; i < len; i++) + { + var text = toc[i].text; + var level = toc[i].level; + + if (level < startLevel) { + continue; + } + + if (level > lastLevel) + { + html += ""; + } + else if (level < lastLevel) + { + html += (new Array(lastLevel - level + 2)).join("
          • "); + } + else + { + html += ""; + } + + html += "
          • " + text + "
              "; + lastLevel = level; + } + + var tocContainer = container.find(".markdown-toc"); + + if ((tocContainer.length < 1 && container.attr("previewContainer") === "false")) + { + var tocHTML = "
              "; + + tocHTML = (tocDropdown) ? "
              " + tocHTML + "
              " : tocHTML; + + container.html(tocHTML); + + tocContainer = container.find(".markdown-toc"); + } + + if (tocDropdown) + { + tocContainer.wrap("

              "); + } + + tocContainer.html("
                ").children(".markdown-toc-list").html(html.replace(/\r?\n?\\<\/ul\>/g, "")); + + return tocContainer; + }; + + /** + * + * 生成TOC下拉菜单 + * Creating ToC dropdown menu + * + * @param {Object} container 插入TOC的容器jQuery对象元素 + * @param {String} tocTitle ToC title + * @returns {Object} return toc-menu object + */ + + editormd.tocDropdownMenu = function(container, tocTitle) { + + tocTitle = tocTitle || "Table of Contents"; + + var zindex = 400; + var tocMenus = container.find("." + this.classPrefix + "toc-menu"); + + tocMenus.each(function() { + var $this = $(this); + var toc = $this.children(".markdown-toc"); + var icon = ""; + var btn = "" + icon + tocTitle + ""; + var menu = toc.children("ul"); + var list = menu.find("li"); + + toc.append(btn); + + list.first().before("
              • " + tocTitle + " " + icon + "

              • "); + + $this.mouseover(function(){ + menu.show(); + + list.each(function(){ + var li = $(this); + var ul = li.children("ul"); + + if (ul.html() === "") + { + ul.remove(); + } + + if (ul.length > 0 && ul.html() !== "") + { + var firstA = li.children("a").first(); + + if (firstA.children(".fa").length < 1) + { + firstA.append( $(icon).css({ float:"right", paddingTop:"4px" }) ); + } + } + + li.mouseover(function(){ + ul.css("z-index", zindex).show(); + zindex += 1; + }).mouseleave(function(){ + ul.hide(); + }); + }); + }).mouseleave(function(){ + menu.hide(); + }); + }); + + return tocMenus; + }; + + /** + * 简单地过滤指定的HTML标签 + * Filter custom html tags + * + * @param {String} html 要过滤HTML + * @param {String} filters 要过滤的标签 + * @returns {String} html 返回过滤的HTML + */ + + editormd.filterHTMLTags = function(html, filters) { + + if (typeof html !== "string") { + html = new String(html); + } + + if (typeof filters !== "string") { + return html; + } + + var expression = filters.split("|"); + var filterTags = expression[0].split(","); + var attrs = expression[1]; + + for (var i = 0, len = filterTags.length; i < len; i++) + { + var tag = filterTags[i]; + + html = html.replace(new RegExp("\<\s*" + tag + "\s*([^\>]*)\>([^\>]*)\<\s*\/" + tag + "\s*\>", "igm"), ""); + } + + //return html; + + if (typeof attrs !== "undefined") + { + var htmlTagRegex = /\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/ig; + + if (attrs === "*") + { + html = html.replace(htmlTagRegex, function($1, $2, $3, $4, $5) { + return "<" + $2 + ">" + $4 + ""; + }); + } + else if (attrs === "on*") + { + html = html.replace(htmlTagRegex, function($1, $2, $3, $4, $5) { + var el = $("<" + $2 + ">" + $4 + ""); + var _attrs = $($1)[0].attributes; + var $attrs = {}; + + $.each(_attrs, function(i, e) { + if (e.nodeName !== '"') $attrs[e.nodeName] = e.nodeValue; + }); + + $.each($attrs, function(i) { + if (i.indexOf("on") === 0) { + delete $attrs[i]; + } + }); + + el.attr($attrs); + + var text = (typeof el[1] !== "undefined") ? $(el[1]).text() : ""; + + return el[0].outerHTML + text; + }); + } + else + { + html = html.replace(htmlTagRegex, function($1, $2, $3, $4) { + var filterAttrs = attrs.split(","); + var el = $($1); + el.html($4); + + $.each(filterAttrs, function(i) { + el.attr(filterAttrs[i], null); + }); + + return el[0].outerHTML; + }); + } + } + + return html; + }; + + /** + * 将Markdown文档解析为HTML用于前台显示 + * Parse Markdown to HTML for Font-end preview. + * + * @param {String} id 用于显示HTML的对象ID + * @param {Object} [options={}] 配置选项,可选 + * @returns {Object} div 返回jQuery对象元素 + */ + + editormd.markdownToHTML = function(id, options) { + var defaults = { + gfm : true, + toc : true, + tocm : false, + tocStartLevel : 1, + tocTitle : "目录", + tocDropdown : false, + tocContainer : "", + markdown : "", + markdownSourceCode : false, + htmlDecode : false, + autoLoadKaTeX : true, + pageBreak : true, + atLink : true, // for @link + emailLink : true, // for mail address auto link + tex : false, + taskList : false, // Github Flavored Markdown task lists + emoji : false, + flowChart : false, + sequenceDiagram : false, + previewCodeHighlight : true + }; + + editormd.$marked = marked; + + var div = $("#" + id); + var settings = div.settings = $.extend(true, defaults, options || {}); + var saveTo = div.find("textarea"); + + if (saveTo.length < 1) + { + div.append(""); + saveTo = div.find("textarea"); + } + + var markdownDoc = (settings.markdown === "") ? saveTo.val() : settings.markdown; + var markdownToC = []; + + var rendererOptions = { + toc : settings.toc, + tocm : settings.tocm, + tocStartLevel : settings.tocStartLevel, + taskList : settings.taskList, + emoji : settings.emoji, + tex : settings.tex, + pageBreak : settings.pageBreak, + atLink : settings.atLink, // for @link + emailLink : settings.emailLink, // for mail address auto link + flowChart : settings.flowChart, + sequenceDiagram : settings.sequenceDiagram, + previewCodeHighlight : settings.previewCodeHighlight, + }; + + var markedOptions = { + renderer : editormd.markedRenderer(markdownToC, rendererOptions), + gfm : settings.gfm, + tables : true, + breaks : true, + pedantic : false, + sanitize : (settings.htmlDecode) ? false : true, // 是否忽略HTML标签,即是否开启HTML标签解析,为了安全性,默认不开启 + smartLists : true, + smartypants : true + }; + + markdownDoc = new String(markdownDoc); + + var markdownParsed = marked(markdownDoc, markedOptions); + + markdownParsed = editormd.filterHTMLTags(markdownParsed, settings.htmlDecode); + + if (settings.markdownSourceCode) { + saveTo.text(markdownDoc); + } else { + saveTo.remove(); + } + + div.addClass("markdown-body " + this.classPrefix + "html-preview").append(markdownParsed); + + var tocContainer = (settings.tocContainer !== "") ? $(settings.tocContainer) : div; + + if (settings.tocContainer !== "") + { + tocContainer.attr("previewContainer", false); + } + + if (settings.toc) + { + div.tocContainer = this.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel); + + if (settings.tocDropdown || div.find("." + this.classPrefix + "toc-menu").length > 0) + { + this.tocDropdownMenu(div, settings.tocTitle); + } + + if (settings.tocContainer !== "") + { + div.find(".editormd-toc-menu, .editormd-markdown-toc").remove(); + } + } + + if (settings.previewCodeHighlight) + { + div.find("pre").addClass("prettyprint linenums"); + prettyPrint(); + } + + if (!editormd.isIE8) + { + if (settings.flowChart) { + div.find(".flowchart").flowChart(); + } + + if (settings.sequenceDiagram) { + div.find(".sequence-diagram").sequenceDiagram({theme: "simple"}); + } + } + + if (settings.tex) + { + var katexHandle = function() { + div.find("." + editormd.classNames.tex).each(function(){ + var tex = $(this); + katex.render(tex.html().replace(/</g, "<").replace(/>/g, ">"), tex[0]); + tex.find(".katex").css("font-size", "1.6em"); + }); + }; + + if (settings.autoLoadKaTeX && !editormd.$katex && !editormd.kaTeXLoaded) + { + this.loadKaTeX(function() { + editormd.$katex = katex; + editormd.kaTeXLoaded = true; + katexHandle(); + }); + } + else + { + katexHandle(); + } + } + + div.getMarkdown = function() { + return saveTo.val(); + }; + + return div; + }; + + // Editor.md themes, change toolbar themes etc. + // added @1.5.0 + editormd.themes = ["default", "dark"]; + + // Preview area themes + // added @1.5.0 + editormd.previewThemes = ["default", "dark"]; + + // CodeMirror / editor area themes + // @1.5.0 rename -> editorThemes, old version -> themes + editormd.editorThemes = [ + "default", "3024-day", "3024-night", + "ambiance", "ambiance-mobile", + "base16-dark", "base16-light", "blackboard", + "cobalt", + "eclipse", "elegant", "erlang-dark", + "lesser-dark", + "mbo", "mdn-like", "midnight", "monokai", + "neat", "neo", "night", + "paraiso-dark", "paraiso-light", "pastel-on-dark", + "rubyblue", + "solarized", + "the-matrix", "tomorrow-night-eighties", "twilight", + "vibrant-ink", + "xq-dark", "xq-light" + ]; + + editormd.loadPlugins = {}; + + editormd.loadFiles = { + js : [], + css : [], + plugin : [] + }; + + /** + * 动态加载Editor.md插件,但不立即执行 + * Load editor.md plugins + * + * @param {String} fileName 插件文件路径 + * @param {Function} [callback=function()] 加载成功后执行的回调函数 + * @param {String} [into="head"] 嵌入页面的位置 + */ + + editormd.loadPlugin = function(fileName, callback, into) { + callback = callback || function() {}; + + this.loadScript(fileName, function() { + editormd.loadFiles.plugin.push(fileName); + callback(); + }, into); + }; + + /** + * 动态加载CSS文件的方法 + * Load css file method + * + * @param {String} fileName CSS文件名 + * @param {Function} [callback=function()] 加载成功后执行的回调函数 + * @param {String} [into="head"] 嵌入页面的位置 + */ + + editormd.loadCSS = function(fileName, callback, into) { + into = into || "head"; + callback = callback || function() {}; + + var css = document.createElement("link"); + css.type = "text/css"; + css.rel = "stylesheet"; + css.onload = css.onreadystatechange = function() { + editormd.loadFiles.css.push(fileName); + callback(); + }; + + css.href = fileName + ".css"; + + if(into === "head") { + document.getElementsByTagName("head")[0].appendChild(css); + } else { + document.body.appendChild(css); + } + }; + + editormd.isIE = (navigator.appName == "Microsoft Internet Explorer"); + editormd.isIE8 = (editormd.isIE && navigator.appVersion.match(/8./i) == "8."); + + /** + * 动态加载JS文件的方法 + * Load javascript file method + * + * @param {String} fileName JS文件名 + * @param {Function} [callback=function()] 加载成功后执行的回调函数 + * @param {String} [into="head"] 嵌入页面的位置 + */ + + editormd.loadScript = function(fileName, callback, into) { + + into = into || "head"; + callback = callback || function() {}; + + var script = null; + script = document.createElement("script"); + script.id = fileName.replace(/[\./]+/g, "-"); + script.type = "text/javascript"; + script.src = fileName + ".js"; + + if (editormd.isIE8) + { + script.onreadystatechange = function() { + if(script.readyState) + { + if (script.readyState === "loaded" || script.readyState === "complete") + { + script.onreadystatechange = null; + editormd.loadFiles.js.push(fileName); + callback(); + } + } + }; + } + else + { + script.onload = function() { + editormd.loadFiles.js.push(fileName); + callback(); + }; + } + + if (into === "head") { + document.getElementsByTagName("head")[0].appendChild(script); + } else { + document.body.appendChild(script); + } + }; + + // 使用国外的CDN,加载速度有时会很慢,或者自定义URL + // You can custom KaTeX load url. + editormd.katexURL = { + //css : "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min", + css : "/static/katex/katex.min.css", + //js : "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min" + js : "/static/katex/katex.min.js", + }; + + editormd.kaTeXLoaded = false; + + /** + * 加载KaTeX文件 + * load KaTeX files + * + * @param {Function} [callback=function()] 加载成功后执行的回调函数 + */ + + editormd.loadKaTeX = function (callback) { + editormd.loadCSS(editormd.katexURL.css, function(){ + editormd.loadScript(editormd.katexURL.js, callback || function(){}); + }); + }; + + /** + * 锁屏 + * lock screen + * + * @param {Boolean} lock Boolean 布尔值,是否锁屏 + * @returns {void} + */ + + editormd.lockScreen = function(lock) { + $("html,body").css("overflow", (lock) ? "hidden" : ""); + }; + + /** + * 动态创建对话框 + * Creating custom dialogs + * + * @param {Object} options 配置项键值对 Key/Value + * @returns {dialog} 返回创建的dialog的jQuery实例对象 + */ + + editormd.createDialog = function(options) { + var defaults = { + name : "", + width : 420, + height: 240, + title : "", + drag : true, + closed : true, + content : "", + mask : true, + maskStyle : { + backgroundColor : "#fff", + opacity : 0.1 + }, + lockScreen : true, + footer : true, + buttons : false + }; + + options = $.extend(true, defaults, options); + + var $this = this; + var editor = this.editor; + var classPrefix = editormd.classPrefix; + var guid = (new Date()).getTime(); + var dialogName = ( (options.name === "") ? classPrefix + "dialog-" + guid : options.name); + var mouseOrTouch = editormd.mouseOrTouch; + + var html = "
                "; + + if (options.title !== "") + { + html += "
                "; + html += "" + options.title + ""; + html += "
                "; + } + + if (options.closed) + { + html += ""; + } + + html += "
                " + options.content; + + if (options.footer || typeof options.footer === "string") + { + html += "
                " + ( (typeof options.footer === "boolean") ? "" : options.footer) + "
                "; + } + + html += "
                "; + + html += "
                "; + html += "
                "; + html += "
                "; + + editor.append(html); + + var dialog = editor.find("." + dialogName); + + dialog.lockScreen = function(lock) { + if (options.lockScreen) + { + $("html,body").css("overflow", (lock) ? "hidden" : ""); + $this.resize(); + } + + return dialog; + }; + + dialog.showMask = function() { + if (options.mask) + { + editor.find("." + classPrefix + "mask").css(options.maskStyle).css("z-index", editormd.dialogZindex - 1).show(); + } + return dialog; + }; + + dialog.hideMask = function() { + if (options.mask) + { + editor.find("." + classPrefix + "mask").hide(); + } + + return dialog; + }; + + dialog.loading = function(show) { + var loading = dialog.find("." + classPrefix + "dialog-mask"); + loading[(show) ? "show" : "hide"](); + + return dialog; + }; + + dialog.lockScreen(true).showMask(); + + dialog.show().css({ + zIndex : editormd.dialogZindex, + border : (editormd.isIE8) ? "1px solid #ddd" : "", + width : (typeof options.width === "number") ? options.width + "px" : options.width, + height : (typeof options.height === "number") ? options.height + "px" : options.height + }); + + var dialogPosition = function(){ + dialog.css({ + top : ($(window).height() - dialog.height()) / 2 + "px", + left : ($(window).width() - dialog.width()) / 2 + "px" + }); + }; + + dialogPosition(); + + $(window).resize(dialogPosition); + + dialog.children("." + classPrefix + "dialog-close").bind(mouseOrTouch("click", "touchend"), function() { + dialog.hide().lockScreen(false).hideMask(); + }); + + if (typeof options.buttons === "object") + { + var footer = dialog.footer = dialog.find("." + classPrefix + "dialog-footer"); + + for (var key in options.buttons) + { + var btn = options.buttons[key]; + var btnClassName = classPrefix + key + "-btn"; + + footer.append(""); + btn[1] = $.proxy(btn[1], dialog); + footer.children("." + btnClassName).bind(mouseOrTouch("click", "touchend"), btn[1]); + } + } + + if (options.title !== "" && options.drag) + { + var posX, posY; + var dialogHeader = dialog.children("." + classPrefix + "dialog-header"); + + if (!options.mask) { + dialogHeader.bind(mouseOrTouch("click", "touchend"), function(){ + editormd.dialogZindex += 2; + dialog.css("z-index", editormd.dialogZindex); + }); + } + + dialogHeader.mousedown(function(e) { + e = e || window.event; //IE + posX = e.clientX - parseInt(dialog[0].style.left); + posY = e.clientY - parseInt(dialog[0].style.top); + + document.onmousemove = moveAction; + }); + + var userCanSelect = function (obj) { + obj.removeClass(classPrefix + "user-unselect").off("selectstart"); + }; + + var userUnselect = function (obj) { + obj.addClass(classPrefix + "user-unselect").on("selectstart", function(event) { // selectstart for IE + return false; + }); + }; + + var moveAction = function (e) { + e = e || window.event; //IE + + var left, top, nowLeft = parseInt(dialog[0].style.left), nowTop = parseInt(dialog[0].style.top); + + if( nowLeft >= 0 ) { + if( nowLeft + dialog.width() <= $(window).width()) { + left = e.clientX - posX; + } else { + left = $(window).width() - dialog.width(); + document.onmousemove = null; + } + } else { + left = 0; + document.onmousemove = null; + } + + if( nowTop >= 0 ) { + top = e.clientY - posY; + } else { + top = 0; + document.onmousemove = null; + } + + + document.onselectstart = function() { + return false; + }; + + userUnselect($("body")); + userUnselect(dialog); + dialog[0].style.left = left + "px"; + dialog[0].style.top = top + "px"; + }; + + document.onmouseup = function() { + userCanSelect($("body")); + userCanSelect(dialog); + + document.onselectstart = null; + document.onmousemove = null; + }; + + dialogHeader.touchDraggable = function() { + var offset = null; + var start = function(e) { + var orig = e.originalEvent; + var pos = $(this).parent().position(); + + offset = { + x : orig.changedTouches[0].pageX - pos.left, + y : orig.changedTouches[0].pageY - pos.top + }; + }; + + var move = function(e) { + e.preventDefault(); + var orig = e.originalEvent; + + $(this).parent().css({ + top : orig.changedTouches[0].pageY - offset.y, + left : orig.changedTouches[0].pageX - offset.x + }); + }; + + this.bind("touchstart", start).bind("touchmove", move); + }; + + dialogHeader.touchDraggable(); + } + + editormd.dialogZindex += 2; + + return dialog; + }; + + /** + * 鼠标和触摸事件的判断/选择方法 + * MouseEvent or TouchEvent type switch + * + * @param {String} [mouseEventType="click"] 供选择的鼠标事件 + * @param {String} [touchEventType="touchend"] 供选择的触摸事件 + * @returns {String} EventType 返回事件类型名称 + */ + + editormd.mouseOrTouch = function(mouseEventType, touchEventType) { + mouseEventType = mouseEventType || "click"; + touchEventType = touchEventType || "touchend"; + + var eventType = mouseEventType; + + try { + document.createEvent("TouchEvent"); + eventType = touchEventType; + } catch(e) {} + + return eventType; + }; + + /** + * 日期时间的格式化方法 + * Datetime format method + * + * @param {String} [format=""] 日期时间的格式,类似PHP的格式 + * @returns {String} datefmt 返回格式化后的日期时间字符串 + */ + + editormd.dateFormat = function(format) { + format = format || ""; + + var addZero = function(d) { + return (d < 10) ? "0" + d : d; + }; + + var date = new Date(); + var year = date.getFullYear(); + var year2 = year.toString().slice(2, 4); + var month = addZero(date.getMonth() + 1); + var day = addZero(date.getDate()); + var weekDay = date.getDay(); + var hour = addZero(date.getHours()); + var min = addZero(date.getMinutes()); + var second = addZero(date.getSeconds()); + var ms = addZero(date.getMilliseconds()); + var datefmt = ""; + + var ymd = year2 + "-" + month + "-" + day; + var fymd = year + "-" + month + "-" + day; + var hms = hour + ":" + min + ":" + second; + + switch (format) + { + case "UNIX Time" : + datefmt = date.getTime(); + break; + + case "UTC" : + datefmt = date.toUTCString(); + break; + + case "yy" : + datefmt = year2; + break; + + case "year" : + case "yyyy" : + datefmt = year; + break; + + case "month" : + case "mm" : + datefmt = month; + break; + + case "cn-week-day" : + case "cn-wd" : + var cnWeekDays = ["日", "一", "二", "三", "四", "五", "六"]; + datefmt = "星期" + cnWeekDays[weekDay]; + break; + + case "week-day" : + case "wd" : + var weekDays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; + datefmt = weekDays[weekDay]; + break; + + case "day" : + case "dd" : + datefmt = day; + break; + + case "hour" : + case "hh" : + datefmt = hour; + break; + + case "min" : + case "ii" : + datefmt = min; + break; + + case "second" : + case "ss" : + datefmt = second; + break; + + case "ms" : + datefmt = ms; + break; + + case "yy-mm-dd" : + datefmt = ymd; + break; + + case "yyyy-mm-dd" : + datefmt = fymd; + break; + + case "yyyy-mm-dd h:i:s ms" : + case "full + ms" : + datefmt = fymd + " " + hms + " " + ms; + break; + + case "full" : + case "yyyy-mm-dd h:i:s" : + default: + datefmt = fymd + " " + hms; + break; + } + + return datefmt; + }; + + return editormd; + +})); diff --git a/static/editor.md/editormd.min.js b/static/editor.md/editormd.min.js new file mode 100644 index 0000000..0d9f0ce --- /dev/null +++ b/static/editor.md/editormd.min.js @@ -0,0 +1,3 @@ +/*! Editor.md v1.5.0 | editormd.min.js | Open source online markdown editor. | MIT License | By: Pandao | https://github.com/pandao/editor.md | 2015-06-09 */ +!function(e){"use strict";"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=e:"function"==typeof define?define.amd||define(["jquery"],e):window.editormd=e()}(function(){"use strict";var e="undefined"!=typeof jQuery?jQuery:Zepto;if("undefined"!=typeof e){var t=function(e,i){return new t.fn.init(e,i)};t.title=t.$name="Editor.md",t.version="1.5.0",t.homePage="https://pandao.github.io/editor.md/",t.classPrefix="editormd-",t.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],mini:["undo","redo","|","watch","preview","|","help","info"]},t.defaults={mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:"",appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",delay:300,autoLoadModules:!0,watch:!0,placeholder:"Enjoy Markdown! coding now...",gotoLine:!0,codeFold:!1,autoHeight:!1,autoFocus:!0,autoCloseTags:!0,searchReplace:!0,syncScrolling:!0,readOnly:!1,tabSize:4,indentUnit:4,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,showTrailingSpace:!0,matchBrackets:!0,indentWithTabs:!0,styleSelectedText:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:!1,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",toc:!0,tocm:!1,tocTitle:"",tocDropdown:!1,tocContainer:"",tocStartLevel:1,htmlDecode:!1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0,toolbar:!0,toolbarAutoFixed:!0,toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return t.toolbarHandlers.ucwords},lowercase:function(){return t.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'a',ucwords:'Aa'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",h1:t.classPrefix+"bold",h2:t.classPrefix+"bold",h3:t.classPrefix+"bold",h4:t.classPrefix+"bold",h5:t.classPrefix+"bold",h6:t.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",info:"fa-info-circle"},toolbarIconTexts:{},lang:{name:"zh-cn",description:"开源在线Markdown编辑器
                Open source online Markdown editor.",tocTitle:"目录",toolbar:{undo:"撤销(Ctrl+Z)",redo:"重做(Ctrl+Y)",bold:"粗体",del:"删除线",italic:"斜体",quote:"引用",ucwords:"将每个单词首字母转成大写",uppercase:"将所选转换成大写",lowercase:"将所选转换成小写",h1:"标题1",h2:"标题2",h3:"标题3",h4:"标题4",h5:"标题5",h6:"标题6","list-ul":"无序列表","list-ol":"有序列表",hr:"横线",link:"链接","reference-link":"引用链接",image:"添加图片",code:"行内代码","preformatted-text":"预格式文本 / 代码块(缩进风格)","code-block":"代码块(多语言风格)",table:"添加表格",datetime:"日期时间",emoji:"Emoji表情","html-entities":"HTML实体字符",pagebreak:"插入分页符","goto-line":"跳转到行",watch:"关闭实时预览",unwatch:"开启实时预览",preview:"全窗口预览HTML(按 Shift + ESC还原)",fullscreen:"全屏(按ESC还原)",clear:"清空",search:"搜索",help:"使用帮助",info:"关于"+t.title},buttons:{enter:"确定",cancel:"取消",close:"关闭"},dialog:{link:{title:"添加链接",url:"链接地址",urlTitle:"链接标题",urlEmpty:"错误:请填写链接地址。"},referenceLink:{title:"添加引用链接",name:"引用名称",url:"链接地址",urlId:"链接ID",urlTitle:"链接标题",nameEmpty:"错误:引用链接的名称不能为空。",idEmpty:"错误:请填写引用链接的ID。",urlEmpty:"错误:请填写引用链接的URL地址。"},image:{title:"添加图片",url:"图片地址",link:"图片链接",alt:"图片描述",uploadButton:"本地上传",imageURLEmpty:"错误:图片地址不能为空。",uploadFileEmpty:"错误:上传的图片不能为空。",formatNotAllowed:"错误:只允许上传图片文件,允许上传的图片文件格式有:"},preformattedText:{title:"添加预格式文本或代码块",emptyAlert:"错误:请填写预格式文本或代码的内容。"},codeBlock:{title:"添加代码块",selectLabel:"代码语言:",selectDefaultText:"请选择代码语言",otherLanguage:"其他语言",unselectedLanguageAlert:"错误:请选择代码所属的语言类型。",codeEmptyAlert:"错误:请填写代码内容。"},htmlEntities:{title:"HTML 实体字符"},help:{title:"使用帮助"}}}},t.classNames={tex:t.classPrefix+"tex"},t.dialogZindex=99999,t.$katex=null,t.$marked=null,t.$CodeMirror=null,t.$prettyPrint=null;var i,o;t.prototype=t.fn={state:{watching:!1,loaded:!1,preview:!1,fullscreen:!1},init:function(i,o){o=o||{},"object"==typeof i&&(o=i);var r=this.classPrefix=t.classPrefix,n=this.settings=e.extend(!0,t.defaults,o);i="object"==typeof i?n.id:i;var a=this.editor=e("#"+i);this.id=i,this.lang=n.lang;var s=this.classNames={textarea:{html:r+"html-textarea",markdown:r+"markdown-textarea"}};n.pluginPath=""===n.pluginPath?n.path+"../plugins/":n.pluginPath,this.state.watching=n.watch?!0:!1,a.hasClass("editormd")||a.addClass("editormd"),a.css({width:"number"==typeof n.width?n.width+"px":n.width,height:"number"==typeof n.height?n.height+"px":n.height}),n.autoHeight&&a.css("height","auto");var l=this.markdownTextarea=a.children("textarea");l.length<1&&(a.append(""),l=this.markdownTextarea=a.children("textarea")),l.addClass(s.textarea.markdown).attr("placeholder",n.placeholder),("undefined"==typeof l.attr("name")||""===l.attr("name"))&&l.attr("name",""!==n.name?n.name:i+"-markdown-doc");var c=[n.readOnly?"":'',n.saveHTMLToTextarea?'':"",'
                ','
                ','
                '].join("\n");return a.append(c).addClass(r+"vertical"),""!==n.theme&&a.addClass(r+"theme-"+n.theme),this.mask=a.children("."+r+"mask"),this.containerMask=a.children("."+r+"container-mask"),""!==n.markdown&&l.val(n.markdown),""!==n.appendMarkdown&&l.val(l.val()+n.appendMarkdown),this.htmlTextarea=a.children("."+s.textarea.html),this.preview=a.children("."+r+"preview"),this.previewContainer=this.preview.children("."+r+"preview-container"),""!==n.previewTheme&&this.preview.addClass(r+"preview-theme-"+n.previewTheme),"function"==typeof define&&define.amd&&("undefined"!=typeof katex&&(t.$katex=katex),n.searchReplace&&!n.readOnly&&(t.loadCSS(n.path+"codemirror/addon/dialog/dialog"),t.loadCSS(n.path+"codemirror/addon/search/matchesonscrollbar"))),"function"==typeof define&&define.amd||!n.autoLoadModules?("undefined"!=typeof CodeMirror&&(t.$CodeMirror=CodeMirror),"undefined"!=typeof marked&&(t.$marked=marked),this.setCodeMirror().setToolbar().loadedDisplay()):this.loadQueues(),this},loadQueues:function(){var e=this,i=this.settings,o=i.path,r=function(){return t.isIE8?void e.loadedDisplay():void(i.flowChart||i.sequenceDiagram?t.loadScript(o+"raphael.min",function(){t.loadScript(o+"underscore.min",function(){!i.flowChart&&i.sequenceDiagram?t.loadScript(o+"sequence-diagram.min",function(){e.loadedDisplay()}):i.flowChart&&!i.sequenceDiagram?t.loadScript(o+"flowchart.min",function(){t.loadScript(o+"jquery.flowchart.min",function(){e.loadedDisplay()})}):i.flowChart&&i.sequenceDiagram&&t.loadScript(o+"flowchart.min",function(){t.loadScript(o+"jquery.flowchart.min",function(){t.loadScript(o+"sequence-diagram.min",function(){e.loadedDisplay()})})})})}):e.loadedDisplay())};return t.loadCSS(o+"codemirror/codemirror.min"),i.searchReplace&&!i.readOnly&&(t.loadCSS(o+"codemirror/addon/dialog/dialog"),t.loadCSS(o+"codemirror/addon/search/matchesonscrollbar")),i.codeFold&&t.loadCSS(o+"codemirror/addon/fold/foldgutter"),t.loadScript(o+"codemirror/codemirror.min",function(){t.$CodeMirror=CodeMirror,t.loadScript(o+"codemirror/modes.min",function(){t.loadScript(o+"codemirror/addons.min",function(){return e.setCodeMirror(),"gfm"!==i.mode&&"markdown"!==i.mode?(e.loadedDisplay(),!1):(e.setToolbar(),void t.loadScript(o+"marked.min",function(){t.$marked=marked,i.previewCodeHighlight?t.loadScript(o+"prettify.min",function(){r()}):r()}))})})}),this},setTheme:function(e){var t=this.editor,i=this.settings.theme,o=this.classPrefix+"theme-";return t.removeClass(o+i).addClass(o+e),this.settings.theme=e,this},setEditorTheme:function(e){var i=this.settings;return i.editorTheme=e,"default"!==e&&t.loadCSS(i.path+"codemirror/theme/"+i.editorTheme),this.cm.setOption("theme",e),this},setCodeMirrorTheme:function(e){return this.setEditorTheme(e),this},setPreviewTheme:function(e){var t=this.preview,i=this.settings.previewTheme,o=this.classPrefix+"preview-theme-";return t.removeClass(o+i).addClass(o+e),this.settings.previewTheme=e,this},setCodeMirror:function(){var e=this.settings,i=this.editor;"default"!==e.editorTheme&&t.loadCSS(e.path+"codemirror/theme/"+e.editorTheme);var o={mode:e.mode,theme:e.editorTheme,tabSize:e.tabSize,dragDrop:!1,autofocus:e.autoFocus,autoCloseTags:e.autoCloseTags,readOnly:e.readOnly?"nocursor":!1,indentUnit:e.indentUnit,lineNumbers:e.lineNumbers,lineWrapping:e.lineWrapping,extraKeys:{"Ctrl-Q":function(e){e.foldCode(e.getCursor())}},foldGutter:e.codeFold,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:e.matchBrackets,indentWithTabs:e.indentWithTabs,styleActiveLine:e.styleActiveLine,styleSelectedText:e.styleSelectedText,autoCloseBrackets:e.autoCloseBrackets,showTrailingSpace:e.showTrailingSpace,highlightSelectionMatches:e.matchWordHighlight?{showToken:"onselected"===e.matchWordHighlight?!1:/\w/}:!1};return this.codeEditor=this.cm=t.$CodeMirror.fromTextArea(this.markdownTextarea[0],o),this.codeMirror=this.cmElement=i.children(".CodeMirror"),""!==e.value&&this.cm.setValue(e.value),this.codeMirror.css({fontSize:e.fontSize,width:e.watch?"50%":"100%"}),e.autoHeight&&(this.codeMirror.css("height","auto"),this.cm.setOption("viewportMargin",1/0)),e.lineNumbers||this.codeMirror.find(".CodeMirror-gutters").css("border-right","none"),this},getCodeMirrorOption:function(e){return this.cm.getOption(e)},setCodeMirrorOption:function(e,t){return this.cm.setOption(e,t),this},addKeyMap:function(e,t){return this.cm.addKeyMap(e,t),this},removeKeyMap:function(e){return this.cm.removeKeyMap(e),this},gotoLine:function(t){var i=this.settings;if(!i.gotoLine)return this;var o=this.cm,r=(this.editor,o.lineCount()),n=this.preview;if("string"==typeof t&&("last"===t&&(t=r),"first"===t&&(t=1)),"number"!=typeof t)return alert("Error: The line number must be an integer."),this;if(t=parseInt(t)-1,t>r)return alert("Error: The line number range 1-"+r),this;o.setCursor({line:t,ch:0});var a=o.getScrollInfo(),s=a.clientHeight,l=o.charCoords({line:t,ch:0},"local");if(o.scrollTo(null,(l.top+l.bottom-s)/2),i.watch){var c=this.codeMirror.find(".CodeMirror-scroll")[0],h=e(c).height(),d=c.scrollTop,u=d/c.scrollHeight;n.scrollTop(0===d?0:d+h>=c.scrollHeight-16?n[0].scrollHeight:n[0].scrollHeight*u)}return o.focus(),this},extend:function(){return"undefined"!=typeof arguments[1]&&("function"==typeof arguments[1]&&(arguments[1]=e.proxy(arguments[1],this)),this[arguments[0]]=arguments[1]),"object"==typeof arguments[0]&&"undefined"==typeof arguments[0].length&&e.extend(!0,this,arguments[0]),this},set:function(t,i){return"undefined"!=typeof i&&"function"==typeof i&&(i=e.proxy(i,this)),this[t]=i,this},config:function(t,i){var o=this.settings;return"object"==typeof t&&(o=e.extend(!0,o,t)),"string"==typeof t&&(o[t]=i),this.settings=o,this.recreate(),this},on:function(t,i){var o=this.settings;return"undefined"!=typeof o["on"+t]&&(o["on"+t]=e.proxy(i,this)),this},off:function(e){var t=this.settings;return"undefined"!=typeof t["on"+e]&&(t["on"+e]=function(){}),this},showToolbar:function(t){var i=this.settings;return i.readOnly?this:(i.toolbar&&(this.toolbar.length<1||""===this.toolbar.find("."+this.classPrefix+"menu").html())&&this.setToolbar(),i.toolbar=!0,this.toolbar.show(),this.resize(),e.proxy(t||function(){},this)(),this)},hideToolbar:function(t){var i=this.settings;return i.toolbar=!1,this.toolbar.hide(),this.resize(),e.proxy(t||function(){},this)(),this},setToolbarAutoFixed:function(t){var i=this.state,o=this.editor,r=this.toolbar,n=this.settings;"undefined"!=typeof t&&(n.toolbarAutoFixed=t);var a=function(){var t=e(window),i=t.scrollTop();return n.toolbarAutoFixed?void r.css(i-o.offset().top>10&&i
                  ';i.append(n),r=this.toolbar=i.children("."+o+"toolbar")}if(!e.toolbar)return r.hide(),this;r.show();for(var a="function"==typeof e.toolbarIcons?e.toolbarIcons():"string"==typeof e.toolbarIcons?t.toolbarModes[e.toolbarIcons]:e.toolbarIcons,s=r.find("."+this.classPrefix+"menu"),l="",c=!1,h=0,d=a.length;d>h;h++){var u=a[h];if("||"===u)c=!0;else if("|"===u)l+='
                • |
                • ';else{var f=/h(\d)/.test(u),g=u;"watch"!==u||e.watch||(g="unwatch");var p=e.lang.toolbar[g],m=e.toolbarIconTexts[g],w=e.toolbarIconsClass[g];p="undefined"==typeof p?"":p,m="undefined"==typeof m?"":m,w="undefined"==typeof w?"":w;var v=c?'
                • ':"
                • ";"undefined"!=typeof e.toolbarCustomIcons[u]&&"function"!=typeof e.toolbarCustomIcons[u]?v+=e.toolbarCustomIcons[u]:(v+='',v+=''+(f?u.toUpperCase():""===w?m:"")+"",v+=""),v+="
                • ",l=c?v+l:l+v}}return s.html(l),s.find('[title="Lowercase"]').attr("title",e.lang.toolbar.lowercase),s.find('[title="ucwords"]').attr("title",e.lang.toolbar.ucwords),this.setToolbarHandler(),this.setToolbarAutoFixed(),this},dialogLockScreen:function(){return e.proxy(t.dialogLockScreen,this)(),this},dialogShowMask:function(i){return e.proxy(t.dialogShowMask,this)(i),this},getToolbarHandles:function(e){var i=this.toolbarHandlers=t.toolbarHandlers;return e&&"undefined"!=typeof toolbarIconHandlers[e]?i[e]:i},setToolbarHandler:function(){var i=this,o=this.settings;if(!o.toolbar||o.readOnly)return this;var r=this.toolbar,n=this.cm,a=this.classPrefix,s=this.toolbarIcons=r.find("."+a+"menu > li > a"),l=this.getToolbarHandles();return s.bind(t.mouseOrTouch("click","touchend"),function(t){var r=e(this).children(".fa"),a=r.attr("name"),s=n.getCursor(),c=n.getSelection();return""!==a?(i.activeIcon=r,"undefined"!=typeof l[a]?e.proxy(l[a],i)(n):"undefined"!=typeof o.toolbarHandlers[a]&&e.proxy(o.toolbarHandlers[a],i)(n,r,s,c),"link"!==a&&"reference-link"!==a&&"image"!==a&&"code-block"!==a&&"preformatted-text"!==a&&"watch"!==a&&"preview"!==a&&"search"!==a&&"fullscreen"!==a&&"info"!==a&&n.focus(),!1):void 0}),this},createDialog:function(i){return e.proxy(t.createDialog,this)(i)},createInfoDialog:function(){var e=this,i=this.editor,o=this.classPrefix,r=['
                  ','
                  ','

                  '+t.title+"v"+t.version+"

                  ","

                  "+this.lang.description+"

                  ",'

                  '+t.homePage+'

                  ','

                  Copyright © 2015 Pandao, The MIT License.

                  ',"
                  ",'',"
                  "].join("\n");i.append(r);var n=this.infoDialog=i.children("."+o+"dialog-info");return n.find("."+o+"dialog-close").bind(t.mouseOrTouch("click","touchend"),function(){e.hideInfoDialog()}),n.css("border",t.isIE8?"1px solid #ddd":"").css("z-index",t.dialogZindex).show(),this.infoDialogPosition(),this},infoDialogPosition:function(){var t=this.infoDialog,i=function(){t.css({top:(e(window).height()-t.height())/2+"px",left:(e(window).width()-t.width())/2+"px"})};return i(),e(window).resize(i),this},showInfoDialog:function(){e("html,body").css("overflow-x","hidden");var i=this.editor,o=this.settings,r=this.infoDialog=i.children("."+this.classPrefix+"dialog-info");return r.length<1&&this.createInfoDialog(),this.lockScreen(!0),this.mask.css({opacity:o.dialogMaskOpacity,backgroundColor:o.dialogMaskBgColor}).show(),r.css("z-index",t.dialogZindex).show(),this.infoDialogPosition(),this},hideInfoDialog:function(){return e("html,body").css("overflow-x",""),this.infoDialog.hide(),this.mask.hide(),this.lockScreen(!1),this},lockScreen:function(e){return t.lockScreen(e),this.resize(),this},recreate:function(){var e=this.editor,t=this.settings;return this.codeMirror.remove(),this.setCodeMirror(),t.readOnly||(e.find(".editormd-dialog").length>0&&e.find(".editormd-dialog").remove(),t.toolbar&&(this.getToolbarHandles(),this.setToolbar())),this.loadedDisplay(!0),this},previewCodeHighlight:function(){var e=this.settings,t=this.previewContainer;return e.previewCodeHighlight&&(t.find("pre").addClass("prettyprint linenums"),"undefined"!=typeof prettyPrint&&prettyPrint()),this},katexRender:function(){return null===i?this:(this.previewContainer.find("."+t.classNames.tex).each(function(){var i=e(this);t.$katex.render(i.text(),i[0]),i.find(".katex").css("font-size","1.6em")}),this)},flowChartAndSequenceDiagramRender:function(){var i=this,r=this.settings,n=this.previewContainer;if(t.isIE8)return this;if(r.flowChart){if(null===o)return this;n.find(".flowchart").flowChart()}r.sequenceDiagram&&n.find(".sequence-diagram").sequenceDiagram({theme:"simple"});var a=i.preview,s=i.codeMirror,l=s.find(".CodeMirror-scroll"),c=l.height(),h=l.scrollTop(),d=h/l[0].scrollHeight,u=0;a.find(".markdown-toc-list").each(function(){u+=e(this).height()});var f=a.find(".editormd-toc-menu").height();return f=f?f:0,a.scrollTop(0===h?0:h+c>=l[0].scrollHeight-16?a[0].scrollHeight:(a[0].scrollHeight+u+f)*d),this},registerKeyMaps:function(i){var o=this,r=this.cm,n=this.settings,a=t.toolbarHandlers,s=n.disabledKeyMaps;if(i=i||null){for(var l in i)if(e.inArray(l,s)<0){var c={};c[l]=i[l],r.addKeyMap(i)}}else{for(var h in t.keyMaps){var d=t.keyMaps[h],u="string"==typeof d?e.proxy(a[d],o):e.proxy(d,o);if(e.inArray(h,["F9","F10","F11"])<0&&e.inArray(h,s)<0){var f={};f[h]=u,r.addKeyMap(f)}}e(window).keydown(function(t){var i={120:"F9",121:"F10",122:"F11"};if(e.inArray(i[t.keyCode],s)<0)switch(t.keyCode){case 120:return e.proxy(a.watch,o)(),!1;case 121:return e.proxy(a.preview,o)(),!1;case 122:return e.proxy(a.fullscreen,o)(),!1}})}return this},bindScrollEvent:function(){var i=this,o=this.preview,r=this.settings,n=this.codeMirror,a=t.mouseOrTouch;if(!r.syncScrolling)return this;var s=function(){n.find(".CodeMirror-scroll").bind(a("scroll","touchmove"),function(t){var n=e(this).height(),a=e(this).scrollTop(),s=a/e(this)[0].scrollHeight,l=0;o.find(".markdown-toc-list").each(function(){l+=e(this).height()});var c=o.find(".editormd-toc-menu").height();c=c?c:0,o.scrollTop(0===a?0:a+n>=e(this)[0].scrollHeight-16?o[0].scrollHeight:(o[0].scrollHeight+l+c)*s),e.proxy(r.onscroll,i)(t)})},l=function(){n.find(".CodeMirror-scroll").unbind(a("scroll","touchmove"))},c=function(){o.bind(a("scroll","touchmove"),function(t){var o=e(this).height(),a=e(this).scrollTop(),s=a/e(this)[0].scrollHeight,l=n.find(".CodeMirror-scroll");l.scrollTop(0===a?0:a+o>=e(this)[0].scrollHeight?l[0].scrollHeight:l[0].scrollHeight*s),e.proxy(r.onpreviewscroll,i)(t)})},h=function(){o.unbind(a("scroll","touchmove"))};return n.bind({mouseover:s,mouseout:l,touchstart:s,touchend:l}),"single"===r.syncScrolling?this:(o.bind({mouseover:c,mouseout:h,touchstart:c,touchend:h}),this)},bindChangeEvent:function(){var e=this,t=this.cm,o=this.settings;return o.syncScrolling?(t.on("change",function(t,r){o.watch&&e.previewContainer.css("padding",o.autoHeight?"20px 20px 50px 40px":"20px"),i=setTimeout(function(){clearTimeout(i),e.save(),i=null},o.delay)}),this):this},loadedDisplay:function(t){t=t||!1;var i=this,o=this.editor,r=this.preview,n=this.settings;return this.containerMask.hide(),this.save(),n.watch&&r.show(),o.data("oldWidth",o.width()).data("oldHeight",o.height()),this.resize(),this.registerKeyMaps(),e(window).resize(function(){i.resize()}),this.bindScrollEvent().bindChangeEvent(),t||e.proxy(n.onload,this)(),this.state.loaded=!0,this},width:function(e){return this.editor.css("width","number"==typeof e?e+"px":e),this.resize(),this},height:function(e){return this.editor.css("height","number"==typeof e?e+"px":e),this.resize(),this},resize:function(t,i){t=t||null,i=i||null;var o=this.state,r=this.editor,n=this.preview,a=this.toolbar,s=this.settings,l=this.codeMirror;if(t&&r.css("width","number"==typeof t?t+"px":t),!s.autoHeight||o.fullscreen||o.preview?(i&&r.css("height","number"==typeof i?i+"px":i),o.fullscreen&&r.height(e(window).height()),s.toolbar&&!s.readOnly?l.css("margin-top",a.height()+1).height(r.height()-a.height()):l.css("margin-top",0).height(r.height())):(r.css("height","auto"),l.css("height","auto")),s.watch)if(l.width(r.width()/2),n.width(o.preview?r.width():r.width()/2),this.previewContainer.css("padding",s.autoHeight?"20px 20px 50px 40px":"20px"),s.toolbar&&!s.readOnly?n.css("top",a.height()+1):n.css("top",0),!s.autoHeight||o.fullscreen||o.preview){var c=s.toolbar&&!s.readOnly?r.height()-a.height():r.height();n.height(c)}else n.height("");else l.width(r.width()),n.hide();return o.loaded&&e.proxy(s.onresize,this)(),this},save:function(){if(null===i)return this;var r=this,n=this.state,a=this.settings,s=this.cm,l=s.getValue(),c=this.previewContainer;if("gfm"!==a.mode&&"markdown"!==a.mode)return this.markdownTextarea.val(l),this;var h=t.$marked,d=this.markdownToC=[],u=this.markedRendererOptions={toc:a.toc,tocm:a.tocm,tocStartLevel:a.tocStartLevel,pageBreak:a.pageBreak,taskList:a.taskList,emoji:a.emoji,tex:a.tex,atLink:a.atLink,emailLink:a.emailLink,flowChart:a.flowChart,sequenceDiagram:a.sequenceDiagram,previewCodeHighlight:a.previewCodeHighlight},f=this.markedOptions={renderer:t.markedRenderer(d,u),gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:a.htmlDecode?!1:!0,smartLists:!0,smartypants:!0};h.setOptions(f);var g=t.$marked(l,f);if(g=t.filterHTMLTags(g,a.htmlDecode),this.markdownTextarea.text(l),s.save(),a.saveHTMLToTextarea&&this.htmlTextarea.text(g),a.watch||!a.watch&&n.preview){if(c.html(g),this.previewCodeHighlight(),a.toc){var p=""===a.tocContainer?c:e(a.tocContainer),m=p.find("."+this.classPrefix+"toc-menu");p.attr("previewContainer",""===a.tocContainer?"true":"false"),""!==a.tocContainer&&m.length>0&&m.remove(),t.markdownToCRenderer(d,p,a.tocDropdown,a.tocStartLevel),(a.tocDropdown||p.find("."+this.classPrefix+"toc-menu").length>0)&&t.tocDropdownMenu(p,""!==a.tocTitle?a.tocTitle:this.lang.tocTitle),""!==a.tocContainer&&c.find(".markdown-toc").css("border","none")}a.tex&&(!t.kaTeXLoaded&&a.autoLoadModules?t.loadKaTeX(function(){t.$katex=katex,t.kaTeXLoaded=!0,r.katexRender()}):(t.$katex=katex,this.katexRender())),(a.flowChart||a.sequenceDiagram)&&(o=setTimeout(function(){clearTimeout(o),r.flowChartAndSequenceDiagramRender(),o=null},10)),n.loaded&&e.proxy(a.onchange,this)()}return this},focus:function(){return this.cm.focus(),this},setCursor:function(e){return this.cm.setCursor(e),this},getCursor:function(){return this.cm.getCursor()},setSelection:function(e,t){return this.cm.setSelection(e,t),this},getSelection:function(){return this.cm.getSelection()},setSelections:function(e){return this.cm.setSelections(e),this},getSelections:function(){return this.cm.getSelections()},replaceSelection:function(e){return this.cm.replaceSelection(e),this},insertValue:function(e){return this.replaceSelection(e),this},appendMarkdown:function(e){var t=(this.settings,this.cm);return t.setValue(t.getValue()+e),this},setMarkdown:function(e){return this.cm.setValue(e||this.settings.markdown),this},getMarkdown:function(){return this.cm.getValue()},getValue:function(){return this.cm.getValue()},setValue:function(e){return this.cm.setValue(e),this},clear:function(){return this.cm.setValue(""),this},getHTML:function(){return this.settings.saveHTMLToTextarea?this.htmlTextarea.val():(alert("Error: settings.saveHTMLToTextarea == false"),!1)},getTextareaSavedHTML:function(){return this.getHTML()},getPreviewedHTML:function(){return this.settings.watch?this.previewContainer.html():(alert("Error: settings.watch == false"),!1)},watch:function(t){var o=this.settings;if(e.inArray(o.mode,["gfm","markdown"])<0)return this;if(this.state.watching=o.watch=!0,this.preview.show(),this.toolbar){var r=o.toolbarIconsClass.watch,n=o.toolbarIconsClass.unwatch,a=this.toolbar.find(".fa[name=watch]");a.parent().attr("title",o.lang.toolbar.watch),a.removeClass(n).addClass(r)}return this.codeMirror.css("border-right","1px solid #ddd").width(this.editor.width()/2),i=0,this.save().resize(),o.onwatch||(o.onwatch=t||function(){}),e.proxy(o.onwatch,this)(),this},unwatch:function(t){var i=this.settings;if(this.state.watching=i.watch=!1,this.preview.hide(),this.toolbar){var o=i.toolbarIconsClass.watch,r=i.toolbarIconsClass.unwatch,n=this.toolbar.find(".fa[name=watch]");n.parent().attr("title",i.lang.toolbar.unwatch),n.removeClass(o).addClass(r)}return this.codeMirror.css("border-right","none").width(this.editor.width()),this.resize(),i.onunwatch||(i.onunwatch=t||function(){}),e.proxy(i.onunwatch,this)(),this},show:function(t){t=t||function(){};var i=this;return this.editor.show(0,function(){e.proxy(t,i)()}),this},hide:function(t){t=t||function(){};var i=this;return this.editor.hide(0,function(){e.proxy(t,i)()}),this},previewing:function(){var i=this,o=this.editor,r=this.preview,n=this.toolbar,a=this.settings,s=this.codeMirror,l=this.previewContainer;if(e.inArray(a.mode,["gfm","markdown"])<0)return this;a.toolbar&&n&&(n.toggle(),n.find(".fa[name=preview]").toggleClass("active")),s.toggle();var c=function(e){e.shiftKey&&27===e.keyCode&&i.previewed()};"none"===s.css("display")?(this.state.preview=!0,this.state.fullscreen&&r.css("background","#fff"),o.find("."+this.classPrefix+"preview-close-btn").show().bind(t.mouseOrTouch("click","touchend"),function(){i.previewed()}),a.watch?l.css("padding",""):this.save(),l.addClass(this.classPrefix+"preview-active"),r.show().css({position:"",top:0,width:o.width(),height:a.autoHeight&&!this.state.fullscreen?"auto":o.height()}),this.state.loaded&&e.proxy(a.onpreviewing,this)(),e(window).bind("keyup",c)):(e(window).unbind("keyup",c),this.previewed())},previewed:function(){var i=this.editor,o=this.preview,r=this.toolbar,n=this.settings,a=this.previewContainer,s=i.find("."+this.classPrefix+"preview-close-btn");return this.state.preview=!1,this.codeMirror.show(),n.toolbar&&r.show(),o[n.watch?"show":"hide"](),s.hide().unbind(t.mouseOrTouch("click","touchend")),a.removeClass(this.classPrefix+"preview-active"),n.watch&&a.css("padding","20px"),o.css({background:null,position:"absolute",width:i.width()/2,height:n.autoHeight&&!this.state.fullscreen?"auto":i.height()-r.height(),top:n.toolbar?r.height():0}),this.state.loaded&&e.proxy(n.onpreviewed,this)(),this},fullscreen:function(){var t=this,i=this.state,o=this.editor,r=(this.preview,this.toolbar),n=this.settings,a=this.classPrefix+"fullscreen";r&&r.find(".fa[name=fullscreen]").parent().toggleClass("active");var s=function(e){e.shiftKey||27!==e.keyCode||i.fullscreen&&t.fullscreenExit()};return o.hasClass(a)?(e(window).unbind("keyup",s),this.fullscreenExit()):(i.fullscreen=!0,e("html,body").css("overflow","hidden"),o.css({width:e(window).width(),height:e(window).height()}).addClass(a),this.resize(),e.proxy(n.onfullscreen,this)(),e(window).bind("keyup",s)),this},fullscreenExit:function(){var t=this.editor,i=this.settings,o=this.toolbar,r=this.classPrefix+"fullscreen";return this.state.fullscreen=!1,o&&o.find(".fa[name=fullscreen]").parent().removeClass("active"),e("html,body").css("overflow",""),t.css({width:t.data("oldWidth"),height:t.data("oldHeight")}).removeClass(r),this.resize(),e.proxy(i.onfullscreenExit,this)(),this},executePlugin:function(i,o){var r=this,n=this.cm,a=this.settings;return o=a.pluginPath+o,"function"==typeof define?"undefined"==typeof this[i]?(alert("Error: "+i+" plugin is not found, you are not load this plugin."),this):(this[i](n),this):(e.inArray(o,t.loadFiles.plugin)<0?t.loadPlugin(o,function(){t.loadPlugins[i]=r[i],r[i](n)}):e.proxy(t.loadPlugins[i],this)(n),this)},search:function(e){var t=this.settings;return t.searchReplace?(t.readOnly||this.cm.execCommand(e||"find"),this):(alert("Error: settings.searchReplace == false"),this)},searchReplace:function(){return this.search("replace"),this},searchReplaceAll:function(){return this.search("replaceAll"),this}},t.fn.init.prototype=t.fn,t.dialogLockScreen=function(){var t=this.settings||{dialogLockScreen:!0};t.dialogLockScreen&&(e("html,body").css("overflow","hidden"),this.resize())},t.dialogShowMask=function(t){var i=this.editor,o=this.settings||{dialogShowMask:!0};t.css({top:(e(window).height()-t.height())/2+"px",left:(e(window).width()-t.width())/2+"px"}),o.dialogShowMask&&i.children("."+this.classPrefix+"mask").css("z-index",parseInt(t.css("z-index"))-1).show()},t.toolbarHandlers={undo:function(){this.cm.undo()},redo:function(){this.cm.redo()},bold:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("**"+i+"**"),""===i&&e.setCursor(t.line,t.ch+2)},del:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("~~"+i+"~~"),""===i&&e.setCursor(t.line,t.ch+2)},italic:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("*"+i+"*"),""===i&&e.setCursor(t.line,t.ch+1)},quote:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("> "+i),e.setCursor(t.line,t.ch+2)):e.replaceSelection("> "+i)},ucfirst:function(){var e=this.cm,i=e.getSelection(),o=e.listSelections();e.replaceSelection(t.firstUpperCase(i)),e.setSelections(o)},ucwords:function(){var e=this.cm,i=e.getSelection(),o=e.listSelections();e.replaceSelection(t.wordsFirstUpperCase(i)),e.setSelections(o)},uppercase:function(){var e=this.cm,t=e.getSelection(),i=e.listSelections();e.replaceSelection(t.toUpperCase()),e.setSelections(i)},lowercase:function(){var e=this.cm,t=(e.getCursor(),e.getSelection()),i=e.listSelections();e.replaceSelection(t.toLowerCase()),e.setSelections(i)},h1:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("# "+i),e.setCursor(t.line,t.ch+2)):e.replaceSelection("# "+i)},h2:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0), +e.replaceSelection("## "+i),e.setCursor(t.line,t.ch+3)):e.replaceSelection("## "+i)},h3:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("### "+i),e.setCursor(t.line,t.ch+4)):e.replaceSelection("### "+i)},h4:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("#### "+i),e.setCursor(t.line,t.ch+5)):e.replaceSelection("#### "+i)},h5:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("##### "+i),e.setCursor(t.line,t.ch+6)):e.replaceSelection("##### "+i)},h6:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();0!==t.ch?(e.setCursor(t.line,0),e.replaceSelection("###### "+i),e.setCursor(t.line,t.ch+7)):e.replaceSelection("###### "+i)},"list-ul":function(){var e=this.cm,t=(e.getCursor(),e.getSelection());if(""===t)e.replaceSelection("- "+t);else{for(var i=t.split("\n"),o=0,r=i.length;r>o;o++)i[o]=""===i[o]?"":"- "+i[o];e.replaceSelection(i.join("\n"))}},"list-ol":function(){var e=this.cm,t=(e.getCursor(),e.getSelection());if(""===t)e.replaceSelection("1. "+t);else{for(var i=t.split("\n"),o=0,r=i.length;r>o;o++)i[o]=""===i[o]?"":o+1+". "+i[o];e.replaceSelection(i.join("\n"))}},hr:function(){{var e=this.cm,t=e.getCursor();e.getSelection()}e.replaceSelection((0!==t.ch?"\n\n":"\n")+"------------\n\n")},tex:function(){if(!this.settings.tex)return alert("settings.tex === false"),this;var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("$$"+i+"$$"),""===i&&e.setCursor(t.line,t.ch+2)},link:function(){this.executePlugin("linkDialog","link-dialog/link-dialog")},"reference-link":function(){this.executePlugin("referenceLinkDialog","reference-link-dialog/reference-link-dialog")},pagebreak:function(){if(!this.settings.pageBreak)return alert("settings.pageBreak === false"),this;{var e=this.cm;e.getSelection()}e.replaceSelection("\r\n[========]\r\n")},image:function(){this.executePlugin("imageDialog","image-dialog/image-dialog")},code:function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection("`"+i+"`"),""===i&&e.setCursor(t.line,t.ch+1)},"code-block":function(){this.executePlugin("codeBlockDialog","code-block-dialog/code-block-dialog")},"preformatted-text":function(){this.executePlugin("preformattedTextDialog","preformatted-text-dialog/preformatted-text-dialog")},table:function(){this.executePlugin("tableDialog","table-dialog/table-dialog")},datetime:function(){var e=this.cm,i=(e.getSelection(),new Date,this.settings.lang.name),o=t.dateFormat()+" "+t.dateFormat("zh-cn"===i||"zh-tw"===i?"cn-week-day":"week-day");e.replaceSelection(o)},emoji:function(){this.executePlugin("emojiDialog","emoji-dialog/emoji-dialog")},"html-entities":function(){this.executePlugin("htmlEntitiesDialog","html-entities-dialog/html-entities-dialog")},"goto-line":function(){this.executePlugin("gotoLineDialog","goto-line-dialog/goto-line-dialog")},watch:function(){this[this.settings.watch?"unwatch":"watch"]()},preview:function(){this.previewing()},fullscreen:function(){this.fullscreen()},clear:function(){this.clear()},search:function(){this.search()},help:function(){this.executePlugin("helpDialog","help-dialog/help-dialog")},info:function(){this.showInfoDialog()}},t.keyMaps={"Ctrl-1":"h1","Ctrl-2":"h2","Ctrl-3":"h3","Ctrl-4":"h4","Ctrl-5":"h5","Ctrl-6":"h6","Ctrl-B":"bold","Ctrl-D":"datetime","Ctrl-E":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();return this.settings.emoji?(e.replaceSelection(":"+i+":"),void(""===i&&e.setCursor(t.line,t.ch+1))):void alert("Error: settings.emoji == false")},"Ctrl-Alt-G":"goto-line","Ctrl-H":"hr","Ctrl-I":"italic","Ctrl-K":"code","Ctrl-L":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=""===i?"":' "'+i+'"';e.replaceSelection("["+i+"]("+o+")"),""===i&&e.setCursor(t.line,t.ch+1)},"Ctrl-U":"list-ul","Shift-Ctrl-A":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();return this.settings.atLink?(e.replaceSelection("@"+i),void(""===i&&e.setCursor(t.line,t.ch+1))):void alert("Error: settings.atLink == false")},"Shift-Ctrl-C":"code","Shift-Ctrl-Q":"quote","Shift-Ctrl-S":"del","Shift-Ctrl-K":"tex","Shift-Alt-C":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection();e.replaceSelection(["```",i,"```"].join("\n")),""===i&&e.setCursor(t.line,t.ch+3)},"Shift-Ctrl-Alt-C":"code-block","Shift-Ctrl-H":"html-entities","Shift-Alt-H":"help","Shift-Ctrl-E":"emoji","Shift-Ctrl-U":"uppercase","Shift-Alt-U":"ucwords","Shift-Ctrl-Alt-U":"ucfirst","Shift-Alt-L":"lowercase","Shift-Ctrl-I":function(){var e=this.cm,t=e.getCursor(),i=e.getSelection(),o=""===i?"":' "'+i+'"';e.replaceSelection("!["+i+"]("+o+")"),""===i&&e.setCursor(t.line,t.ch+4)},"Shift-Ctrl-Alt-I":"image","Shift-Ctrl-L":"link","Shift-Ctrl-O":"list-ol","Shift-Ctrl-P":"preformatted-text","Shift-Ctrl-T":"table","Shift-Alt-P":"pagebreak",F9:"watch",F10:"preview",F11:"fullscreen"};var r=function(e){return String.prototype.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};t.trim=r;var n=function(e){return e.toLowerCase().replace(/\b(\w)|\s(\w)/g,function(e){return e.toUpperCase()})};t.ucwords=t.wordsFirstUpperCase=n;var a=function(e){return e.toLowerCase().replace(/\b(\w)/,function(e){return e.toUpperCase()})};return t.firstUpperCase=t.ucfirst=a,t.urls={atLinkBase:"https://github.com/"},t.regexs={atLink:/@(\w+)/g,email:/(\w+)@(\w+)\.(\w+)\.?(\w+)?/g,emailLink:/(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g,emoji:/:([\w\+-]+):/g,emojiDatetime:/(\d{2}:\d{2}:\d{2})/g,twemoji:/:(tw-([\w]+)-?(\w+)?):/g,fontAwesome:/:(fa-([\w]+)(-(\w+)){0,}):/g,editormdLogo:/:(editormd-logo-?(\w+)?):/g,pageBreak:/^\[[=]{8,}\]$/},t.emoji={path:"/static/editor.md/plugins/emoji-dialog/emoji/",ext:".png"},t.twemoji={path:"http://twemoji.maxcdn.com/36x36/",ext:".png"},t.markedRenderer=function(i,o){var n={toc:!0,tocm:!1,tocStartLevel:1,pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1},a=e.extend(n,o||{}),s=t.$marked,l=new s.Renderer;i=i||[];var c=t.regexs,h=c.atLink,d=c.emoji,u=c.email,f=c.emailLink,g=c.twemoji,p=c.fontAwesome,m=c.editormdLogo,w=c.pageBreak;return l.emoji=function(e){e=e.replace(t.regexs.emojiDatetime,function(e){return e.replace(/:/g,":")});var i=e.match(d);if(!i||!a.emoji)return e;for(var o=0,r=i.length;r>o;o++)":+1:"===i[o]&&(i[o]=":\\+1:"),e=e.replace(new RegExp(i[o]),function(e,i){var o=e.match(p),r=e.replace(/:/g,"");if(o)for(var n=0,a=o.length;a>n;n++){var s=o[n].replace(/:/g,"");return''}else{var l=e.match(m),c=e.match(g);if(l)for(var h=0,d=l.length;d>h;h++){var u=l[h].replace(/:/g,"");return''}else{if(!c){var f="+1"===r?"plus1":r;return f="black_large_square"===f?"black_square":f,f="moon"===f?"waxing_gibbous_moon":f,':'+r+':'}for(var w=0,v=c.length;v>w;w++){var k=c[w].replace(/:/g,"").replace("tw-","");return'twemoji-'+k+''}}}});return e},l.atLink=function(i){return h.test(i)?(a.atLink&&(i=i.replace(u,function(e,t,i,o){return e.replace(/@/g,"_#_@_#_")}),i=i.replace(h,function(e,i){return''+e+""}).replace(/_#_@_#_/g,"@")),a.emailLink&&(i=i.replace(f,function(t,i,o,r,n){return!i&&e.inArray(n,"jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|"))<0?''+t+"":t})),i):i},l.link=function(e,t,i){if(this.options.sanitize){try{var o=decodeURIComponent(unescape(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(r){return""}if(0===o.indexOf("javascript:"))return""}var n=''+i.replace(/@/g,"@")+""):(t&&(n+=' title="'+t+'"'),n+=">"+i+"")},l.heading=function(e,t,o){var n=e,a=/\s*\]*)\>(.*)\<\/a\>\s*/;if(a.test(e)){var s=[];e=e.split(/\]+)\>([^\>]*)\<\/a\>/);for(var l=0,c=e.length;c>l;l++)s.push(e[l].replace(/\s*href\=\"(.*)\"\s*/g,""));e=s.join(" ")}e=r(e);var h=e.toLowerCase().replace(/[^\w]+/g,"-"),d={text:e,level:t,slug:h},u=/^[\u4e00-\u9fa5]+$/.test(e),f=u?escape(e).replace(/\%/g,""):e.toLowerCase().replace(/[^\w]+/g,"-");i.push(d);var g="';return g+='',g+='',g+=this.atLink(a?this.emoji(n):this.emoji(e)),g+=""},l.pageBreak=function(e){return w.test(e)&&a.pageBreak&&(e='
                  '),e},l.paragraph=function(e){var i=/\$\$(.*)\$\$/g.test(e),o=/^\$\$(.*)\$\$$/.test(e),r=o?' class="'+t.classNames.tex+'"':"",n=a.tocm?/^(\[TOC\]|\[TOCM\])$/.test(e):/^\[TOC\]$/.test(e),s=/^\[TOCM\]$/.test(e);e=!o&&i?e.replace(/(\$\$([^\$]*)\$\$)+/g,function(e,i){return''+i.replace(/\$/g,"")+""}):o?e.replace(/\$/g,""):e;var l='
                  '+e+"
                  ";return n?s?'
                  '+l+"

                  ":l:w.test(e)?this.pageBreak(e):""+this.atLink(this.emoji(e))+"

                  \n"},l.code=function(e,i,o){return"seq"===i||"sequence"===i?'
                  '+e+"
                  ":"flow"===i?'
                  '+e+"
                  ":"math"===i||"latex"===i||"katex"===i?'

                  '+e+"

                  ":s.Renderer.prototype.code.apply(this,arguments)},l.tablecell=function(e,t){var i=t.header?"th":"td",o=t.align?"<"+i+' style="text-align:'+t.align+'">':"<"+i+">";return o+this.atLink(this.emoji(e))+"\n"},l.listitem=function(e){return a.taskList&&/^\s*\[[x\s]\]\s*/.test(e)?(e=e.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'
                • '+this.atLink(this.emoji(e))+"
                • "):"
                • "+this.atLink(this.emoji(e))+"
                • "},l},t.markdownToCRenderer=function(e,t,i,o){var r="",n=0,a=this.classPrefix;o=o||1;for(var s=0,l=e.length;l>s;s++){var c=e[s].text,h=e[s].level;o>h||(r+=h>n?"":n>h?new Array(n-h+2).join("
              • "):"",r+='
              • '+c+"
                  ",n=h)}var d=t.find(".markdown-toc");if(d.length<1&&"false"===t.attr("previewContainer")){var u='
                  ';u=i?'
                  '+u+"
                  ":u,t.html(u),d=t.find(".markdown-toc")}return i&&d.wrap('

                  '),d.html('
                    ').children(".markdown-toc-list").html(r.replace(/\r?\n?\\<\/ul\>/g,"")),d},t.tocDropdownMenu=function(t,i){i=i||"Table of Contents";var o=400,r=t.find("."+this.classPrefix+"toc-menu");return r.each(function(){var t=e(this),r=t.children(".markdown-toc"),n='',a=''+n+i+"",s=r.children("ul"),l=s.find("li");r.append(a),l.first().before("
                  • "+i+" "+n+"

                  • "),t.mouseover(function(){s.show(),l.each(function(){var t=e(this),i=t.children("ul");if(""===i.html()&&i.remove(),i.length>0&&""!==i.html()){var r=t.children("a").first();r.children(".fa").length<1&&r.append(e(n).css({"float":"right",paddingTop:"4px"}))}t.mouseover(function(){i.css("z-index",o).show(),o+=1}).mouseleave(function(){i.hide()})})}).mouseleave(function(){s.hide()})}),r},t.filterHTMLTags=function(t,i){if("string"!=typeof t&&(t=new String(t)),"string"!=typeof i)return t;for(var o=i.split("|"),r=o[0].split(","),n=o[1],a=0,s=r.length;s>a;a++){var l=r[a];t=t.replace(new RegExp("]*)>([^>]*)","igm"),"")}if("undefined"!=typeof n){var c=/\<(\w+)\s*([^\>]*)\>([^\>]*)\<\/(\w+)\>/gi;t="*"===n?t.replace(c,function(e,t,i,o,r){return"<"+t+">"+o+""}):"on*"===n?t.replace(c,function(t,i,o,r,n){var a=e("<"+i+">"+r+""),s=e(t)[0].attributes,l={};e.each(s,function(e,t){'"'!==t.nodeName&&(l[t.nodeName]=t.nodeValue)}),e.each(l,function(e){0===e.indexOf("on")&&delete l[e]}),a.attr(l);var c="undefined"!=typeof a[1]?e(a[1]).text():"";return a[0].outerHTML+c}):t.replace(c,function(t,i,o,r){var a=n.split(","),s=e(t);return s.html(r),e.each(a,function(e){s.attr(a[e],null)}),s[0].outerHTML})}return t},t.markdownToHTML=function(i,o){var r={gfm:!0,toc:!0,tocm:!1,tocStartLevel:1,tocTitle:"目录",tocDropdown:!1,tocContainer:"",markdown:"",markdownSourceCode:!1,htmlDecode:!1,autoLoadKaTeX:!0,pageBreak:!0,atLink:!0,emailLink:!0,tex:!1,taskList:!1,emoji:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0};t.$marked=marked;var n=e("#"+i),a=n.settings=e.extend(!0,r,o||{}),s=n.find("textarea");s.length<1&&(n.append(""),s=n.find("textarea"));var l=""===a.markdown?s.val():a.markdown,c=[],h={toc:a.toc,tocm:a.tocm,tocStartLevel:a.tocStartLevel,taskList:a.taskList,emoji:a.emoji,tex:a.tex,pageBreak:a.pageBreak,atLink:a.atLink,emailLink:a.emailLink,flowChart:a.flowChart,sequenceDiagram:a.sequenceDiagram,previewCodeHighlight:a.previewCodeHighlight},d={renderer:t.markedRenderer(c,h),gfm:a.gfm,tables:!0,breaks:!0,pedantic:!1,sanitize:a.htmlDecode?!1:!0,smartLists:!0,smartypants:!0};l=new String(l);var u=marked(l,d);u=t.filterHTMLTags(u,a.htmlDecode),a.markdownSourceCode?s.text(l):s.remove(),n.addClass("markdown-body "+this.classPrefix+"html-preview").append(u);var f=""!==a.tocContainer?e(a.tocContainer):n;if(""!==a.tocContainer&&f.attr("previewContainer",!1),a.toc&&(n.tocContainer=this.markdownToCRenderer(c,f,a.tocDropdown,a.tocStartLevel),(a.tocDropdown||n.find("."+this.classPrefix+"toc-menu").length>0)&&this.tocDropdownMenu(n,a.tocTitle),""!==a.tocContainer&&n.find(".editormd-toc-menu, .editormd-markdown-toc").remove()),a.previewCodeHighlight&&(n.find("pre").addClass("prettyprint linenums"),prettyPrint()),t.isIE8||(a.flowChart&&n.find(".flowchart").flowChart(),a.sequenceDiagram&&n.find(".sequence-diagram").sequenceDiagram({theme:"simple"})),a.tex){var g=function(){n.find("."+t.classNames.tex).each(function(){var t=e(this);katex.render(t.html().replace(/</g,"<").replace(/>/g,">"),t[0]),t.find(".katex").css("font-size","1.6em")})};!a.autoLoadKaTeX||t.$katex||t.kaTeXLoaded?g():this.loadKaTeX(function(){t.$katex=katex,t.kaTeXLoaded=!0,g()})}return n.getMarkdown=function(){return s.val()},n},t.themes=["default","dark"],t.previewThemes=["default","dark"],t.editorThemes=["default","3024-day","3024-night","ambiance","ambiance-mobile","base16-dark","base16-light","blackboard","cobalt","eclipse","elegant","erlang-dark","lesser-dark","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","rubyblue","solarized","the-matrix","tomorrow-night-eighties","twilight","vibrant-ink","xq-dark","xq-light"],t.loadPlugins={},t.loadFiles={js:[],css:[],plugin:[]},t.loadPlugin=function(e,i,o){i=i||function(){},this.loadScript(e,function(){t.loadFiles.plugin.push(e),i()},o)},t.loadCSS=function(e,i,o){o=o||"head",i=i||function(){};var r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.onload=r.onreadystatechange=function(){t.loadFiles.css.push(e),i()},r.href=e+".css","head"===o?document.getElementsByTagName("head")[0].appendChild(r):document.body.appendChild(r)},t.isIE="Microsoft Internet Explorer"==navigator.appName,t.isIE8=t.isIE&&"8."==navigator.appVersion.match(/8./i),t.loadScript=function(e,i,o){o=o||"head",i=i||function(){};var r=null;r=document.createElement("script"),r.id=e.replace(/[\./]+/g,"-"),r.type="text/javascript",r.src=e+".js",t.isIE8?r.onreadystatechange=function(){r.readyState&&("loaded"===r.readyState||"complete"===r.readyState)&&(r.onreadystatechange=null,t.loadFiles.js.push(e),i())}:r.onload=function(){t.loadFiles.js.push(e),i()},"head"===o?document.getElementsByTagName("head")[0].appendChild(r):document.body.appendChild(r)},t.katexURL={css:"/static/katex/katex.min",js:"/static/katex/katex.min"},t.kaTeXLoaded=!1,t.loadKaTeX=function(e){t.loadCSS(t.katexURL.css,function(){t.loadScript(t.katexURL.js,e||function(){})})},t.lockScreen=function(t){e("html,body").css("overflow",t?"hidden":"")},t.createDialog=function(i){var o={name:"",width:420,height:240,title:"",drag:!0,closed:!0,content:"",mask:!0,maskStyle:{backgroundColor:"#fff",opacity:.1},lockScreen:!0,footer:!0,buttons:!1};i=e.extend(!0,o,i);var r=this,n=this.editor,a=t.classPrefix,s=(new Date).getTime(),l=""===i.name?a+"dialog-"+s:i.name,c=t.mouseOrTouch,h='
                    ';""!==i.title&&(h+='
                    ",h+=''+i.title+"",h+="
                    "),i.closed&&(h+=''),h+='
                    '+i.content,(i.footer||"string"==typeof i.footer)&&(h+='"),h+="
                    ",h+='
                    ',h+='
                    ',h+="
                    ",n.append(h);var d=n.find("."+l);d.lockScreen=function(t){return i.lockScreen&&(e("html,body").css("overflow",t?"hidden":""),r.resize()),d},d.showMask=function(){return i.mask&&n.find("."+a+"mask").css(i.maskStyle).css("z-index",t.dialogZindex-1).show(),d},d.hideMask=function(){return i.mask&&n.find("."+a+"mask").hide(),d},d.loading=function(e){var t=d.find("."+a+"dialog-mask");return t[e?"show":"hide"](),d},d.lockScreen(!0).showMask(),d.show().css({zIndex:t.dialogZindex,border:t.isIE8?"1px solid #ddd":"",width:"number"==typeof i.width?i.width+"px":i.width,height:"number"==typeof i.height?i.height+"px":i.height});var u=function(){d.css({top:(e(window).height()-d.height())/2+"px",left:(e(window).width()-d.width())/2+"px"})};if(u(),e(window).resize(u),d.children("."+a+"dialog-close").bind(c("click","touchend"),function(){d.hide().lockScreen(!1).hideMask()}),"object"==typeof i.buttons){var f=d.footer=d.find("."+a+"dialog-footer");for(var g in i.buttons){var p=i.buttons[g],m=a+g+"-btn";f.append('"),p[1]=e.proxy(p[1],d),f.children("."+m).bind(c("click","touchend"),p[1])}}if(""!==i.title&&i.drag){var w,v,k=d.children("."+a+"dialog-header");i.mask||k.bind(c("click","touchend"),function(){t.dialogZindex+=2,d.css("z-index",t.dialogZindex)}),k.mousedown(function(e){e=e||window.event,w=e.clientX-parseInt(d[0].style.left),v=e.clientY-parseInt(d[0].style.top),document.onmousemove=y});var b=function(e){e.removeClass(a+"user-unselect").off("selectstart")},x=function(e){e.addClass(a+"user-unselect").on("selectstart",function(e){return!1})},y=function(t){t=t||window.event;var i,o,r=parseInt(d[0].style.left),n=parseInt(d[0].style.top);r>=0?r+d.width()<=e(window).width()?i=t.clientX-w:(i=e(window).width()-d.width(),document.onmousemove=null):(i=0,document.onmousemove=null),n>=0?o=t.clientY-v:(o=0,document.onmousemove=null),document.onselectstart=function(){return!1},x(e("body")),x(d),d[0].style.left=i+"px",d[0].style.top=o+"px"};document.onmouseup=function(){b(e("body")),b(d),document.onselectstart=null,document.onmousemove=null},k.touchDraggable=function(){var t=null,i=function(i){var o=i.originalEvent,r=e(this).parent().position();t={x:o.changedTouches[0].pageX-r.left,y:o.changedTouches[0].pageY-r.top}},o=function(i){i.preventDefault();var o=i.originalEvent;e(this).parent().css({top:o.changedTouches[0].pageY-t.y,left:o.changedTouches[0].pageX-t.x})};this.bind("touchstart",i).bind("touchmove",o)},k.touchDraggable()}return t.dialogZindex+=2,d},t.mouseOrTouch=function(e,t){e=e||"click",t=t||"touchend";var i=e;try{document.createEvent("TouchEvent"),i=t}catch(o){}return i},t.dateFormat=function(e){e=e||"";var t=function(e){return 10>e?"0"+e:e},i=new Date,o=i.getFullYear(),r=o.toString().slice(2,4),n=t(i.getMonth()+1),a=t(i.getDate()),s=i.getDay(),l=t(i.getHours()),c=t(i.getMinutes()),h=t(i.getSeconds()),d=t(i.getMilliseconds()),u="",f=r+"-"+n+"-"+a,g=o+"-"+n+"-"+a,p=l+":"+c+":"+h;switch(e){case"UNIX Time":u=i.getTime();break;case"UTC":u=i.toUTCString();break;case"yy":u=r;break;case"year":case"yyyy":u=o;break;case"month":case"mm":u=n;break;case"cn-week-day":case"cn-wd":var m=["日","一","二","三","四","五","六"];u="星期"+m[s];break;case"week-day":case"wd":var w=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];u=w[s];break;case"day":case"dd":u=a;break;case"hour":case"hh":u=l;break;case"min":case"ii":u=c;break;case"second":case"ss":u=h;break;case"ms":u=d;break;case"yy-mm-dd":u=f;break;case"yyyy-mm-dd":u=g;break;case"yyyy-mm-dd h:i:s ms":case"full + ms":u=g+" "+p+" "+d;break;case"full":case"yyyy-mm-dd h:i:s":default:u=g+" "+p}return u},t}}); \ No newline at end of file diff --git a/static/editor.md/fonts/FontAwesome.otf b/static/editor.md/fonts/FontAwesome.otf new file mode 100644 index 0000000..f7936cc Binary files /dev/null and b/static/editor.md/fonts/FontAwesome.otf differ diff --git a/static/editor.md/fonts/editormd-logo.eot b/static/editor.md/fonts/editormd-logo.eot new file mode 100644 index 0000000..6f378fd Binary files /dev/null and b/static/editor.md/fonts/editormd-logo.eot differ diff --git a/static/editor.md/fonts/editormd-logo.svg b/static/editor.md/fonts/editormd-logo.svg new file mode 100644 index 0000000..cce729b --- /dev/null +++ b/static/editor.md/fonts/editormd-logo.svg @@ -0,0 +1,11 @@ + + + +Generated by IcoMoon + + + + + + + \ No newline at end of file diff --git a/static/editor.md/fonts/editormd-logo.ttf b/static/editor.md/fonts/editormd-logo.ttf new file mode 100644 index 0000000..659c1b3 Binary files /dev/null and b/static/editor.md/fonts/editormd-logo.ttf differ diff --git a/static/editor.md/fonts/editormd-logo.woff b/static/editor.md/fonts/editormd-logo.woff new file mode 100644 index 0000000..384ee49 Binary files /dev/null and b/static/editor.md/fonts/editormd-logo.woff differ diff --git a/static/editor.md/fonts/fontawesome-webfont.eot b/static/editor.md/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..33b2bb8 Binary files /dev/null and b/static/editor.md/fonts/fontawesome-webfont.eot differ diff --git a/static/editor.md/fonts/fontawesome-webfont.svg b/static/editor.md/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..1ee89d4 --- /dev/null +++ b/static/editor.md/fonts/fontawesome-webfont.svg @@ -0,0 +1,565 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/editor.md/fonts/fontawesome-webfont.ttf b/static/editor.md/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..ed9372f Binary files /dev/null and b/static/editor.md/fonts/fontawesome-webfont.ttf differ diff --git a/static/editor.md/fonts/fontawesome-webfont.woff b/static/editor.md/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..8b280b9 Binary files /dev/null and b/static/editor.md/fonts/fontawesome-webfont.woff differ diff --git a/static/editor.md/fonts/fontawesome-webfont.woff2 b/static/editor.md/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..3311d58 Binary files /dev/null and b/static/editor.md/fonts/fontawesome-webfont.woff2 differ diff --git a/static/editor.md/images/loading.gif b/static/editor.md/images/loading.gif new file mode 100644 index 0000000..3aa9c85 Binary files /dev/null and b/static/editor.md/images/loading.gif differ diff --git a/static/editor.md/images/loading@2x.gif b/static/editor.md/images/loading@2x.gif new file mode 100644 index 0000000..bcc021e Binary files /dev/null and b/static/editor.md/images/loading@2x.gif differ diff --git a/static/editor.md/images/loading@3x.gif b/static/editor.md/images/loading@3x.gif new file mode 100644 index 0000000..216aa5a Binary files /dev/null and b/static/editor.md/images/loading@3x.gif differ diff --git a/static/editor.md/images/logos/editormd-favicon-16x16.ico b/static/editor.md/images/logos/editormd-favicon-16x16.ico new file mode 100644 index 0000000..1dfecec Binary files /dev/null and b/static/editor.md/images/logos/editormd-favicon-16x16.ico differ diff --git a/static/editor.md/images/logos/editormd-favicon-24x24.ico b/static/editor.md/images/logos/editormd-favicon-24x24.ico new file mode 100644 index 0000000..2dc884d Binary files /dev/null and b/static/editor.md/images/logos/editormd-favicon-24x24.ico differ diff --git a/static/editor.md/images/logos/editormd-favicon-32x32.ico b/static/editor.md/images/logos/editormd-favicon-32x32.ico new file mode 100644 index 0000000..986b10f Binary files /dev/null and b/static/editor.md/images/logos/editormd-favicon-32x32.ico differ diff --git a/static/editor.md/images/logos/editormd-favicon-48x48.ico b/static/editor.md/images/logos/editormd-favicon-48x48.ico new file mode 100644 index 0000000..023cdef Binary files /dev/null and b/static/editor.md/images/logos/editormd-favicon-48x48.ico differ diff --git a/static/editor.md/images/logos/editormd-favicon-64x64.ico b/static/editor.md/images/logos/editormd-favicon-64x64.ico new file mode 100644 index 0000000..b114b82 Binary files /dev/null and b/static/editor.md/images/logos/editormd-favicon-64x64.ico differ diff --git a/static/editor.md/images/logos/editormd-logo-114x114.png b/static/editor.md/images/logos/editormd-logo-114x114.png new file mode 100644 index 0000000..0e1a745 Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-114x114.png differ diff --git a/static/editor.md/images/logos/editormd-logo-120x120.png b/static/editor.md/images/logos/editormd-logo-120x120.png new file mode 100644 index 0000000..b8bfa39 Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-120x120.png differ diff --git a/static/editor.md/images/logos/editormd-logo-144x144.png b/static/editor.md/images/logos/editormd-logo-144x144.png new file mode 100644 index 0000000..d86bf64 Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-144x144.png differ diff --git a/static/editor.md/images/logos/editormd-logo-16x16.png b/static/editor.md/images/logos/editormd-logo-16x16.png new file mode 100644 index 0000000..867be67 Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-16x16.png differ diff --git a/static/editor.md/images/logos/editormd-logo-180x180.png b/static/editor.md/images/logos/editormd-logo-180x180.png new file mode 100644 index 0000000..207bd3e Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-180x180.png differ diff --git a/static/editor.md/images/logos/editormd-logo-240x240.png b/static/editor.md/images/logos/editormd-logo-240x240.png new file mode 100644 index 0000000..119d5b9 Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-240x240.png differ diff --git a/static/editor.md/images/logos/editormd-logo-24x24.png b/static/editor.md/images/logos/editormd-logo-24x24.png new file mode 100644 index 0000000..5014194 Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-24x24.png differ diff --git a/static/editor.md/images/logos/editormd-logo-320x320.png b/static/editor.md/images/logos/editormd-logo-320x320.png new file mode 100644 index 0000000..00bc3cc Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-320x320.png differ diff --git a/static/editor.md/images/logos/editormd-logo-32x32.png b/static/editor.md/images/logos/editormd-logo-32x32.png new file mode 100644 index 0000000..c1614f9 Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-32x32.png differ diff --git a/static/editor.md/images/logos/editormd-logo-48x48.png b/static/editor.md/images/logos/editormd-logo-48x48.png new file mode 100644 index 0000000..8c7f6c0 Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-48x48.png differ diff --git a/static/editor.md/images/logos/editormd-logo-57x57.png b/static/editor.md/images/logos/editormd-logo-57x57.png new file mode 100644 index 0000000..cd43a0b Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-57x57.png differ diff --git a/static/editor.md/images/logos/editormd-logo-64x64.png b/static/editor.md/images/logos/editormd-logo-64x64.png new file mode 100644 index 0000000..9445db3 Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-64x64.png differ diff --git a/static/editor.md/images/logos/editormd-logo-72x72.png b/static/editor.md/images/logos/editormd-logo-72x72.png new file mode 100644 index 0000000..d7e172a Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-72x72.png differ diff --git a/static/editor.md/images/logos/editormd-logo-96x96.png b/static/editor.md/images/logos/editormd-logo-96x96.png new file mode 100644 index 0000000..0bc7e41 Binary files /dev/null and b/static/editor.md/images/logos/editormd-logo-96x96.png differ diff --git a/static/editor.md/images/logos/vi.png b/static/editor.md/images/logos/vi.png new file mode 100644 index 0000000..796a522 Binary files /dev/null and b/static/editor.md/images/logos/vi.png differ diff --git a/static/editor.md/languages/en.js b/static/editor.md/languages/en.js new file mode 100644 index 0000000..91fab27 --- /dev/null +++ b/static/editor.md/languages/en.js @@ -0,0 +1,127 @@ +(function(){ + var factory = function (exports) { + var lang = { + name : "en", + description : "Open source online Markdown editor.", + tocTitle : "Table of Contents", + toolbar : { + undo : "Undo(Ctrl+Z)", + redo : "Redo(Ctrl+Y)", + bold : "Bold", + del : "Strikethrough", + italic : "Italic", + quote : "Block quote", + ucwords : "Words first letter convert to uppercase", + uppercase : "Selection text convert to uppercase", + lowercase : "Selection text convert to lowercase", + h1 : "Heading 1", + h2 : "Heading 2", + h3 : "Heading 3", + h4 : "Heading 4", + h5 : "Heading 5", + h6 : "Heading 6", + "list-ul" : "Unordered list", + "list-ol" : "Ordered list", + hr : "Horizontal rule", + link : "Link", + "reference-link" : "Reference link", + image : "Image", + code : "Code inline", + "preformatted-text" : "Preformatted text / Code block (Tab indent)", + "code-block" : "Code block (Multi-languages)", + table : "Tables", + datetime : "Datetime", + emoji : "Emoji", + "html-entities" : "HTML Entities", + pagebreak : "Page break", + watch : "Unwatch", + unwatch : "Watch", + preview : "HTML Preview (Press Shift + ESC exit)", + fullscreen : "Fullscreen (Press ESC exit)", + clear : "Clear", + search : "Search", + help : "Help", + info : "About " + exports.title + }, + buttons : { + enter : "Enter", + cancel : "Cancel", + close : "Close" + }, + dialog : { + link : { + title : "Link", + url : "Address", + urlTitle : "Title", + urlEmpty : "Error: Please fill in the link address." + }, + referenceLink : { + title : "Reference link", + name : "Name", + url : "Address", + urlId : "ID", + urlTitle : "Title", + nameEmpty: "Error: Reference name can't be empty.", + idEmpty : "Error: Please fill in reference link id.", + urlEmpty : "Error: Please fill in reference link url address." + }, + image : { + title : "Image", + url : "Address", + link : "Link", + alt : "Title", + uploadButton : "Upload", + imageURLEmpty : "Error: picture url address can't be empty.", + uploadFileEmpty : "Error: upload pictures cannot be empty!", + formatNotAllowed : "Error: only allows to upload pictures file, upload allowed image file format:" + }, + preformattedText : { + title : "Preformatted text / Codes", + emptyAlert : "Error: Please fill in the Preformatted text or content of the codes." + }, + codeBlock : { + title : "Code block", + selectLabel : "Languages: ", + selectDefaultText : "select a code language...", + otherLanguage : "Other languages", + unselectedLanguageAlert : "Error: Please select the code language.", + codeEmptyAlert : "Error: Please fill in the code content." + }, + htmlEntities : { + title : "HTML Entities" + }, + help : { + title : "Help" + } + } + }; + + exports.defaults.lang = lang; + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); \ No newline at end of file diff --git a/static/editor.md/languages/zh-tw.js b/static/editor.md/languages/zh-tw.js new file mode 100644 index 0000000..a7c0496 --- /dev/null +++ b/static/editor.md/languages/zh-tw.js @@ -0,0 +1,127 @@ +(function(){ + var factory = function (exports) { + var lang = { + name : "zh-tw", + description : "開源在線Markdown編輯器
                    Open source online Markdown editor.", + tocTitle : "目錄", + toolbar : { + undo : "撤銷(Ctrl+Z)", + redo : "重做(Ctrl+Y)", + bold : "粗體", + del : "刪除線", + italic : "斜體", + quote : "引用", + ucwords : "將所選的每個單詞首字母轉成大寫", + uppercase : "將所選文本轉成大寫", + lowercase : "將所選文本轉成小寫", + h1 : "標題1", + h2 : "標題2", + h3 : "標題3", + h4 : "標題4", + h5 : "標題5", + h6 : "標題6", + "list-ul" : "無序列表", + "list-ol" : "有序列表", + hr : "横线", + link : "链接", + "reference-link" : "引用鏈接", + image : "圖片", + code : "行內代碼", + "preformatted-text" : "預格式文本 / 代碼塊(縮進風格)", + "code-block" : "代碼塊(多語言風格)", + table : "添加表格", + datetime : "日期時間", + emoji : "Emoji 表情", + "html-entities" : "HTML 實體字符", + pagebreak : "插入分頁符", + watch : "關閉實時預覽", + unwatch : "開啟實時預覽", + preview : "全窗口預覽HTML(按 Shift + ESC 退出)", + fullscreen : "全屏(按 ESC 退出)", + clear : "清空", + search : "搜尋", + help : "使用幫助", + info : "關於" + exports.title + }, + buttons : { + enter : "確定", + cancel : "取消", + close : "關閉" + }, + dialog : { + link : { + title : "添加鏈接", + url : "鏈接地址", + urlTitle : "鏈接標題", + urlEmpty : "錯誤:請填寫鏈接地址。" + }, + referenceLink : { + title : "添加引用鏈接", + name : "引用名稱", + url : "鏈接地址", + urlId : "鏈接ID", + urlTitle : "鏈接標題", + nameEmpty: "錯誤:引用鏈接的名稱不能為空。", + idEmpty : "錯誤:請填寫引用鏈接的ID。", + urlEmpty : "錯誤:請填寫引用鏈接的URL地址。" + }, + image : { + title : "添加圖片", + url : "圖片地址", + link : "圖片鏈接", + alt : "圖片描述", + uploadButton : "本地上傳", + imageURLEmpty : "錯誤:圖片地址不能為空。", + uploadFileEmpty : "錯誤:上傳的圖片不能為空!", + formatNotAllowed : "錯誤:只允許上傳圖片文件,允許上傳的圖片文件格式有:" + }, + preformattedText : { + title : "添加預格式文本或代碼塊", + emptyAlert : "錯誤:請填寫預格式文本或代碼的內容。" + }, + codeBlock : { + title : "添加代碼塊", + selectLabel : "代碼語言:", + selectDefaultText : "請語言代碼語言", + otherLanguage : "其他語言", + unselectedLanguageAlert : "錯誤:請選擇代碼所屬的語言類型。", + codeEmptyAlert : "錯誤:請填寫代碼內容。" + }, + htmlEntities : { + title : "HTML實體字符" + }, + help : { + title : "使用幫助" + } + } + }; + + exports.defaults.lang = lang; + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); \ No newline at end of file diff --git a/static/editor.md/plugins/code-block-dialog/code-block-dialog.js b/static/editor.md/plugins/code-block-dialog/code-block-dialog.js new file mode 100644 index 0000000..b4b0d8c --- /dev/null +++ b/static/editor.md/plugins/code-block-dialog/code-block-dialog.js @@ -0,0 +1,237 @@ +/*! + * Code block dialog plugin for Editor.md + * + * @file code-block-dialog.js + * @author pandao + * @version 1.2.0 + * @updateTime 2015-03-07 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + var cmEditor; + var pluginName = "code-block-dialog"; + + // for CodeBlock dialog select + var codeLanguages = exports.codeLanguages = { + asp : ["ASP", "vbscript"], + actionscript : ["ActionScript(3.0)/Flash/Flex", "clike"], + bash : ["Bash/Bat", "shell"], + css : ["CSS", "css"], + c : ["C", "clike"], + cpp : ["C++", "clike"], + csharp : ["C#", "clike"], + coffeescript : ["CoffeeScript", "coffeescript"], + d : ["D", "d"], + dart : ["Dart", "dart"], + delphi : ["Delphi/Pascal", "pascal"], + erlang : ["Erlang", "erlang"], + go : ["Golang", "go"], + groovy : ["Groovy", "groovy"], + html : ["HTML", "text/html"], + java : ["Java", "clike"], + json : ["JSON", "text/json"], + javascript : ["Javascript", "javascript"], + lua : ["Lua", "lua"], + less : ["LESS", "css"], + markdown : ["Markdown", "gfm"], + "objective-c" : ["Objective-C", "clike"], + php : ["PHP", "php"], + perl : ["Perl", "perl"], + python : ["Python", "python"], + r : ["R", "r"], + rst : ["reStructedText", "rst"], + ruby : ["Ruby", "ruby"], + sql : ["SQL", "sql"], + sass : ["SASS/SCSS", "sass"], + shell : ["Shell", "shell"], + scala : ["Scala", "clike"], + swift : ["Swift", "clike"], + vb : ["VB/VBScript", "vb"], + xml : ["XML", "text/xml"], + yaml : ["YAML", "yaml"] + }; + + exports.fn.codeBlockDialog = function() { + + var _this = this; + var cm = this.cm; + var lang = this.lang; + var editor = this.editor; + var settings = this.settings; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var classPrefix = this.classPrefix; + var dialogName = classPrefix + pluginName, dialog; + var dialogLang = lang.dialog.codeBlock; + + cm.focus(); + + if (editor.find("." + dialogName).length > 0) + { + dialog = editor.find("." + dialogName); + dialog.find("option:first").attr("selected", "selected"); + dialog.find("textarea").val(selection); + + this.dialogShowMask(dialog); + this.dialogLockScreen(); + dialog.show(); + } + else + { + var dialogHTML = "
                    " + + dialogLang.selectLabel + "" + + "
                    " + + ""; + + dialog = this.createDialog({ + name : dialogName, + title : dialogLang.title, + width : 780, + height : 565, + mask : settings.dialogShowMask, + drag : settings.dialogDraggable, + content : dialogHTML, + lockScreen : settings.dialogLockScreen, + maskStyle : { + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }, + buttons : { + enter : [lang.buttons.enter, function() { + var codeTexts = this.find("textarea").val(); + var langName = this.find("select").val(); + + if (langName === "") + { + alert(lang.dialog.codeBlock.unselectedLanguageAlert); + return false; + } + + if (codeTexts === "") + { + alert(lang.dialog.codeBlock.codeEmptyAlert); + return false; + } + + langName = (langName === "other") ? "" : langName; + + cm.replaceSelection(["```" + langName, codeTexts, "```"].join("\n")); + + if (langName === "") { + cm.setCursor(cursor.line, cursor.ch + 3); + } + + this.hide().lockScreen(false).hideMask(); + + return false; + }], + cancel : [lang.buttons.cancel, function() { + this.hide().lockScreen(false).hideMask(); + + return false; + }] + } + }); + } + + var langSelect = dialog.find("select"); + + if (langSelect.find("option").length === 1) + { + for (var key in codeLanguages) + { + var codeLang = codeLanguages[key]; + langSelect.append(""); + } + + langSelect.append(""); + } + + var mode = langSelect.find("option:selected").attr("mode"); + + var cmConfig = { + mode : (mode) ? mode : "text/html", + theme : settings.theme, + tabSize : 4, + autofocus : true, + autoCloseTags : true, + indentUnit : 4, + lineNumbers : true, + lineWrapping : true, + extraKeys : {"Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }}, + foldGutter : true, + gutters : ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + matchBrackets : true, + indentWithTabs : true, + styleActiveLine : true, + styleSelectedText : true, + autoCloseBrackets : true, + showTrailingSpace : true, + highlightSelectionMatches : true + }; + + var textarea = dialog.find("textarea"); + var cmObj = dialog.find(".CodeMirror"); + + if (dialog.find(".CodeMirror").length < 1) + { + cmEditor = exports.$CodeMirror.fromTextArea(textarea[0], cmConfig); + cmObj = dialog.find(".CodeMirror"); + + cmObj.css({ + "float" : "none", + margin : "8px 0", + border : "1px solid #ddd", + fontSize : settings.fontSize, + width : "100%", + height : "390px" + }); + + cmEditor.on("change", function(cm) { + textarea.val(cm.getValue()); + }); + } + else + { + + cmEditor.setValue(cm.getSelection()); + } + + langSelect.change(function(){ + var _mode = $(this).find("option:selected").attr("mode"); + cmEditor.setOption("mode", _mode); + }); + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/emoji-dialog/emoji-dialog.js b/static/editor.md/plugins/emoji-dialog/emoji-dialog.js new file mode 100644 index 0000000..d43ef20 --- /dev/null +++ b/static/editor.md/plugins/emoji-dialog/emoji-dialog.js @@ -0,0 +1,327 @@ +/*! + * Emoji dialog plugin for Editor.md + * + * @file emoji-dialog.js + * @author pandao + * @version 1.2.0 + * @updateTime 2015-03-08 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + + var $ = jQuery; + var pluginName = "emoji-dialog"; + var emojiTabIndex = 0; + var emojiData = []; + var selecteds = []; + + var logoPrefix = "editormd-logo"; + var logos = [ + logoPrefix, + logoPrefix + "-1x", + logoPrefix + "-2x", + logoPrefix + "-3x", + logoPrefix + "-4x", + logoPrefix + "-5x", + logoPrefix + "-6x", + logoPrefix + "-7x", + logoPrefix + "-8x" + ]; + + var langs = { + "zh-cn" : { + toolbar : { + emoji : "Emoji 表情" + }, + dialog : { + emoji : { + title : "Emoji 表情" + } + } + }, + "zh-tw" : { + toolbar : { + emoji : "Emoji 表情" + }, + dialog : { + emoji : { + title : "Emoji 表情" + } + } + }, + "en" : { + toolbar : { + emoji : "Emoji" + }, + dialog : { + emoji : { + title : "Emoji" + } + } + } + }; + + exports.fn.emojiDialog = function() { + var _this = this; + var cm = this.cm; + var settings = _this.settings; + + if (!settings.emoji) + { + alert("settings.emoji == false"); + return ; + } + + var path = settings.pluginPath + pluginName + "/"; + var editor = this.editor; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var classPrefix = this.classPrefix; + + $.extend(true, this.lang, langs[this.lang.name]); + this.setToolbar(); + + var lang = this.lang; + var dialogName = classPrefix + pluginName, dialog; + var dialogLang = lang.dialog.emoji; + + var dialogContent = [ + "
                    ", + "
                    ", + "
                    ", + ].join("\n"); + + cm.focus(); + + if (editor.find("." + dialogName).length > 0) + { + dialog = editor.find("." + dialogName); + + selecteds = []; + dialog.find("a").removeClass("selected"); + + this.dialogShowMask(dialog); + this.dialogLockScreen(); + dialog.show(); + } + else + { + dialog = this.createDialog({ + name : dialogName, + title : dialogLang.title, + width : 800, + height : 475, + mask : settings.dialogShowMask, + drag : settings.dialogDraggable, + content : dialogContent, + lockScreen : settings.dialogLockScreen, + maskStyle : { + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }, + buttons : { + enter : [lang.buttons.enter, function() { + cm.replaceSelection(selecteds.join(" ")); + this.hide().lockScreen(false).hideMask(); + + return false; + }], + cancel : [lang.buttons.cancel, function() { + this.hide().lockScreen(false).hideMask(); + + return false; + }] + } + }); + } + + var category = ["Github emoji", "Twemoji", "Font awesome", "Editor.md logo"]; + var tab = dialog.find("." + classPrefix + "tab"); + + if (tab.html() === "") + { + var head = "
                      "; + + for (var i = 0; i<4; i++) { + var active = (i === 0) ? " class=\"active\"" : ""; + head += "" + category[i] + ""; + } + + head += "
                    "; + + tab.append(head); + + var container = "
                    "; + + for (var x = 0; x < 4; x++) + { + var display = (x === 0) ? "" : "display:none;"; + container += "
                    "; + } + + container += "
                    "; + + tab.append(container); + } + + var tabBoxs = tab.find("." + classPrefix + "tab-box"); + var emojiCategories = ["github-emoji", "twemoji", "font-awesome", logoPrefix]; + + var drawTable = function() { + var cname = emojiCategories[emojiTabIndex]; + var $data = emojiData[cname]; + var $tab = tabBoxs.eq(emojiTabIndex); + + if ($tab.html() !== "") { + //console.log("break =>", cname); + return ; + } + + var pagination = function(data, type) { + var rowNumber = (type === "editormd-logo") ? "5" : 20; + var pageTotal = Math.ceil(data.length / rowNumber); + var table = "
                    "; + + for (var i = 0; i < pageTotal; i++) + { + var row = "
                    "; + + for (var x = 0; x < rowNumber; x++) + { + var emoji = $.trim(data[(i * rowNumber) + x]); + + if (typeof emoji !== "undefined" && emoji !== "") + { + var img = "", icon = ""; + + if (type === "github-emoji") + { + var src = (emoji === "+1") ? "plus1" : emoji; + src = (src === "black_large_square") ? "black_square" : src; + src = (src === "moon") ? "waxing_gibbous_moon" : src; + + src = exports.emoji.path + src + exports.emoji.ext; + img = "\":""; + row += "" + img + ""; + } + else if (type === "twemoji") + { + var twemojiSrc = exports.twemoji.path + emoji + exports.twemoji.ext; + img = "\"twemoji-""; + row += "" + img + ""; + } + else if (type === "font-awesome") + { + icon = ""; + row += "" + icon + ""; + } + else if (type === "editormd-logo") + { + icon = ""; + row += "" + icon + ""; + } + } + else + { + row += ""; + } + } + + row += "
                    "; + + table += row; + } + + table += "
                    "; + + return table; + }; + + if (emojiTabIndex === 0) + { + for (var i = 0, len = $data.length; i < len; i++) + { + var h4Style = (i === 0) ? " style=\"margin: 0 0 10px;\"" : " style=\"margin: 10px 0;\""; + $tab.append("" + $data[i].category + ""); + $tab.append(pagination($data[i].list, cname)); + } + } + else + { + $tab.append(pagination($data, cname)); + } + + $tab.find("." + classPrefix + "emoji-btn").bind(exports.mouseOrTouch("click", "touchend"), function() { + $(this).toggleClass("selected"); + + if ($(this).hasClass("selected")) + { + selecteds.push($(this).attr("value")); + } + }); + }; + + if (emojiData.length < 1) + { + if (typeof dialog.loading === "function") { + dialog.loading(true); + } + + $.getJSON(path + "emoji.json?temp=" + Math.random(), function(json) { + + if (typeof dialog.loading === "function") { + dialog.loading(false); + } + + emojiData = json; + emojiData[logoPrefix] = logos; + drawTable(); + }); + } + else + { + drawTable(); + } + + tab.find("li").bind(exports.mouseOrTouch("click", "touchend"), function() { + var $this = $(this); + emojiTabIndex = $this.index(); + + $this.addClass("active").siblings().removeClass("active"); + tabBoxs.eq(emojiTabIndex).show().siblings().hide(); + drawTable(); + }); + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/emoji-dialog/emoji.json b/static/editor.md/plugins/emoji-dialog/emoji.json new file mode 100644 index 0000000..46d8473 --- /dev/null +++ b/static/editor.md/plugins/emoji-dialog/emoji.json @@ -0,0 +1,28 @@ +{ + "github-emoji" : [ + { + "category" :"People", + "list" : ["bowtie","smile","laughing","blush","smiley","relaxed","smirk","heart_eyes","kissing_heart","kissing_closed_eyes","flushed","relieved","satisfied","grin","wink","stuck_out_tongue_winking_eye","stuck_out_tongue_closed_eyes","grinning","kissing","kissing_smiling_eyes","stuck_out_tongue","sleeping","worried","frowning","anguished","open_mouth","grimacing","confused","hushed","expressionless","unamused","sweat_smile","sweat","disappointed_relieved","weary","pensive","disappointed","confounded","fearful","cold_sweat","persevere","cry","sob","joy","astonished","scream","neckbeard","tired_face","angry","rage","triumph","sleepy","yum","mask","sunglasses","dizzy_face","imp","smiling_imp","neutral_face","no_mouth","innocent","alien","yellow_heart","blue_heart","purple_heart","heart","green_heart","broken_heart","heartbeat","heartpulse","two_hearts","revolving_hearts","cupid","sparkling_heart","sparkles","star","star2","dizzy","boom","collision","anger","exclamation","question","grey_exclamation","grey_question","zzz","dash","sweat_drops","notes","musical_note","fire","hankey","poop","shit","+1","thumbsup","-1","thumbsdown","ok_hand","punch","facepunch","fist","v","wave","hand","raised_hand","open_hands","point_up","point_down","point_left","point_right","raised_hands","pray","point_up_2","clap","muscle","metal","fu","walking","runner","running","couple","family","two_men_holding_hands","two_women_holding_hands","dancer","dancers","ok_woman","no_good","information_desk_person","raising_hand","bride_with_veil","person_with_pouting_face","person_frowning","bow","couplekiss","couple_with_heart","massage","haircut","nail_care","boy","girl","woman","man","baby","older_woman","older_man","person_with_blond_hair","man_with_gua_pi_mao","man_with_turban","construction_worker","cop","angel","princess","smiley_cat","smile_cat","heart_eyes_cat","kissing_cat","smirk_cat","scream_cat","crying_cat_face","joy_cat","pouting_cat","japanese_ogre","japanese_goblin","see_no_evil","hear_no_evil","speak_no_evil","guardsman","skull","feet","lips","kiss","droplet","ear","eyes","nose","tongue","love_letter","bust_in_silhouette","busts_in_silhouette","speech_balloon","thought_balloon","feelsgood","finnadie","goberserk","godmode","hurtrealbad","rage1","rage2","rage3","rage4","suspect","trollface"] + }, + { + "category" :"Nature", + "list" : ["sunny","umbrella","cloud","snowflake","snowman","zap","cyclone","foggy","ocean","cat","dog","mouse","hamster","rabbit","wolf","frog","tiger","koala","bear","pig","pig_nose","cow","boar","monkey_face","monkey","horse","racehorse","camel","sheep","elephant","panda_face","snake","bird","baby_chick","hatched_chick","hatching_chick","chicken","penguin","turtle","bug","honeybee","ant","beetle","snail","octopus","tropical_fish","fish","whale","whale2","dolphin","cow2","ram","rat","water_buffalo","tiger2","rabbit2","dragon","goat","rooster","dog2","pig2","mouse2","ox","dragon_face","blowfish","crocodile","dromedary_camel","leopard","cat2","poodle","paw_prints","bouquet","cherry_blossom","tulip","four_leaf_clover","rose","sunflower","hibiscus","maple_leaf","leaves","fallen_leaf","herb","mushroom","cactus","palm_tree","evergreen_tree","deciduous_tree","chestnut","seedling","blossom","ear_of_rice","shell","globe_with_meridians","sun_with_face","full_moon_with_face","new_moon_with_face","new_moon","waxing_crescent_moon","first_quarter_moon","waxing_gibbous_moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","last_quarter_moon_with_face","first_quarter_moon_with_face","moon","earth_africa","earth_americas","earth_asia","volcano","milky_way","partly_sunny","octocat","squirrel"] + }, + { + "category" :"Objects", + "list" : ["bamboo","gift_heart","dolls","school_satchel","mortar_board","flags","fireworks","sparkler","wind_chime","rice_scene","jack_o_lantern","ghost","santa","christmas_tree","gift","bell","no_bell","tanabata_tree","tada","confetti_ball","balloon","crystal_ball","cd","dvd","floppy_disk","camera","video_camera","movie_camera","computer","tv","iphone","phone","telephone","telephone_receiver","pager","fax","minidisc","vhs","sound","speaker","mute","loudspeaker","mega","hourglass","hourglass_flowing_sand","alarm_clock","watch","radio","satellite","loop","mag","mag_right","unlock","lock","lock_with_ink_pen","closed_lock_with_key","key","bulb","flashlight","high_brightness","low_brightness","electric_plug","battery","calling","email","mailbox","postbox","bath","bathtub","shower","toilet","wrench","nut_and_bolt","hammer","seat","moneybag","yen","dollar","pound","euro","credit_card","money_with_wings","e-mail","inbox_tray","outbox_tray","envelope","incoming_envelope","postal_horn","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","package","door","smoking","bomb","gun","hocho","pill","syringe","page_facing_up","page_with_curl","bookmark_tabs","bar_chart","chart_with_upwards_trend","chart_with_downwards_trend","scroll","clipboard","calendar","date","card_index","file_folder","open_file_folder","scissors","pushpin","paperclip","black_nib","pencil2","straight_ruler","triangular_ruler","closed_book","green_book","blue_book","orange_book","notebook","notebook_with_decorative_cover","ledger","books","bookmark","name_badge","microscope","telescope","newspaper","football","basketball","soccer","baseball","tennis","8ball","rugby_football","bowling","golf","mountain_bicyclist","bicyclist","horse_racing","snowboarder","swimmer","surfer","ski","spades","hearts","clubs","diamonds","gem","ring","trophy","musical_score","musical_keyboard","violin","space_invader","video_game","black_joker","flower_playing_cards","game_die","dart","mahjong","clapper","memo","pencil","book","art","microphone","headphones","trumpet","saxophone","guitar","shoe","sandal","high_heel","lipstick","boot","shirt","tshirt","necktie","womans_clothes","dress","running_shirt_with_sash","jeans","kimono","bikini","ribbon","tophat","crown","womans_hat","mans_shoe","closed_umbrella","briefcase","handbag","pouch","purse","eyeglasses","fishing_pole_and_fish","coffee","tea","sake","baby_bottle","beer","beers","cocktail","tropical_drink","wine_glass","fork_and_knife","pizza","hamburger","fries","poultry_leg","meat_on_bone","spaghetti","curry","fried_shrimp","bento","sushi","fish_cake","rice_ball","rice_cracker","rice","ramen","stew","oden","dango","egg","bread","doughnut","custard","icecream","ice_cream","shaved_ice","birthday","cake","cookie","chocolate_bar","candy","lollipop","honey_pot","apple","green_apple","tangerine","lemon","cherries","grapes","watermelon","strawberry","peach","melon","banana","pear","pineapple","sweet_potato","eggplant","tomato","corn"] + }, + { + "category" :"Places", + "list" : ["house","house_with_garden","school","office","post_office","hospital","bank","convenience_store","love_hotel","hotel","wedding","church","department_store","european_post_office","city_sunrise","city_sunset","japanese_castle","european_castle","tent","factory","tokyo_tower","japan","mount_fuji","sunrise_over_mountains","sunrise","stars","statue_of_liberty","bridge_at_night","carousel_horse","rainbow","ferris_wheel","fountain","roller_coaster","ship","speedboat","boat","sailboat","rowboat","anchor","rocket","airplane","helicopter","steam_locomotive","tram","mountain_railway","bike","aerial_tramway","suspension_railway","mountain_cableway","tractor","blue_car","oncoming_automobile","car","red_car","taxi","oncoming_taxi","articulated_lorry","bus","oncoming_bus","rotating_light","police_car","oncoming_police_car","fire_engine","ambulance","minibus","truck","train","station","train2","bullettrain_front","bullettrain_side","light_rail","monorail","railway_car","trolleybus","ticket","fuelpump","vertical_traffic_light","traffic_light","warning","construction","beginner","atm","slot_machine","busstop","barber","hotsprings","checkered_flag","crossed_flags","izakaya_lantern","moyai","circus_tent","performing_arts","round_pushpin","triangular_flag_on_post","jp","kr","cn","us","fr","es","it","ru","gb","uk","de"] + }, + { + "category" :"Symbols", + "list" : ["one","two","three","four","five","six","seven","eight","nine","keycap_ten","1234","zero","hash","symbols","arrow_backward","arrow_down","arrow_forward","arrow_left","capital_abcd","abcd","abc","arrow_lower_left","arrow_lower_right","arrow_right","arrow_up","arrow_upper_left","arrow_upper_right","arrow_double_down","arrow_double_up","arrow_down_small","arrow_heading_down","arrow_heading_up","leftwards_arrow_with_hook","arrow_right_hook","left_right_arrow","arrow_up_down","arrow_up_small","arrows_clockwise","arrows_counterclockwise","rewind","fast_forward","information_source","ok","twisted_rightwards_arrows","repeat","repeat_one","new","top","up","cool","free","ng","cinema","koko","signal_strength","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7a7a","u7981","sa","restroom","mens","womens","baby_symbol","no_smoking","parking","wheelchair","metro","baggage_claim","accept","wc","potable_water","put_litter_in_its_place","secret","congratulations","m","passport_control","left_luggage","customs","ideograph_advantage","cl","sos","id","no_entry_sign","underage","no_mobile_phones","do_not_litter","non-potable_water","no_bicycles","no_pedestrians","children_crossing","no_entry","eight_spoked_asterisk","sparkle","eight_pointed_black_star","heart_decoration","vs","vibration_mode","mobile_phone_off","chart","currency_exchange","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","six_pointed_star","negative_squared_cross_mark","a","b","ab","o2","diamond_shape_with_a_dot_inside","recycle","end","back","on","soon","clock1","clock130","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","heavy_dollar_sign","copyright","registered","tm","x","heavy_exclamation_mark","bangbang","interrobang","o","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","white_flower","100","heavy_check_mark","ballot_box_with_check","radio_button","link","curly_loop","wavy_dash","part_alternation_mark","trident","black_small_square","white_small_square","black_medium_small_square","white_medium_small_square","black_medium_square","white_medium_square","black_large_square","white_large_square","white_check_mark","black_square_button","white_square_button","black_circle","white_circle","red_circle","large_blue_circle","large_blue_diamond","large_orange_diamond","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","shipit"] + } + ], + + "twemoji" : ["1f004","1f0cf","1f170","1f171","1f17e","1f17f","1f18e","1f191","1f192","1f193","1f194","1f195","1f196","1f197","1f198","1f199","1f19a","1f1e6","1f1e7","1f1e8-1f1f3","1f1e8","1f1e9-1f1ea","1f1e9","1f1ea-1f1f8","1f1ea","1f1eb-1f1f7","1f1eb","1f1ec-1f1e7","1f1ec","1f1ed","1f1ee-1f1f9","1f1ee","1f1ef-1f1f5","1f1ef","1f1f0-1f1f7","1f1f0","1f1f1","1f1f2","1f1f3","1f1f4","1f1f5","1f1f6","1f1f7-1f1fa","1f1f7","1f1f8","1f1f9","1f1fa-1f1f8","1f1fa","1f1fb","1f1fc","1f1fd","1f1fe","1f1ff","1f201","1f202","1f21a","1f22f","1f232","1f233","1f234","1f235","1f236","1f237","1f238","1f239","1f23a","1f250","1f251","1f300","1f301","1f302","1f303","1f304","1f305","1f306","1f307","1f308","1f309","1f30a","1f30b","1f30c","1f30d","1f30e","1f30f","1f310","1f311","1f312","1f313","1f314","1f315","1f316","1f317","1f318","1f319","1f31a","1f31b","1f31c","1f31d","1f31e","1f31f","1f320","1f330","1f331","1f332","1f333","1f334","1f335","1f337","1f338","1f339","1f33a","1f33b","1f33c","1f33d","1f33e","1f33f","1f340","1f341","1f342","1f343","1f344","1f345","1f346","1f347","1f348","1f349","1f34a","1f34b","1f34c","1f34d","1f34e","1f34f","1f350","1f351","1f352","1f353","1f354","1f355","1f356","1f357","1f358","1f359","1f35a","1f35b","1f35c","1f35d","1f35e","1f35f","1f360","1f361","1f362","1f363","1f364","1f365","1f366","1f367","1f368","1f369","1f36a","1f36b","1f36c","1f36d","1f36e","1f36f","1f370","1f371","1f372","1f373","1f374","1f375","1f376","1f377","1f378","1f379","1f37a","1f37b","1f37c","1f380","1f381","1f382","1f383","1f384","1f385","1f386","1f387","1f388","1f389","1f38a","1f38b","1f38c","1f38d","1f38e","1f38f","1f390","1f391","1f392","1f393","1f3a0","1f3a1","1f3a2","1f3a3","1f3a4","1f3a5","1f3a6","1f3a7","1f3a8","1f3a9","1f3aa","1f3ab","1f3ac","1f3ad","1f3ae","1f3af","1f3b0","1f3b1","1f3b2","1f3b3","1f3b4","1f3b5","1f3b6","1f3b7","1f3b8","1f3b9","1f3ba","1f3bb","1f3bc","1f3bd","1f3be","1f3bf","1f3c0","1f3c1","1f3c2","1f3c3","1f3c4","1f3c6","1f3c7","1f3c8","1f3c9","1f3ca","1f3e0","1f3e1","1f3e2","1f3e3","1f3e4","1f3e5","1f3e6","1f3e7","1f3e8","1f3e9","1f3ea","1f3eb","1f3ec","1f3ed","1f3ee","1f3ef","1f3f0","1f400","1f401","1f402","1f403","1f404","1f405","1f406","1f407","1f408","1f409","1f40a","1f40b","1f40c","1f40d","1f40e","1f40f","1f410","1f411","1f412","1f413","1f414","1f415","1f416","1f417","1f418","1f419","1f41a","1f41b","1f41c","1f41d","1f41e","1f41f","1f420","1f421","1f422","1f423","1f424","1f425","1f426","1f427","1f428","1f429","1f42a","1f42b","1f42c","1f42d","1f42e","1f42f","1f430","1f431","1f432","1f433","1f434","1f435","1f436","1f437","1f438","1f439","1f43a","1f43b","1f43c","1f43d","1f43e","1f440","1f442","1f443","1f444","1f445","1f446","1f447","1f448","1f449","1f44a","1f44b","1f44c","1f44d","1f44e","1f44f","1f450","1f451","1f452","1f453","1f454","1f455","1f456","1f457","1f458","1f459","1f45a","1f45b","1f45c","1f45d","1f45e","1f45f","1f460","1f461","1f462","1f463","1f464","1f465","1f466","1f467","1f468","1f469","1f46a","1f46b","1f46c","1f46d","1f46e","1f46f","1f470","1f471","1f472","1f473","1f474","1f475","1f476","1f477","1f478","1f479","1f47a","1f47b","1f47c","1f47d","1f47e","1f47f","1f480","1f481","1f482","1f483","1f484","1f485","1f486","1f487","1f488","1f489","1f48a","1f48b","1f48c","1f48d","1f48e","1f48f","1f490","1f491","1f492","1f493","1f494","1f495","1f496","1f497","1f498","1f499","1f49a","1f49b","1f49c","1f49d","1f49e","1f49f","1f4a0","1f4a1","1f4a2","1f4a3","1f4a4","1f4a5","1f4a6","1f4a7","1f4a8","1f4a9","1f4aa","1f4ab","1f4ac","1f4ad","1f4ae","1f4af","1f4b0","1f4b1","1f4b2","1f4b3","1f4b4","1f4b5","1f4b6","1f4b7","1f4b8","1f4b9","1f4ba","1f4bb","1f4bc","1f4bd","1f4be","1f4bf","1f4c0","1f4c1","1f4c2","1f4c3","1f4c4","1f4c5","1f4c6","1f4c7","1f4c8","1f4c9","1f4ca","1f4cb","1f4cc","1f4cd","1f4ce","1f4cf","1f4d0","1f4d1","1f4d2","1f4d3","1f4d4","1f4d5","1f4d6","1f4d7","1f4d8","1f4d9","1f4da","1f4db","1f4dc","1f4dd","1f4de","1f4df","1f4e0","1f4e1","1f4e2","1f4e3","1f4e4","1f4e5","1f4e6","1f4e7","1f4e8","1f4e9","1f4ea","1f4eb","1f4ec","1f4ed","1f4ee","1f4ef","1f4f0","1f4f1","1f4f2","1f4f3","1f4f4","1f4f5","1f4f6","1f4f7","1f4f9","1f4fa","1f4fb","1f4fc","1f500","1f501","1f502","1f503","1f504","1f505","1f506","1f507","1f508","1f509","1f50a","1f50b","1f50c","1f50d","1f50e","1f50f","1f510","1f511","1f512","1f513","1f514","1f515","1f516","1f517","1f518","1f519","1f51a","1f51b","1f51c","1f51d","1f51e","1f51f","1f520","1f521","1f522","1f523","1f524","1f525","1f526","1f527","1f528","1f529","1f52a","1f52b","1f52c","1f52d","1f52e","1f52f","1f530","1f531","1f532","1f533","1f534","1f535","1f536","1f537","1f538","1f539","1f53a","1f53b","1f53c","1f53d","1f550","1f551","1f552","1f553","1f554","1f555","1f556","1f557","1f558","1f559","1f55a","1f55b","1f55c","1f55d","1f55e","1f55f","1f560","1f561","1f562","1f563","1f564","1f565","1f566","1f567","1f5fb","1f5fc","1f5fd","1f5fe","1f5ff","1f600","1f601","1f602","1f603","1f604","1f605","1f606","1f607","1f608","1f609","1f60a","1f60b","1f60c","1f60d","1f60e","1f60f","1f610","1f611","1f612","1f613","1f614","1f615","1f616","1f617","1f618","1f619","1f61a","1f61b","1f61c","1f61d","1f61e","1f61f","1f620","1f621","1f622","1f623","1f624","1f625","1f626","1f627","1f628","1f629","1f62a","1f62b","1f62c","1f62d","1f62e","1f62f","1f630","1f631","1f632","1f633","1f634","1f635","1f636","1f637","1f638","1f639","1f63a","1f63b","1f63c","1f63d","1f63e","1f63f","1f640","1f645","1f646","1f647","1f648","1f649","1f64a","1f64b","1f64c","1f64d","1f64e","1f64f","1f680","1f681","1f682","1f683","1f684","1f685","1f686","1f687","1f688","1f689","1f68a","1f68b","1f68c","1f68d","1f68e","1f68f","1f690","1f691","1f692","1f693","1f694","1f695","1f696","1f697","1f698","1f699","1f69a","1f69b","1f69c","1f69d","1f69e","1f69f","1f6a0","1f6a1","1f6a2","1f6a3","1f6a4","1f6a5","1f6a6","1f6a7","1f6a8","1f6a9","1f6aa","1f6ab","1f6ac","1f6ad","1f6ae","1f6af","1f6b0","1f6b1","1f6b2","1f6b3","1f6b4","1f6b5","1f6b6","1f6b7","1f6b8","1f6b9","1f6ba","1f6bb","1f6bc","1f6bd","1f6be","1f6bf","1f6c0","1f6c1","1f6c2","1f6c3","1f6c4","1f6c5","203c","2049","2122","2139","2194","2195","2196","2197","2198","2199","21a9","21aa","23-20e3","231a","231b","23e9","23ea","23eb","23ec","23f0","23f3","24c2","25aa","25ab","25b6","25c0","25fb","25fc","25fd","25fe","2600","2601","260e","2611","2614","2615","261d","263a","2648","2649","264a","264b","264c","264d","264e","264f","2650","2651","2652","2653","2660","2663","2665","2666","2668","267b","267f","2693","26a0","26a1","26aa","26ab","26bd","26be","26c4","26c5","26ce","26d4","26ea","26f2","26f3","26f5","26fa","26fd","2702","2705","2708","2709","270a","270b","270c","270f","2712","2714","2716","2728","2733","2734","2744","2747","274c","274e","2753","2754","2755","2757","2764","2795","2796","2797","27a1","27b0","27bf","2934","2935","2b05","2b06","2b07","2b1b","2b1c","2b50","2b55","30-20e3","3030","303d","31-20e3","32-20e3","3297","3299","33-20e3","34-20e3","35-20e3","36-20e3","37-20e3","38-20e3","39-20e3","a9","ae","e50a"], + + "font-awesome" : ["glass","music","search","envelope-o","heart","star","star-o","user","film","th-large","th","th-list","check","times","search-plus","search-minus","power-off","signal","cog","trash-o","home","file-o","clock-o","road","download","arrow-circle-o-down","arrow-circle-o-up","inbox","play-circle-o","repeat","refresh","list-alt","lock","flag","headphones","volume-off","volume-down","volume-up","qrcode","barcode","tag","tags","book","bookmark","print","camera","font","bold","italic","text-height","text-width","align-left","align-center","align-right","align-justify","list","outdent","indent","video-camera","picture-o","pencil","map-marker","adjust","tint","pencil-square-o","share-square-o","check-square-o","arrows","step-backward","fast-backward","backward","play","pause","stop","forward","fast-forward","step-forward","eject","chevron-left","chevron-right","plus-circle","minus-circle","times-circle","check-circle","question-circle","info-circle","crosshairs","times-circle-o","check-circle-o","ban","arrow-left","arrow-right","arrow-up","arrow-down","share","expand","compress","plus","minus","asterisk","exclamation-circle","gift","leaf","fire","eye","eye-slash","exclamation-triangle","plane","calendar","random","comment","magnet","chevron-up","chevron-down","retweet","shopping-cart","folder","folder-open","arrows-v","arrows-h","bar-chart","twitter-square","facebook-square","camera-retro","key","cogs","comments","thumbs-o-up","thumbs-o-down","star-half","heart-o","sign-out","linkedin-square","thumb-tack","external-link","sign-in","trophy","github-square","upload","lemon-o","phone","square-o","bookmark-o","phone-square","twitter","facebook","github","unlock","credit-card","rss","hdd-o","bullhorn","bell","certificate","hand-o-right","hand-o-left","hand-o-up","hand-o-down","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-circle-down","globe","wrench","tasks","filter","briefcase","arrows-alt","users","link","cloud","flask","scissors","files-o","paperclip","floppy-o","square","bars","list-ul","list-ol","strikethrough","underline","table","magic","truck","pinterest","pinterest-square","google-plus-square","google-plus","money","caret-down","caret-up","caret-left","caret-right","columns","sort","sort-desc","sort-asc","envelope","linkedin","undo","gavel","tachometer","comment-o","comments-o","bolt","sitemap","umbrella","clipboard","lightbulb-o","exchange","cloud-download","cloud-upload","user-md","stethoscope","suitcase","bell-o","coffee","cutlery","file-text-o","building-o","hospital-o","ambulance","medkit","fighter-jet","beer","h-square","plus-square","angle-double-left","angle-double-right","angle-double-up","angle-double-down","angle-left","angle-right","angle-up","angle-down","desktop","laptop","tablet","mobile","circle-o","quote-left","quote-right","spinner","circle","reply","github-alt","folder-o","folder-open-o","smile-o","frown-o","meh-o","gamepad","keyboard-o","flag-o","flag-checkered","terminal","code","reply-all","star-half-o","location-arrow","crop","code-fork","chain-broken","question","info","exclamation","superscript","subscript","eraser","puzzle-piece","microphone","microphone-slash","shield","calendar-o","fire-extinguisher","rocket","maxcdn","chevron-circle-left","chevron-circle-right","chevron-circle-up","chevron-circle-down","html5","css3","anchor","unlock-alt","bullseye","ellipsis-h","ellipsis-v","rss-square","play-circle","ticket","minus-square","minus-square-o","level-up","level-down","check-square","pencil-square","share-square","compass","caret-square-o-down","caret-square-o-up","caret-square-o-right","eur","gbp","usd","inr","jpy","rub","krw","btc","file","file-text","sort-alpha-asc","sort-alpha-desc","sort-amount-asc","sort-amount-desc","sort-numeric-asc","sort-numeric-desc","thumbs-up","thumbs-down","youtube-square","youtube","xing","xing-square","youtube-play","dropbox","stack-overflow","instagram","flickr","adn","bitbucket","bitbucket-square","tumblr","tumblr-square","long-arrow-down","long-arrow-up","long-arrow-left","long-arrow-right","apple","windows","android","linux","dribbble","skype","foursquare","trello","female","male","gratipay","sun-o","moon-o","archive","bug","vk","weibo","renren","pagelines","stack-exchange","arrow-circle-o-right","arrow-circle-o-left","caret-square-o-left","dot-circle-o","wheelchair","vimeo-square","try","plus-square-o","space-shuttle","slack","envelope-square","wordpress","openid","university","graduation-cap","yahoo","google","reddit","reddit-square","stumbleupon-circle","stumbleupon","delicious","digg","pied-piper","pied-piper-alt","drupal","joomla","language","fax","building","child","paw","spoon","cube","cubes","behance","behance-square","steam","steam-square","recycle","car","taxi","tree","spotify","deviantart","soundcloud","database","file-pdf-o","file-word-o","file-excel-o","file-powerpoint-o","file-image-o","file-archive-o","file-audio-o","file-video-o","file-code-o","vine","codepen","jsfiddle","life-ring","circle-o-notch","rebel","empire","git-square","git","hacker-news","tencent-weibo","qq","weixin","paper-plane","paper-plane-o","history","circle-thin","header","paragraph","sliders","share-alt","share-alt-square","bomb","futbol-o","tty","binoculars","plug","slideshare","twitch","yelp","newspaper-o","wifi","calculator","paypal","google-wallet","cc-visa","cc-mastercard","cc-discover","cc-amex","cc-paypal","cc-stripe","bell-slash","bell-slash-o","trash","copyright","at","eyedropper","paint-brush","birthday-cake","area-chart","pie-chart","line-chart","lastfm","lastfm-square","toggle-off","toggle-on","bicycle","bus","ioxhost","angellist","cc","ils","meanpath","buysellads","connectdevelop","dashcube","forumbee","leanpub","sellsy","shirtsinbulk","simplybuilt","skyatlas","cart-plus","cart-arrow-down","diamond","ship","user-secret","motorcycle","street-view","heartbeat","venus","mars","mercury","transgender","transgender-alt","venus-double","mars-double","venus-mars","mars-stroke","mars-stroke-v","mars-stroke-h","neuter","facebook-official","pinterest-p","whatsapp","server","user-plus","user-times","bed","viacoin","train","subway","medium","GitHub","bed","buysellads","cart-arrow-down","cart-plus","connectdevelop","dashcube","diamond","facebook-official","forumbee","heartbeat","hotel","leanpub","mars","mars-double","mars-stroke","mars-stroke-h","mars-stroke-v","medium","mercury","motorcycle","neuter","pinterest-p","sellsy","server","ship","shirtsinbulk","simplybuilt","skyatlas","street-view","subway","train","transgender","transgender-alt","user-plus","user-secret","user-times","venus","venus-double","venus-mars","viacoin","whatsapp","adjust","anchor","archive","area-chart","arrows","arrows-h","arrows-v","asterisk","at","automobile","ban","bank","bar-chart","bar-chart-o","barcode","bars","bed","beer","bell","bell-o","bell-slash","bell-slash-o","bicycle","binoculars","birthday-cake","bolt","bomb","book","bookmark","bookmark-o","briefcase","bug","building","building-o","bullhorn","bullseye","bus","cab","calculator","calendar","calendar-o","camera","camera-retro","car","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","cart-arrow-down","cart-plus","cc","certificate","check","check-circle","check-circle-o","check-square","check-square-o","child","circle","circle-o","circle-o-notch","circle-thin","clock-o","close","cloud","cloud-download","cloud-upload","code","code-fork","coffee","cog","cogs","comment","comment-o","comments","comments-o","compass","copyright","credit-card","crop","crosshairs","cube","cubes","cutlery","dashboard","database","desktop","diamond","dot-circle-o","download","edit","ellipsis-h","ellipsis-v","envelope","envelope-o","envelope-square","eraser","exchange","exclamation","exclamation-circle","exclamation-triangle","external-link","external-link-square","eye","eye-slash","eyedropper","fax","female","fighter-jet","file-archive-o","file-audio-o","file-code-o","file-excel-o","file-image-o","file-movie-o","file-pdf-o","file-photo-o","file-picture-o","file-powerpoint-o","file-sound-o","file-video-o","file-word-o","file-zip-o","film","filter","fire","fire-extinguisher","flag","flag-checkered","flag-o","flash","flask","folder","folder-o","folder-open","folder-open-o","frown-o","futbol-o","gamepad","gavel","gear","gears","genderless","gift","glass","globe","graduation-cap","group","hdd-o","headphones","heart","heart-o","heartbeat","history","home","hotel","image","inbox","info","info-circle","institution","key","keyboard-o","language","laptop","leaf","legal","lemon-o","level-down","level-up","life-bouy","life-buoy","life-ring","life-saver","lightbulb-o","line-chart","location-arrow","lock","magic","magnet","mail-forward","mail-reply","mail-reply-all","male","map-marker","meh-o","microphone","microphone-slash","minus","minus-circle","minus-square","minus-square-o","mobile","mobile-phone","money","moon-o","mortar-board","motorcycle","music","navicon","newspaper-o","paint-brush","paper-plane","paper-plane-o","paw","pencil","pencil-square","pencil-square-o","phone","phone-square","photo","picture-o","pie-chart","plane","plug","plus","plus-circle","plus-square","plus-square-o","power-off","print","puzzle-piece","qrcode","question","question-circle","quote-left","quote-right","random","recycle","refresh","remove","reorder","reply","reply-all","retweet","road","rocket","rss","rss-square","search","search-minus","search-plus","send","send-o","server","share","share-alt","share-alt-square","share-square","share-square-o","shield","ship","shopping-cart","sign-in","sign-out","signal","sitemap","sliders","smile-o","soccer-ball-o","sort","sort-alpha-asc","sort-alpha-desc","sort-amount-asc","sort-amount-desc","sort-asc","sort-desc","sort-down","sort-numeric-asc","sort-numeric-desc","sort-up","space-shuttle","spinner","spoon","square","square-o","star","star-half","star-half-empty","star-half-full","star-half-o","star-o","street-view","suitcase","sun-o","support","tablet","tachometer","tag","tags","tasks","taxi","terminal","thumb-tack","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up","ticket","times","times-circle","times-circle-o","tint","toggle-down","toggle-left","toggle-off","toggle-on","toggle-right","toggle-up","trash","trash-o","tree","trophy","truck","tty","umbrella","university","unlock","unlock-alt","unsorted","upload","user","user-plus","user-secret","user-times","users","video-camera","volume-down","volume-off","volume-up","warning","wheelchair","wifi","wrench","ambulance","automobile","bicycle","bus","cab","car","fighter-jet","motorcycle","plane","rocket","ship","space-shuttle","subway","taxi","train","truck","wheelchair","circle-thin","genderless","mars","mars-double","mars-stroke","mars-stroke-h","mars-stroke-v","mercury","neuter","transgender","transgender-alt","venus","venus-double","venus-mars","file","file-archive-o","file-audio-o","file-code-o","file-excel-o","file-image-o","file-movie-o","file-o","file-pdf-o","file-photo-o","file-picture-o","file-powerpoint-o","file-sound-o","file-text","file-text-o","file-video-o","file-word-o","file-zip-o","circle-o-notch","cog","gear","refresh","spinner","check-square","check-square-o","circle","circle-o","dot-circle-o","minus-square","minus-square-o","plus-square","plus-square-o","square","square-o","cc-amex","cc-discover","cc-mastercard","cc-paypal","cc-stripe","cc-visa","credit-card","google-wallet","paypal","area-chart","bar-chart","bar-chart-o","line-chart","pie-chart","bitcoin","btc","cny","dollar","eur","euro","gbp","ils","inr","jpy","krw","money","rmb","rouble","rub","ruble","rupee","shekel","sheqel","try","turkish-lira","usd","won","yen","align-center","align-justify","align-left","align-right","bold","chain","chain-broken","clipboard","columns","copy","cut","dedent","eraser","file","file-o","file-text","file-text-o","files-o","floppy-o","font","header","indent","italic","link","list","list-alt","list-ol","list-ul","outdent","paperclip","paragraph","paste","repeat","rotate-left","rotate-right","save","scissors","strikethrough","subscript","superscript","table","text-height","text-width","th","th-large","th-list","underline","undo","unlink","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-right","angle-up","arrow-circle-down","arrow-circle-left","arrow-circle-o-down","arrow-circle-o-left","arrow-circle-o-right","arrow-circle-o-up","arrow-circle-right","arrow-circle-up","arrow-down","arrow-left","arrow-right","arrow-up","arrows","arrows-alt","arrows-h","arrows-v","caret-down","caret-left","caret-right","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","caret-up","chevron-circle-down","chevron-circle-left","chevron-circle-right","chevron-circle-up","chevron-down","chevron-left","chevron-right","chevron-up","hand-o-down","hand-o-left","hand-o-right","hand-o-up","long-arrow-down","long-arrow-left","long-arrow-right","long-arrow-up","toggle-down","toggle-left","toggle-right","toggle-up","arrows-alt","backward","compress","eject","expand","fast-backward","fast-forward","forward","pause","play","play-circle","play-circle-o","step-backward","step-forward","stop","youtube-play","report an issue with Adblock Plus","adn","android","angellist","apple","behance","behance-square","bitbucket","bitbucket-square","bitcoin","btc","buysellads","cc-amex","cc-discover","cc-mastercard","cc-paypal","cc-stripe","cc-visa","codepen","connectdevelop","css3","dashcube","delicious","deviantart","digg","dribbble","dropbox","drupal","empire","facebook","facebook-f","facebook-official","facebook-square","flickr","forumbee","foursquare","ge","git","git-square","github","github-alt","github-square","gittip","google","google-plus","google-plus-square","google-wallet","gratipay","hacker-news","html5","instagram","ioxhost","joomla","jsfiddle","lastfm","lastfm-square","leanpub","linkedin","linkedin-square","linux","maxcdn","meanpath","medium","openid","pagelines","paypal","pied-piper","pied-piper-alt","pinterest","pinterest-p","pinterest-square","qq","ra","rebel","reddit","reddit-square","renren","sellsy","share-alt","share-alt-square","shirtsinbulk","simplybuilt","skyatlas","skype","slack","slideshare","soundcloud","spotify","stack-exchange","stack-overflow","steam","steam-square","stumbleupon","stumbleupon-circle","tencent-weibo","trello","tumblr","tumblr-square","twitch","twitter","twitter-square","viacoin","vimeo-square","vine","vk","wechat","weibo","weixin","whatsapp","windows","wordpress","xing","xing-square","yahoo","yelp","youtube","youtube-play","youtube-square","ambulance","h-square","heart","heart-o","heartbeat","hospital-o","medkit","plus-square","stethoscope","user-md","wheelchair"] +} \ No newline at end of file diff --git a/static/editor.md/plugins/emoji-dialog/emoji/+1.png b/static/editor.md/plugins/emoji-dialog/emoji/+1.png new file mode 100644 index 0000000..81786c1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/+1.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/-1.png b/static/editor.md/plugins/emoji-dialog/emoji/-1.png new file mode 100644 index 0000000..41c6b82 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/-1.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/100.png b/static/editor.md/plugins/emoji-dialog/emoji/100.png new file mode 100644 index 0000000..ca3bb9b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/100.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/109.png b/static/editor.md/plugins/emoji-dialog/emoji/109.png new file mode 100644 index 0000000..74b9d5d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/109.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/1234.png b/static/editor.md/plugins/emoji-dialog/emoji/1234.png new file mode 100644 index 0000000..c47c2e1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/1234.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/8ball.png b/static/editor.md/plugins/emoji-dialog/emoji/8ball.png new file mode 100644 index 0000000..c2c710d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/8ball.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/a.png b/static/editor.md/plugins/emoji-dialog/emoji/a.png new file mode 100644 index 0000000..09ff6d6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/a.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ab.png b/static/editor.md/plugins/emoji-dialog/emoji/ab.png new file mode 100644 index 0000000..2a52220 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ab.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/abc.png b/static/editor.md/plugins/emoji-dialog/emoji/abc.png new file mode 100644 index 0000000..505d40a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/abc.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/abcd.png b/static/editor.md/plugins/emoji-dialog/emoji/abcd.png new file mode 100644 index 0000000..5218470 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/abcd.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/accept.png b/static/editor.md/plugins/emoji-dialog/emoji/accept.png new file mode 100644 index 0000000..2d20090 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/accept.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/aerial_tramway.png b/static/editor.md/plugins/emoji-dialog/emoji/aerial_tramway.png new file mode 100644 index 0000000..38f6dfe Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/aerial_tramway.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/airplane.png b/static/editor.md/plugins/emoji-dialog/emoji/airplane.png new file mode 100644 index 0000000..8407cb6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/airplane.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/alarm_clock.png b/static/editor.md/plugins/emoji-dialog/emoji/alarm_clock.png new file mode 100644 index 0000000..86ca8c8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/alarm_clock.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/alien.png b/static/editor.md/plugins/emoji-dialog/emoji/alien.png new file mode 100644 index 0000000..416de47 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/alien.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ambulance.png b/static/editor.md/plugins/emoji-dialog/emoji/ambulance.png new file mode 100644 index 0000000..b740f45 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ambulance.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/anchor.png b/static/editor.md/plugins/emoji-dialog/emoji/anchor.png new file mode 100644 index 0000000..0c5192e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/anchor.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/angel.png b/static/editor.md/plugins/emoji-dialog/emoji/angel.png new file mode 100644 index 0000000..da52c31 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/angel.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/anger.png b/static/editor.md/plugins/emoji-dialog/emoji/anger.png new file mode 100644 index 0000000..6fb4dca Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/anger.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/angry.png b/static/editor.md/plugins/emoji-dialog/emoji/angry.png new file mode 100644 index 0000000..f95bfa8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/angry.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/anguished.png b/static/editor.md/plugins/emoji-dialog/emoji/anguished.png new file mode 100644 index 0000000..c625947 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/anguished.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ant.png b/static/editor.md/plugins/emoji-dialog/emoji/ant.png new file mode 100644 index 0000000..b92d1cc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ant.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/apple.png b/static/editor.md/plugins/emoji-dialog/emoji/apple.png new file mode 100644 index 0000000..08aa17b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/apple.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/aquarius.png b/static/editor.md/plugins/emoji-dialog/emoji/aquarius.png new file mode 100644 index 0000000..cbff66e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/aquarius.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/aries.png b/static/editor.md/plugins/emoji-dialog/emoji/aries.png new file mode 100644 index 0000000..aab5e88 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/aries.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_backward.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_backward.png new file mode 100644 index 0000000..0886218 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_backward.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_double_down.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_double_down.png new file mode 100644 index 0000000..2ecbebc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_double_down.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_double_up.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_double_up.png new file mode 100644 index 0000000..d42979d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_double_up.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_down.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_down.png new file mode 100644 index 0000000..e6702f0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_down.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_down_small.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_down_small.png new file mode 100644 index 0000000..22d383a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_down_small.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_forward.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_forward.png new file mode 100644 index 0000000..fbfe711 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_forward.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_heading_down.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_heading_down.png new file mode 100644 index 0000000..56dd3b9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_heading_down.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_heading_up.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_heading_up.png new file mode 100644 index 0000000..c8f670a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_heading_up.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_left.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_left.png new file mode 100644 index 0000000..d64ac61 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_left.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_lower_left.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_lower_left.png new file mode 100644 index 0000000..55fb03c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_lower_left.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_lower_right.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_lower_right.png new file mode 100644 index 0000000..da8fb82 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_lower_right.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_right.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_right.png new file mode 100644 index 0000000..6d483b5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_right.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_right_hook.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_right_hook.png new file mode 100644 index 0000000..8b4ea6e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_right_hook.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_up.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_up.png new file mode 100644 index 0000000..b5b0688 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_up.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_up_down.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_up_down.png new file mode 100644 index 0000000..b718c21 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_up_down.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_up_small.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_up_small.png new file mode 100644 index 0000000..3f40bfb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_up_small.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_upper_left.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_upper_left.png new file mode 100644 index 0000000..2950ae2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_upper_left.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrow_upper_right.png b/static/editor.md/plugins/emoji-dialog/emoji/arrow_upper_right.png new file mode 100644 index 0000000..e23790b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrow_upper_right.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrows_clockwise.png b/static/editor.md/plugins/emoji-dialog/emoji/arrows_clockwise.png new file mode 100644 index 0000000..5f84d7e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrows_clockwise.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/arrows_counterclockwise.png b/static/editor.md/plugins/emoji-dialog/emoji/arrows_counterclockwise.png new file mode 100644 index 0000000..1933ae1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/arrows_counterclockwise.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/art.png b/static/editor.md/plugins/emoji-dialog/emoji/art.png new file mode 100644 index 0000000..d45212b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/art.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/articulated_lorry.png b/static/editor.md/plugins/emoji-dialog/emoji/articulated_lorry.png new file mode 100644 index 0000000..81ec1f9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/articulated_lorry.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/astonished.png b/static/editor.md/plugins/emoji-dialog/emoji/astonished.png new file mode 100644 index 0000000..858a834 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/astonished.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/atm.png b/static/editor.md/plugins/emoji-dialog/emoji/atm.png new file mode 100644 index 0000000..c2846e7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/atm.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/b.png b/static/editor.md/plugins/emoji-dialog/emoji/b.png new file mode 100644 index 0000000..8742b3d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/b.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/baby.png b/static/editor.md/plugins/emoji-dialog/emoji/baby.png new file mode 100644 index 0000000..3b29da4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/baby.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/baby_bottle.png b/static/editor.md/plugins/emoji-dialog/emoji/baby_bottle.png new file mode 100644 index 0000000..1b2cfe5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/baby_bottle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/baby_chick.png b/static/editor.md/plugins/emoji-dialog/emoji/baby_chick.png new file mode 100644 index 0000000..9be8d29 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/baby_chick.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/baby_symbol.png b/static/editor.md/plugins/emoji-dialog/emoji/baby_symbol.png new file mode 100644 index 0000000..2e58725 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/baby_symbol.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/back.png b/static/editor.md/plugins/emoji-dialog/emoji/back.png new file mode 100644 index 0000000..0cde628 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/back.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/baggage_claim.png b/static/editor.md/plugins/emoji-dialog/emoji/baggage_claim.png new file mode 100644 index 0000000..59ae044 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/baggage_claim.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/balloon.png b/static/editor.md/plugins/emoji-dialog/emoji/balloon.png new file mode 100644 index 0000000..0344897 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/balloon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ballot_box_with_check.png b/static/editor.md/plugins/emoji-dialog/emoji/ballot_box_with_check.png new file mode 100644 index 0000000..f07a466 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ballot_box_with_check.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bamboo.png b/static/editor.md/plugins/emoji-dialog/emoji/bamboo.png new file mode 100644 index 0000000..fc858d0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bamboo.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/banana.png b/static/editor.md/plugins/emoji-dialog/emoji/banana.png new file mode 100644 index 0000000..a0563af Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/banana.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bangbang.png b/static/editor.md/plugins/emoji-dialog/emoji/bangbang.png new file mode 100644 index 0000000..7270f0a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bangbang.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bank.png b/static/editor.md/plugins/emoji-dialog/emoji/bank.png new file mode 100644 index 0000000..1faa877 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bank.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bar_chart.png b/static/editor.md/plugins/emoji-dialog/emoji/bar_chart.png new file mode 100644 index 0000000..09d7301 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bar_chart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/barber.png b/static/editor.md/plugins/emoji-dialog/emoji/barber.png new file mode 100644 index 0000000..a10cb23 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/barber.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/baseball.png b/static/editor.md/plugins/emoji-dialog/emoji/baseball.png new file mode 100644 index 0000000..da004e2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/baseball.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/basketball.png b/static/editor.md/plugins/emoji-dialog/emoji/basketball.png new file mode 100644 index 0000000..ef694be Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/basketball.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bath.png b/static/editor.md/plugins/emoji-dialog/emoji/bath.png new file mode 100644 index 0000000..8f75d1d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bath.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bathtub.png b/static/editor.md/plugins/emoji-dialog/emoji/bathtub.png new file mode 100644 index 0000000..1c3f844 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bathtub.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/battery.png b/static/editor.md/plugins/emoji-dialog/emoji/battery.png new file mode 100644 index 0000000..aa7eedc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/battery.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bear.png b/static/editor.md/plugins/emoji-dialog/emoji/bear.png new file mode 100644 index 0000000..f5afe92 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bear.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bee.png b/static/editor.md/plugins/emoji-dialog/emoji/bee.png new file mode 100644 index 0000000..f537339 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bee.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/beer.png b/static/editor.md/plugins/emoji-dialog/emoji/beer.png new file mode 100644 index 0000000..cd78bed Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/beer.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/beers.png b/static/editor.md/plugins/emoji-dialog/emoji/beers.png new file mode 100644 index 0000000..cc5e4ab Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/beers.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/beetle.png b/static/editor.md/plugins/emoji-dialog/emoji/beetle.png new file mode 100644 index 0000000..222577c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/beetle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/beginner.png b/static/editor.md/plugins/emoji-dialog/emoji/beginner.png new file mode 100644 index 0000000..1f022d1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/beginner.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bell.png b/static/editor.md/plugins/emoji-dialog/emoji/bell.png new file mode 100644 index 0000000..69acceb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bell.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bento.png b/static/editor.md/plugins/emoji-dialog/emoji/bento.png new file mode 100644 index 0000000..d680112 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bento.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bicyclist.png b/static/editor.md/plugins/emoji-dialog/emoji/bicyclist.png new file mode 100644 index 0000000..4e3e054 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bicyclist.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bike.png b/static/editor.md/plugins/emoji-dialog/emoji/bike.png new file mode 100644 index 0000000..6573860 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bike.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bikini.png b/static/editor.md/plugins/emoji-dialog/emoji/bikini.png new file mode 100644 index 0000000..4ff63b4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bikini.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bird.png b/static/editor.md/plugins/emoji-dialog/emoji/bird.png new file mode 100644 index 0000000..e6be8c0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bird.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/birthday.png b/static/editor.md/plugins/emoji-dialog/emoji/birthday.png new file mode 100644 index 0000000..36e8edc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/birthday.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/black_circle.png b/static/editor.md/plugins/emoji-dialog/emoji/black_circle.png new file mode 100644 index 0000000..e46f9df Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/black_circle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/black_joker.png b/static/editor.md/plugins/emoji-dialog/emoji/black_joker.png new file mode 100644 index 0000000..4c78f36 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/black_joker.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/black_medium_small_square.png b/static/editor.md/plugins/emoji-dialog/emoji/black_medium_small_square.png new file mode 100644 index 0000000..25bfe9c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/black_medium_small_square.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/black_medium_square.png b/static/editor.md/plugins/emoji-dialog/emoji/black_medium_square.png new file mode 100644 index 0000000..204cce1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/black_medium_square.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/black_nib.png b/static/editor.md/plugins/emoji-dialog/emoji/black_nib.png new file mode 100644 index 0000000..29f6994 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/black_nib.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/black_small_square.png b/static/editor.md/plugins/emoji-dialog/emoji/black_small_square.png new file mode 100644 index 0000000..a247751 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/black_small_square.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/black_square.png b/static/editor.md/plugins/emoji-dialog/emoji/black_square.png new file mode 100644 index 0000000..71da10d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/black_square.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/black_square_button.png b/static/editor.md/plugins/emoji-dialog/emoji/black_square_button.png new file mode 100644 index 0000000..f2597e9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/black_square_button.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/blossom.png b/static/editor.md/plugins/emoji-dialog/emoji/blossom.png new file mode 100644 index 0000000..55a9735 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/blossom.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/blowfish.png b/static/editor.md/plugins/emoji-dialog/emoji/blowfish.png new file mode 100644 index 0000000..d3ad465 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/blowfish.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/blue_book.png b/static/editor.md/plugins/emoji-dialog/emoji/blue_book.png new file mode 100644 index 0000000..e2b9e8c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/blue_book.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/blue_car.png b/static/editor.md/plugins/emoji-dialog/emoji/blue_car.png new file mode 100644 index 0000000..978291e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/blue_car.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/blue_heart.png b/static/editor.md/plugins/emoji-dialog/emoji/blue_heart.png new file mode 100644 index 0000000..baa29b3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/blue_heart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/blush.png b/static/editor.md/plugins/emoji-dialog/emoji/blush.png new file mode 100644 index 0000000..3a95eb6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/blush.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/boar.png b/static/editor.md/plugins/emoji-dialog/emoji/boar.png new file mode 100644 index 0000000..8196ad4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/boar.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/boat.png b/static/editor.md/plugins/emoji-dialog/emoji/boat.png new file mode 100644 index 0000000..ff656dc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/boat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bomb.png b/static/editor.md/plugins/emoji-dialog/emoji/bomb.png new file mode 100644 index 0000000..3289787 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bomb.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/book.png b/static/editor.md/plugins/emoji-dialog/emoji/book.png new file mode 100644 index 0000000..8b69841 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/book.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bookmark.png b/static/editor.md/plugins/emoji-dialog/emoji/bookmark.png new file mode 100644 index 0000000..dbee45c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bookmark.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bookmark_tabs.png b/static/editor.md/plugins/emoji-dialog/emoji/bookmark_tabs.png new file mode 100644 index 0000000..0c4e3bf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bookmark_tabs.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/books.png b/static/editor.md/plugins/emoji-dialog/emoji/books.png new file mode 100644 index 0000000..dca06a1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/books.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/boom.png b/static/editor.md/plugins/emoji-dialog/emoji/boom.png new file mode 100644 index 0000000..bddeb8f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/boom.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/boot.png b/static/editor.md/plugins/emoji-dialog/emoji/boot.png new file mode 100644 index 0000000..58d0fdb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/boot.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bouquet.png b/static/editor.md/plugins/emoji-dialog/emoji/bouquet.png new file mode 100644 index 0000000..ce63783 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bouquet.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bow.png b/static/editor.md/plugins/emoji-dialog/emoji/bow.png new file mode 100644 index 0000000..024cb61 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bow.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bowling.png b/static/editor.md/plugins/emoji-dialog/emoji/bowling.png new file mode 100644 index 0000000..13d8ece Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bowling.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bowtie.png b/static/editor.md/plugins/emoji-dialog/emoji/bowtie.png new file mode 100644 index 0000000..28ff0c7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bowtie.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/boy.png b/static/editor.md/plugins/emoji-dialog/emoji/boy.png new file mode 100644 index 0000000..f79f1f2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/boy.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bread.png b/static/editor.md/plugins/emoji-dialog/emoji/bread.png new file mode 100644 index 0000000..7e7c637 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bread.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bride_with_veil.png b/static/editor.md/plugins/emoji-dialog/emoji/bride_with_veil.png new file mode 100644 index 0000000..dd0b0cf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bride_with_veil.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bridge_at_night.png b/static/editor.md/plugins/emoji-dialog/emoji/bridge_at_night.png new file mode 100644 index 0000000..495b06c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bridge_at_night.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/briefcase.png b/static/editor.md/plugins/emoji-dialog/emoji/briefcase.png new file mode 100644 index 0000000..46e82b0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/briefcase.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/broken_heart.png b/static/editor.md/plugins/emoji-dialog/emoji/broken_heart.png new file mode 100644 index 0000000..a1bc850 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/broken_heart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bug.png b/static/editor.md/plugins/emoji-dialog/emoji/bug.png new file mode 100644 index 0000000..c2eaf7a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bug.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bulb.png b/static/editor.md/plugins/emoji-dialog/emoji/bulb.png new file mode 100644 index 0000000..23afca1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bulb.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bullettrain_front.png b/static/editor.md/plugins/emoji-dialog/emoji/bullettrain_front.png new file mode 100644 index 0000000..16651ac Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bullettrain_front.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bullettrain_side.png b/static/editor.md/plugins/emoji-dialog/emoji/bullettrain_side.png new file mode 100644 index 0000000..8eca368 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bullettrain_side.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bus.png b/static/editor.md/plugins/emoji-dialog/emoji/bus.png new file mode 100644 index 0000000..823aa39 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bus.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/busstop.png b/static/editor.md/plugins/emoji-dialog/emoji/busstop.png new file mode 100644 index 0000000..9489484 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/busstop.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/bust_in_silhouette.png b/static/editor.md/plugins/emoji-dialog/emoji/bust_in_silhouette.png new file mode 100644 index 0000000..d131398 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/bust_in_silhouette.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/busts_in_silhouette.png b/static/editor.md/plugins/emoji-dialog/emoji/busts_in_silhouette.png new file mode 100644 index 0000000..1f3aabc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/busts_in_silhouette.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cactus.png b/static/editor.md/plugins/emoji-dialog/emoji/cactus.png new file mode 100644 index 0000000..5a2c3cc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cactus.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cake.png b/static/editor.md/plugins/emoji-dialog/emoji/cake.png new file mode 100644 index 0000000..efeb9b4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cake.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/calendar.png b/static/editor.md/plugins/emoji-dialog/emoji/calendar.png new file mode 100644 index 0000000..900b868 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/calendar.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/calling.png b/static/editor.md/plugins/emoji-dialog/emoji/calling.png new file mode 100644 index 0000000..837897f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/calling.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/camel.png b/static/editor.md/plugins/emoji-dialog/emoji/camel.png new file mode 100644 index 0000000..496c186 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/camel.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/camera.png b/static/editor.md/plugins/emoji-dialog/emoji/camera.png new file mode 100644 index 0000000..397d03b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/camera.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cancer.png b/static/editor.md/plugins/emoji-dialog/emoji/cancer.png new file mode 100644 index 0000000..ea43a4a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cancer.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/candy.png b/static/editor.md/plugins/emoji-dialog/emoji/candy.png new file mode 100644 index 0000000..33722f2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/candy.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/capital_abcd.png b/static/editor.md/plugins/emoji-dialog/emoji/capital_abcd.png new file mode 100644 index 0000000..ffc0cba Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/capital_abcd.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/capricorn.png b/static/editor.md/plugins/emoji-dialog/emoji/capricorn.png new file mode 100644 index 0000000..f2044e7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/capricorn.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/car.png b/static/editor.md/plugins/emoji-dialog/emoji/car.png new file mode 100644 index 0000000..d70a2f0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/car.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/card_index.png b/static/editor.md/plugins/emoji-dialog/emoji/card_index.png new file mode 100644 index 0000000..374e94e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/card_index.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/carousel_horse.png b/static/editor.md/plugins/emoji-dialog/emoji/carousel_horse.png new file mode 100644 index 0000000..765d2c0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/carousel_horse.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cat.png b/static/editor.md/plugins/emoji-dialog/emoji/cat.png new file mode 100644 index 0000000..09b9ef7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cat2.png b/static/editor.md/plugins/emoji-dialog/emoji/cat2.png new file mode 100644 index 0000000..6dbc4c7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cat2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cd.png b/static/editor.md/plugins/emoji-dialog/emoji/cd.png new file mode 100644 index 0000000..baff835 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cd.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/chart.png b/static/editor.md/plugins/emoji-dialog/emoji/chart.png new file mode 100644 index 0000000..ac2c4bb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/chart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/chart_with_downwards_trend.png b/static/editor.md/plugins/emoji-dialog/emoji/chart_with_downwards_trend.png new file mode 100644 index 0000000..cb0d2a1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/chart_with_downwards_trend.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/chart_with_upwards_trend.png b/static/editor.md/plugins/emoji-dialog/emoji/chart_with_upwards_trend.png new file mode 100644 index 0000000..7c66745 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/chart_with_upwards_trend.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/checkered_flag.png b/static/editor.md/plugins/emoji-dialog/emoji/checkered_flag.png new file mode 100644 index 0000000..ead4a68 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/checkered_flag.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cherries.png b/static/editor.md/plugins/emoji-dialog/emoji/cherries.png new file mode 100644 index 0000000..8d3e044 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cherries.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cherry_blossom.png b/static/editor.md/plugins/emoji-dialog/emoji/cherry_blossom.png new file mode 100644 index 0000000..e031554 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cherry_blossom.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/chestnut.png b/static/editor.md/plugins/emoji-dialog/emoji/chestnut.png new file mode 100644 index 0000000..066fb6b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/chestnut.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/chicken.png b/static/editor.md/plugins/emoji-dialog/emoji/chicken.png new file mode 100644 index 0000000..6d25c0e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/chicken.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/children_crossing.png b/static/editor.md/plugins/emoji-dialog/emoji/children_crossing.png new file mode 100644 index 0000000..b0302ae Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/children_crossing.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/chocolate_bar.png b/static/editor.md/plugins/emoji-dialog/emoji/chocolate_bar.png new file mode 100644 index 0000000..c7ec19d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/chocolate_bar.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/christmas_tree.png b/static/editor.md/plugins/emoji-dialog/emoji/christmas_tree.png new file mode 100644 index 0000000..d813b95 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/christmas_tree.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/church.png b/static/editor.md/plugins/emoji-dialog/emoji/church.png new file mode 100644 index 0000000..4c07c6b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/church.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cinema.png b/static/editor.md/plugins/emoji-dialog/emoji/cinema.png new file mode 100644 index 0000000..a990ccf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cinema.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/circus_tent.png b/static/editor.md/plugins/emoji-dialog/emoji/circus_tent.png new file mode 100644 index 0000000..4af8719 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/circus_tent.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/city_sunrise.png b/static/editor.md/plugins/emoji-dialog/emoji/city_sunrise.png new file mode 100644 index 0000000..91ca2a4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/city_sunrise.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/city_sunset.png b/static/editor.md/plugins/emoji-dialog/emoji/city_sunset.png new file mode 100644 index 0000000..7cb178a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/city_sunset.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cl.png b/static/editor.md/plugins/emoji-dialog/emoji/cl.png new file mode 100644 index 0000000..15ac675 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cl.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clap.png b/static/editor.md/plugins/emoji-dialog/emoji/clap.png new file mode 100644 index 0000000..d01c982 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clap.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clapper.png b/static/editor.md/plugins/emoji-dialog/emoji/clapper.png new file mode 100644 index 0000000..4e1dc11 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clapper.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clipboard.png b/static/editor.md/plugins/emoji-dialog/emoji/clipboard.png new file mode 100644 index 0000000..e2c74e6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clipboard.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock1.png b/static/editor.md/plugins/emoji-dialog/emoji/clock1.png new file mode 100644 index 0000000..9174d4e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock1.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock10.png b/static/editor.md/plugins/emoji-dialog/emoji/clock10.png new file mode 100644 index 0000000..39f590d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock10.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock1030.png b/static/editor.md/plugins/emoji-dialog/emoji/clock1030.png new file mode 100644 index 0000000..0483b30 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock1030.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock11.png b/static/editor.md/plugins/emoji-dialog/emoji/clock11.png new file mode 100644 index 0000000..ddb53fa Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock11.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock1130.png b/static/editor.md/plugins/emoji-dialog/emoji/clock1130.png new file mode 100644 index 0000000..415999e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock1130.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock12.png b/static/editor.md/plugins/emoji-dialog/emoji/clock12.png new file mode 100644 index 0000000..87b1328 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock12.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock1230.png b/static/editor.md/plugins/emoji-dialog/emoji/clock1230.png new file mode 100644 index 0000000..a652715 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock1230.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock130.png b/static/editor.md/plugins/emoji-dialog/emoji/clock130.png new file mode 100644 index 0000000..90ea5b9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock130.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock2.png b/static/editor.md/plugins/emoji-dialog/emoji/clock2.png new file mode 100644 index 0000000..65b3b3a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock230.png b/static/editor.md/plugins/emoji-dialog/emoji/clock230.png new file mode 100644 index 0000000..f12c691 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock230.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock3.png b/static/editor.md/plugins/emoji-dialog/emoji/clock3.png new file mode 100644 index 0000000..3e44d64 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock3.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock330.png b/static/editor.md/plugins/emoji-dialog/emoji/clock330.png new file mode 100644 index 0000000..1dc9628 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock330.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock4.png b/static/editor.md/plugins/emoji-dialog/emoji/clock4.png new file mode 100644 index 0000000..948ed1a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock4.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock430.png b/static/editor.md/plugins/emoji-dialog/emoji/clock430.png new file mode 100644 index 0000000..5d6b16a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock430.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock5.png b/static/editor.md/plugins/emoji-dialog/emoji/clock5.png new file mode 100644 index 0000000..b010b4f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock5.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock530.png b/static/editor.md/plugins/emoji-dialog/emoji/clock530.png new file mode 100644 index 0000000..e08d4ad Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock530.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock6.png b/static/editor.md/plugins/emoji-dialog/emoji/clock6.png new file mode 100644 index 0000000..76bf8cf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock6.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock630.png b/static/editor.md/plugins/emoji-dialog/emoji/clock630.png new file mode 100644 index 0000000..46f0681 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock630.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock7.png b/static/editor.md/plugins/emoji-dialog/emoji/clock7.png new file mode 100644 index 0000000..d48f645 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock7.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock730.png b/static/editor.md/plugins/emoji-dialog/emoji/clock730.png new file mode 100644 index 0000000..f2807de Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock730.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock8.png b/static/editor.md/plugins/emoji-dialog/emoji/clock8.png new file mode 100644 index 0000000..74c770d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock8.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock830.png b/static/editor.md/plugins/emoji-dialog/emoji/clock830.png new file mode 100644 index 0000000..f58f3da Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock830.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock9.png b/static/editor.md/plugins/emoji-dialog/emoji/clock9.png new file mode 100644 index 0000000..f009d14 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock9.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clock930.png b/static/editor.md/plugins/emoji-dialog/emoji/clock930.png new file mode 100644 index 0000000..fd35221 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clock930.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/closed_book.png b/static/editor.md/plugins/emoji-dialog/emoji/closed_book.png new file mode 100644 index 0000000..484029c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/closed_book.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/closed_lock_with_key.png b/static/editor.md/plugins/emoji-dialog/emoji/closed_lock_with_key.png new file mode 100644 index 0000000..e6fdf6c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/closed_lock_with_key.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/closed_umbrella.png b/static/editor.md/plugins/emoji-dialog/emoji/closed_umbrella.png new file mode 100644 index 0000000..0b719f0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/closed_umbrella.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cloud.png b/static/editor.md/plugins/emoji-dialog/emoji/cloud.png new file mode 100644 index 0000000..b31c08c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cloud.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/clubs.png b/static/editor.md/plugins/emoji-dialog/emoji/clubs.png new file mode 100644 index 0000000..bfab536 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/clubs.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cn.png b/static/editor.md/plugins/emoji-dialog/emoji/cn.png new file mode 100644 index 0000000..b30dcc5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cn.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cocktail.png b/static/editor.md/plugins/emoji-dialog/emoji/cocktail.png new file mode 100644 index 0000000..28b45ea Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cocktail.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/coffee.png b/static/editor.md/plugins/emoji-dialog/emoji/coffee.png new file mode 100644 index 0000000..57e1adc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/coffee.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cold_sweat.png b/static/editor.md/plugins/emoji-dialog/emoji/cold_sweat.png new file mode 100644 index 0000000..b9e39bc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cold_sweat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/collision.png b/static/editor.md/plugins/emoji-dialog/emoji/collision.png new file mode 100644 index 0000000..bddeb8f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/collision.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/computer.png b/static/editor.md/plugins/emoji-dialog/emoji/computer.png new file mode 100644 index 0000000..d4d2687 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/computer.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/confetti_ball.png b/static/editor.md/plugins/emoji-dialog/emoji/confetti_ball.png new file mode 100644 index 0000000..bd293e3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/confetti_ball.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/confounded.png b/static/editor.md/plugins/emoji-dialog/emoji/confounded.png new file mode 100644 index 0000000..762c376 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/confounded.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/confused.png b/static/editor.md/plugins/emoji-dialog/emoji/confused.png new file mode 100644 index 0000000..8dc494d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/confused.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/congratulations.png b/static/editor.md/plugins/emoji-dialog/emoji/congratulations.png new file mode 100644 index 0000000..dcbb1d2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/congratulations.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/construction.png b/static/editor.md/plugins/emoji-dialog/emoji/construction.png new file mode 100644 index 0000000..523e9f1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/construction.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/construction_worker.png b/static/editor.md/plugins/emoji-dialog/emoji/construction_worker.png new file mode 100644 index 0000000..4d64860 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/construction_worker.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/convenience_store.png b/static/editor.md/plugins/emoji-dialog/emoji/convenience_store.png new file mode 100644 index 0000000..671696c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/convenience_store.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cookie.png b/static/editor.md/plugins/emoji-dialog/emoji/cookie.png new file mode 100644 index 0000000..653edb2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cookie.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cool.png b/static/editor.md/plugins/emoji-dialog/emoji/cool.png new file mode 100644 index 0000000..937dcd7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cool.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cop.png b/static/editor.md/plugins/emoji-dialog/emoji/cop.png new file mode 100644 index 0000000..43a5a84 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cop.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/copyright.png b/static/editor.md/plugins/emoji-dialog/emoji/copyright.png new file mode 100644 index 0000000..38493c3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/copyright.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/corn.png b/static/editor.md/plugins/emoji-dialog/emoji/corn.png new file mode 100644 index 0000000..fe5d8b1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/corn.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/couple.png b/static/editor.md/plugins/emoji-dialog/emoji/couple.png new file mode 100644 index 0000000..9e51f40 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/couple.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/couple_with_heart.png b/static/editor.md/plugins/emoji-dialog/emoji/couple_with_heart.png new file mode 100644 index 0000000..c503f40 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/couple_with_heart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/couplekiss.png b/static/editor.md/plugins/emoji-dialog/emoji/couplekiss.png new file mode 100644 index 0000000..d027908 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/couplekiss.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cow.png b/static/editor.md/plugins/emoji-dialog/emoji/cow.png new file mode 100644 index 0000000..12e1ab6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cow.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cow2.png b/static/editor.md/plugins/emoji-dialog/emoji/cow2.png new file mode 100644 index 0000000..594c921 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cow2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/credit_card.png b/static/editor.md/plugins/emoji-dialog/emoji/credit_card.png new file mode 100644 index 0000000..be1c1dd Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/credit_card.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/crocodile.png b/static/editor.md/plugins/emoji-dialog/emoji/crocodile.png new file mode 100644 index 0000000..7435d5a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/crocodile.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/crossed_flags.png b/static/editor.md/plugins/emoji-dialog/emoji/crossed_flags.png new file mode 100644 index 0000000..2397bcd Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/crossed_flags.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/crown.png b/static/editor.md/plugins/emoji-dialog/emoji/crown.png new file mode 100644 index 0000000..39da1d5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/crown.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cry.png b/static/editor.md/plugins/emoji-dialog/emoji/cry.png new file mode 100644 index 0000000..6d0d9af Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cry.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/crying_cat_face.png b/static/editor.md/plugins/emoji-dialog/emoji/crying_cat_face.png new file mode 100644 index 0000000..42d4c27 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/crying_cat_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/crystal_ball.png b/static/editor.md/plugins/emoji-dialog/emoji/crystal_ball.png new file mode 100644 index 0000000..6d2c6c4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/crystal_ball.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cupid.png b/static/editor.md/plugins/emoji-dialog/emoji/cupid.png new file mode 100644 index 0000000..4987284 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cupid.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/curly_loop.png b/static/editor.md/plugins/emoji-dialog/emoji/curly_loop.png new file mode 100644 index 0000000..7dd841d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/curly_loop.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/currency_exchange.png b/static/editor.md/plugins/emoji-dialog/emoji/currency_exchange.png new file mode 100644 index 0000000..6ebebe7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/currency_exchange.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/curry.png b/static/editor.md/plugins/emoji-dialog/emoji/curry.png new file mode 100644 index 0000000..7983c70 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/curry.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/custard.png b/static/editor.md/plugins/emoji-dialog/emoji/custard.png new file mode 100644 index 0000000..9f843b4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/custard.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/customs.png b/static/editor.md/plugins/emoji-dialog/emoji/customs.png new file mode 100644 index 0000000..92691e3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/customs.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/cyclone.png b/static/editor.md/plugins/emoji-dialog/emoji/cyclone.png new file mode 100644 index 0000000..5fd2e45 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/cyclone.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dancer.png b/static/editor.md/plugins/emoji-dialog/emoji/dancer.png new file mode 100644 index 0000000..6885a0b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dancer.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dancers.png b/static/editor.md/plugins/emoji-dialog/emoji/dancers.png new file mode 100644 index 0000000..2dfb451 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dancers.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dango.png b/static/editor.md/plugins/emoji-dialog/emoji/dango.png new file mode 100644 index 0000000..2d042ae Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dango.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dart.png b/static/editor.md/plugins/emoji-dialog/emoji/dart.png new file mode 100644 index 0000000..0438fe5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dash.png b/static/editor.md/plugins/emoji-dialog/emoji/dash.png new file mode 100644 index 0000000..dc2c0a8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dash.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/date.png b/static/editor.md/plugins/emoji-dialog/emoji/date.png new file mode 100644 index 0000000..6ad2efa Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/date.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/de.png b/static/editor.md/plugins/emoji-dialog/emoji/de.png new file mode 100644 index 0000000..16a2854 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/de.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/deciduous_tree.png b/static/editor.md/plugins/emoji-dialog/emoji/deciduous_tree.png new file mode 100644 index 0000000..3fdf8c0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/deciduous_tree.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/department_store.png b/static/editor.md/plugins/emoji-dialog/emoji/department_store.png new file mode 100644 index 0000000..68d959c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/department_store.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/diamond_shape_with_a_dot_inside.png b/static/editor.md/plugins/emoji-dialog/emoji/diamond_shape_with_a_dot_inside.png new file mode 100644 index 0000000..dfd1098 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/diamond_shape_with_a_dot_inside.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/diamonds.png b/static/editor.md/plugins/emoji-dialog/emoji/diamonds.png new file mode 100644 index 0000000..fe08277 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/diamonds.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/disappointed.png b/static/editor.md/plugins/emoji-dialog/emoji/disappointed.png new file mode 100644 index 0000000..8255200 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/disappointed.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/disappointed_relieved.png b/static/editor.md/plugins/emoji-dialog/emoji/disappointed_relieved.png new file mode 100644 index 0000000..fa5f9e7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/disappointed_relieved.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dizzy.png b/static/editor.md/plugins/emoji-dialog/emoji/dizzy.png new file mode 100644 index 0000000..467f73e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dizzy.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dizzy_face.png b/static/editor.md/plugins/emoji-dialog/emoji/dizzy_face.png new file mode 100644 index 0000000..8001d6f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dizzy_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/do_not_litter.png b/static/editor.md/plugins/emoji-dialog/emoji/do_not_litter.png new file mode 100644 index 0000000..38c7ae7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/do_not_litter.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dog.png b/static/editor.md/plugins/emoji-dialog/emoji/dog.png new file mode 100644 index 0000000..389a02b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dog.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dog2.png b/static/editor.md/plugins/emoji-dialog/emoji/dog2.png new file mode 100644 index 0000000..c7f6a24 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dog2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dollar.png b/static/editor.md/plugins/emoji-dialog/emoji/dollar.png new file mode 100644 index 0000000..63de884 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dollar.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dolls.png b/static/editor.md/plugins/emoji-dialog/emoji/dolls.png new file mode 100644 index 0000000..47ce339 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dolls.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dolphin.png b/static/editor.md/plugins/emoji-dialog/emoji/dolphin.png new file mode 100644 index 0000000..9326077 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dolphin.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/donut.png b/static/editor.md/plugins/emoji-dialog/emoji/donut.png new file mode 100644 index 0000000..ccf8691 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/donut.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/door.png b/static/editor.md/plugins/emoji-dialog/emoji/door.png new file mode 100644 index 0000000..83c819a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/door.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/doughnut.png b/static/editor.md/plugins/emoji-dialog/emoji/doughnut.png new file mode 100644 index 0000000..ccf8691 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/doughnut.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dragon.png b/static/editor.md/plugins/emoji-dialog/emoji/dragon.png new file mode 100644 index 0000000..88d4784 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dragon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dragon_face.png b/static/editor.md/plugins/emoji-dialog/emoji/dragon_face.png new file mode 100644 index 0000000..e5e556b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dragon_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dress.png b/static/editor.md/plugins/emoji-dialog/emoji/dress.png new file mode 100644 index 0000000..6434e2e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dress.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dromedary_camel.png b/static/editor.md/plugins/emoji-dialog/emoji/dromedary_camel.png new file mode 100644 index 0000000..c8c7b9f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dromedary_camel.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/droplet.png b/static/editor.md/plugins/emoji-dialog/emoji/droplet.png new file mode 100644 index 0000000..cae7f49 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/droplet.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/dvd.png b/static/editor.md/plugins/emoji-dialog/emoji/dvd.png new file mode 100644 index 0000000..363c83d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/dvd.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/e-mail.png b/static/editor.md/plugins/emoji-dialog/emoji/e-mail.png new file mode 100644 index 0000000..176a8e1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/e-mail.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ear.png b/static/editor.md/plugins/emoji-dialog/emoji/ear.png new file mode 100644 index 0000000..2bbbf10 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ear.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ear_of_rice.png b/static/editor.md/plugins/emoji-dialog/emoji/ear_of_rice.png new file mode 100644 index 0000000..a9bba5c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ear_of_rice.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/earth_africa.png b/static/editor.md/plugins/emoji-dialog/emoji/earth_africa.png new file mode 100644 index 0000000..44ce5ec Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/earth_africa.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/earth_americas.png b/static/editor.md/plugins/emoji-dialog/emoji/earth_americas.png new file mode 100644 index 0000000..97d7176 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/earth_americas.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/earth_asia.png b/static/editor.md/plugins/emoji-dialog/emoji/earth_asia.png new file mode 100644 index 0000000..95ec357 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/earth_asia.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/egg.png b/static/editor.md/plugins/emoji-dialog/emoji/egg.png new file mode 100644 index 0000000..c3de6ae Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/egg.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/eggplant.png b/static/editor.md/plugins/emoji-dialog/emoji/eggplant.png new file mode 100644 index 0000000..66f25fc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/eggplant.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/eight.png b/static/editor.md/plugins/emoji-dialog/emoji/eight.png new file mode 100644 index 0000000..7bdb422 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/eight.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/eight_pointed_black_star.png b/static/editor.md/plugins/emoji-dialog/emoji/eight_pointed_black_star.png new file mode 100644 index 0000000..6ddaa21 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/eight_pointed_black_star.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/eight_spoked_asterisk.png b/static/editor.md/plugins/emoji-dialog/emoji/eight_spoked_asterisk.png new file mode 100644 index 0000000..946a203 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/eight_spoked_asterisk.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/electric_plug.png b/static/editor.md/plugins/emoji-dialog/emoji/electric_plug.png new file mode 100644 index 0000000..fbef406 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/electric_plug.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/elephant.png b/static/editor.md/plugins/emoji-dialog/emoji/elephant.png new file mode 100644 index 0000000..5ca0457 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/elephant.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/email.png b/static/editor.md/plugins/emoji-dialog/emoji/email.png new file mode 100644 index 0000000..0e01fd5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/email.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/emojify.css b/static/editor.md/plugins/emoji-dialog/emoji/emojify.css new file mode 100644 index 0000000..bf410a2 --- /dev/null +++ b/static/editor.md/plugins/emoji-dialog/emoji/emojify.css @@ -0,0 +1 @@ +.emojify{width:1.5em;height:1.5em;display:inline-block;margin-bottom:-0.25em}.emojify.alien{background:url(alien.png) no-repeat;background-size:1.5em}.emojify.angel{background:url(angel.png) no-repeat;background-size:1.5em}.emojify.anger{background:url(anger.png) no-repeat;background-size:1.5em}.emojify.angry{background:url(angry.png) no-repeat;background-size:1.5em}.emojify.anguished{background:url(anguished.png) no-repeat;background-size:1.5em}.emojify.astonished{background:url(astonished.png) no-repeat;background-size:1.5em}.emojify.baby{background:url(baby.png) no-repeat;background-size:1.5em}.emojify.blue_heart{background:url(blue_heart.png) no-repeat;background-size:1.5em}.emojify.blush{background:url(blush.png) no-repeat;background-size:1.5em}.emojify.boom{background:url(boom.png) no-repeat;background-size:1.5em}.emojify.bow{background:url(bow.png) no-repeat;background-size:1.5em}.emojify.bowtie{background:url(bowtie.png) no-repeat;background-size:1.5em}.emojify.boy{background:url(boy.png) no-repeat;background-size:1.5em}.emojify.bride_with_veil{background:url(bride_with_veil.png) no-repeat;background-size:1.5em}.emojify.broken_heart{background:url(broken_heart.png) no-repeat;background-size:1.5em}.emojify.bust_in_silhouette{background:url(bust_in_silhouette.png) no-repeat;background-size:1.5em}.emojify.busts_in_silhouette{background:url(busts_in_silhouette.png) no-repeat;background-size:1.5em}.emojify.clap{background:url(clap.png) no-repeat;background-size:1.5em}.emojify.cold_sweat{background:url(cold_sweat.png) no-repeat;background-size:1.5em}.emojify.collision{background:url(collision.png) no-repeat;background-size:1.5em}.emojify.confounded{background:url(confounded.png) no-repeat;background-size:1.5em}.emojify.confused{background:url(confused.png) no-repeat;background-size:1.5em}.emojify.construction_worker{background:url(construction_worker.png) no-repeat;background-size:1.5em}.emojify.cop{background:url(cop.png) no-repeat;background-size:1.5em}.emojify.couple_with_heart{background:url(couple_with_heart.png) no-repeat;background-size:1.5em}.emojify.couple{background:url(couple.png) no-repeat;background-size:1.5em}.emojify.couplekiss{background:url(couplekiss.png) no-repeat;background-size:1.5em}.emojify.cry{background:url(cry.png) no-repeat;background-size:1.5em}.emojify.crying_cat_face{background:url(crying_cat_face.png) no-repeat;background-size:1.5em}.emojify.cupid{background:url(cupid.png) no-repeat;background-size:1.5em}.emojify.dancer{background:url(dancer.png) no-repeat;background-size:1.5em}.emojify.dancers{background:url(dancers.png) no-repeat;background-size:1.5em}.emojify.dash{background:url(dash.png) no-repeat;background-size:1.5em}.emojify.disappointed{background:url(disappointed.png) no-repeat;background-size:1.5em}.emojify.dizzy_face{background:url(dizzy_face.png) no-repeat;background-size:1.5em}.emojify.dizzy{background:url(dizzy.png) no-repeat;background-size:1.5em}.emojify.droplet{background:url(droplet.png) no-repeat;background-size:1.5em}.emojify.ear{background:url(ear.png) no-repeat;background-size:1.5em}.emojify.exclamation{background:url(exclamation.png) no-repeat;background-size:1.5em}.emojify.expressionless{background:url(expressionless.png) no-repeat;background-size:1.5em}.emojify.eyes{background:url(eyes.png) no-repeat;background-size:1.5em}.emojify.facepunch{background:url(facepunch.png) no-repeat;background-size:1.5em}.emojify.family{background:url(family.png) no-repeat;background-size:1.5em}.emojify.fearful{background:url(fearful.png) no-repeat;background-size:1.5em}.emojify.feelsgood{background:url(feelsgood.png) no-repeat;background-size:1.5em}.emojify.feet{background:url(feet.png) no-repeat;background-size:1.5em}.emojify.finnadie{background:url(finnadie.png) no-repeat;background-size:1.5em}.emojify.fire{background:url(fire.png) no-repeat;background-size:1.5em}.emojify.fist{background:url(fist.png) no-repeat;background-size:1.5em}.emojify.flushed{background:url(flushed.png) no-repeat;background-size:1.5em}.emojify.frowning{background:url(frowning.png) no-repeat;background-size:1.5em}.emojify.girl{background:url(girl.png) no-repeat;background-size:1.5em}.emojify.goberserk{background:url(goberserk.png) no-repeat;background-size:1.5em}.emojify.godmode{background:url(godmode.png) no-repeat;background-size:1.5em}.emojify.green_heart{background:url(green_heart.png) no-repeat;background-size:1.5em}.emojify.grey_exclamation{background:url(grey_exclamation.png) no-repeat;background-size:1.5em}.emojify.grey_question{background:url(grey_question.png) no-repeat;background-size:1.5em}.emojify.grimacing{background:url(grimacing.png) no-repeat;background-size:1.5em}.emojify.grin{background:url(grin.png) no-repeat;background-size:1.5em}.emojify.grinning{background:url(grinning.png) no-repeat;background-size:1.5em}.emojify.guardsman{background:url(guardsman.png) no-repeat;background-size:1.5em}.emojify.haircut{background:url(haircut.png) no-repeat;background-size:1.5em}.emojify.hand{background:url(hand.png) no-repeat;background-size:1.5em}.emojify.hankey{background:url(hankey.png) no-repeat;background-size:1.5em}.emojify.hear_no_evil{background:url(hear_no_evil.png) no-repeat;background-size:1.5em}.emojify.heart_eyes_cat{background:url(heart_eyes_cat.png) no-repeat;background-size:1.5em}.emojify.heart_eyes{background:url(heart_eyes.png) no-repeat;background-size:1.5em}.emojify.heart{background:url(heart.png) no-repeat;background-size:1.5em}.emojify.heartbeat{background:url(heartbeat.png) no-repeat;background-size:1.5em}.emojify.heartpulse{background:url(heartpulse.png) no-repeat;background-size:1.5em}.emojify.hurtrealbad{background:url(hurtrealbad.png) no-repeat;background-size:1.5em}.emojify.hushed{background:url(hushed.png) no-repeat;background-size:1.5em}.emojify.imp{background:url(imp.png) no-repeat;background-size:1.5em}.emojify.information_desk_person{background:url(information_desk_person.png) no-repeat;background-size:1.5em}.emojify.innocent{background:url(innocent.png) no-repeat;background-size:1.5em}.emojify.japanese_goblin{background:url(japanese_goblin.png) no-repeat;background-size:1.5em}.emojify.japanese_ogre{background:url(japanese_ogre.png) no-repeat;background-size:1.5em}.emojify.joy_cat{background:url(joy_cat.png) no-repeat;background-size:1.5em}.emojify.joy{background:url(joy.png) no-repeat;background-size:1.5em}.emojify.kiss{background:url(kiss.png) no-repeat;background-size:1.5em}.emojify.kissing_cat{background:url(kissing_cat.png) no-repeat;background-size:1.5em}.emojify.kissing_closed_eyes{background:url(kissing_closed_eyes.png) no-repeat;background-size:1.5em}.emojify.kissing_heart{background:url(kissing_heart.png) no-repeat;background-size:1.5em}.emojify.kissing_smiling_eyes{background:url(kissing_smiling_eyes.png) no-repeat;background-size:1.5em}.emojify.kissing{background:url(kissing.png) no-repeat;background-size:1.5em}.emojify.laughing{background:url(laughing.png) no-repeat;background-size:1.5em}.emojify.lips{background:url(lips.png) no-repeat;background-size:1.5em}.emojify.love_letter{background:url(love_letter.png) no-repeat;background-size:1.5em}.emojify.man_with_gua_pi_mao{background:url(man_with_gua_pi_mao.png) no-repeat;background-size:1.5em}.emojify.man_with_turban{background:url(man_with_turban.png) no-repeat;background-size:1.5em}.emojify.man{background:url(man.png) no-repeat;background-size:1.5em}.emojify.mask{background:url(mask.png) no-repeat;background-size:1.5em}.emojify.massage{background:url(massage.png) no-repeat;background-size:1.5em}.emojify.metal{background:url(metal.png) no-repeat;background-size:1.5em}.emojify.muscle{background:url(muscle.png) no-repeat;background-size:1.5em}.emojify.musical_note{background:url(musical_note.png) no-repeat;background-size:1.5em}.emojify.nail_care{background:url(nail_care.png) no-repeat;background-size:1.5em}.emojify.neckbeard{background:url(neckbeard.png) no-repeat;background-size:1.5em}.emojify.neutral_face{background:url(neutral_face.png) no-repeat;background-size:1.5em}.emojify.no_good{background:url(no_good.png) no-repeat;background-size:1.5em}.emojify.no_mouth{background:url(no_mouth.png) no-repeat;background-size:1.5em}.emojify.nose{background:url(nose.png) no-repeat;background-size:1.5em}.emojify.notes{background:url(notes.png) no-repeat;background-size:1.5em}.emojify.ok_hand{background:url(ok_hand.png) no-repeat;background-size:1.5em}.emojify.ok_woman{background:url(ok_woman.png) no-repeat;background-size:1.5em}.emojify.older_man{background:url(older_man.png) no-repeat;background-size:1.5em}.emojify.older_woman{background:url(older_woman.png) no-repeat;background-size:1.5em}.emojify.open_hands{background:url(open_hands.png) no-repeat;background-size:1.5em}.emojify.open_mouth{background:url(open_mouth.png) no-repeat;background-size:1.5em}.emojify.pensive{background:url(pensive.png) no-repeat;background-size:1.5em}.emojify.persevere{background:url(persevere.png) no-repeat;background-size:1.5em}.emojify.person_frowning{background:url(person_frowning.png) no-repeat;background-size:1.5em}.emojify.person_with_blond_hair{background:url(person_with_blond_hair.png) no-repeat;background-size:1.5em}.emojify.person_with_pouting_face{background:url(person_with_pouting_face.png) no-repeat;background-size:1.5em}.emojify.point_down{background:url(point_down.png) no-repeat;background-size:1.5em}.emojify.point_left{background:url(point_left.png) no-repeat;background-size:1.5em}.emojify.point_right{background:url(point_right.png) no-repeat;background-size:1.5em}.emojify.point_up_2{background:url(point_up_2.png) no-repeat;background-size:1.5em}.emojify.point_up{background:url(point_up.png) no-repeat;background-size:1.5em}.emojify.poop{background:url(poop.png) no-repeat;background-size:1.5em}.emojify.pouting_cat{background:url(pouting_cat.png) no-repeat;background-size:1.5em}.emojify.pray{background:url(pray.png) no-repeat;background-size:1.5em}.emojify.princess{background:url(princess.png) no-repeat;background-size:1.5em}.emojify.punch{background:url(punch.png) no-repeat;background-size:1.5em}.emojify.purple_heart{background:url(purple_heart.png) no-repeat;background-size:1.5em}.emojify.question{background:url(question.png) no-repeat;background-size:1.5em}.emojify.rage{background:url(rage.png) no-repeat;background-size:1.5em}.emojify.rage1{background:url(rage1.png) no-repeat;background-size:1.5em}.emojify.rage2{background:url(rage2.png) no-repeat;background-size:1.5em}.emojify.rage3{background:url(rage3.png) no-repeat;background-size:1.5em}.emojify.rage4{background:url(rage4.png) no-repeat;background-size:1.5em}.emojify.raised_hand{background:url(raised_hand.png) no-repeat;background-size:1.5em}.emojify.raised_hands{background:url(raised_hands.png) no-repeat;background-size:1.5em}.emojify.relaxed{background:url(relaxed.png) no-repeat;background-size:1.5em}.emojify.relieved{background:url(relieved.png) no-repeat;background-size:1.5em}.emojify.revolving_hearts{background:url(revolving_hearts.png) no-repeat;background-size:1.5em}.emojify.runner{background:url(runner.png) no-repeat;background-size:1.5em}.emojify.running{background:url(running.png) no-repeat;background-size:1.5em}.emojify.satisfied{background:url(satisfied.png) no-repeat;background-size:1.5em}.emojify.scream_cat{background:url(scream_cat.png) no-repeat;background-size:1.5em}.emojify.scream{background:url(scream.png) no-repeat;background-size:1.5em}.emojify.see_no_evil{background:url(see_no_evil.png) no-repeat;background-size:1.5em}.emojify.shit{background:url(shit.png) no-repeat;background-size:1.5em}.emojify.skull{background:url(skull.png) no-repeat;background-size:1.5em}.emojify.sleeping{background:url(sleeping.png) no-repeat;background-size:1.5em}.emojify.sleepy{background:url(sleepy.png) no-repeat;background-size:1.5em}.emojify.smile_cat{background:url(smile_cat.png) no-repeat;background-size:1.5em}.emojify.smile{background:url(smile.png) no-repeat;background-size:1.5em}.emojify.smiley_cat{background:url(smiley_cat.png) no-repeat;background-size:1.5em}.emojify.smiley{background:url(smiley.png) no-repeat;background-size:1.5em}.emojify.smiling_imp{background:url(smiling_imp.png) no-repeat;background-size:1.5em}.emojify.smirk_cat{background:url(smirk_cat.png) no-repeat;background-size:1.5em}.emojify.smirk{background:url(smirk.png) no-repeat;background-size:1.5em}.emojify.sob{background:url(sob.png) no-repeat;background-size:1.5em}.emojify.sparkling_heart{background:url(sparkling_heart.png) no-repeat;background-size:1.5em}.emojify.sparkles{background:url(sparkles.png) no-repeat;background-size:1.5em}.emojify.speak_no_evil{background:url(speak_no_evil.png) no-repeat;background-size:1.5em}.emojify.speech_balloon{background:url(speech_balloon.png) no-repeat;background-size:1.5em}.emojify.star{background:url(star.png) no-repeat;background-size:1.5em}.emojify.star2{background:url(star2.png) no-repeat;background-size:1.5em}.emojify.stuck_out_tongue_closed_eyes{background:url(stuck_out_tongue_closed_eyes.png) no-repeat;background-size:1.5em}.emojify.stuck_out_tongue_winking_eye{background:url(stuck_out_tongue_winking_eye.png) no-repeat;background-size:1.5em}.emojify.stuck_out_tongue{background:url(stuck_out_tongue.png) no-repeat;background-size:1.5em}.emojify.sunglasses{background:url(sunglasses.png) no-repeat;background-size:1.5em}.emojify.suspect{background:url(suspect.png) no-repeat;background-size:1.5em}.emojify.sweat_drops{background:url(sweat_drops.png) no-repeat;background-size:1.5em}.emojify.sweat_smile{background:url(sweat_smile.png) no-repeat;background-size:1.5em}.emojify.sweat{background:url(sweat.png) no-repeat;background-size:1.5em}.emojify.thought_balloon{background:url(thought_balloon.png) no-repeat;background-size:1.5em}.emojify.thumbsdown{background:url(thumbsdown.png) no-repeat;background-size:1.5em}.emojify.thumbsup{background:url(thumbsup.png) no-repeat;background-size:1.5em}.emojify.tired_face{background:url(tired_face.png) no-repeat;background-size:1.5em}.emojify.tongue{background:url(tongue.png) no-repeat;background-size:1.5em}.emojify.triumph{background:url(triumph.png) no-repeat;background-size:1.5em}.emojify.trollface{background:url(trollface.png) no-repeat;background-size:1.5em}.emojify.two_hearts{background:url(two_hearts.png) no-repeat;background-size:1.5em}.emojify.two_men_holding_hands{background:url(two_men_holding_hands.png) no-repeat;background-size:1.5em}.emojify.two_women_holding_hands{background:url(two_women_holding_hands.png) no-repeat;background-size:1.5em}.emojify.unamused{background:url(unamused.png) no-repeat;background-size:1.5em}.emojify.v{background:url(v.png) no-repeat;background-size:1.5em}.emojify.walking{background:url(walking.png) no-repeat;background-size:1.5em}.emojify.wave{background:url(wave.png) no-repeat;background-size:1.5em}.emojify.weary{background:url(weary.png) no-repeat;background-size:1.5em}.emojify.wink2{background:url(wink2.png) no-repeat;background-size:1.5em}.emojify.wink{background:url(wink.png) no-repeat;background-size:1.5em}.emojify.woman{background:url(woman.png) no-repeat;background-size:1.5em}.emojify.worried{background:url(worried.png) no-repeat;background-size:1.5em}.emojify.yellow_heart{background:url(yellow_heart.png) no-repeat;background-size:1.5em}.emojify.yum{background:url(yum.png) no-repeat;background-size:1.5em}.emojify.zzz{background:url(zzz.png) no-repeat;background-size:1.5em}.emojify.sunny{background:url(sunny.png) no-repeat;background-size:1.5em}.emojify.umbrella{background:url(umbrella.png) no-repeat;background-size:1.5em}.emojify.cloud{background:url(cloud.png) no-repeat;background-size:1.5em}.emojify.snowflake{background:url(snowflake.png) no-repeat;background-size:1.5em}.emojify.snowman{background:url(snowman.png) no-repeat;background-size:1.5em}.emojify.zap{background:url(zap.png) no-repeat;background-size:1.5em}.emojify.cyclone{background:url(cyclone.png) no-repeat;background-size:1.5em}.emojify.foggy{background:url(foggy.png) no-repeat;background-size:1.5em}.emojify.ocean{background:url(ocean.png) no-repeat;background-size:1.5em}.emojify.cat{background:url(cat.png) no-repeat;background-size:1.5em}.emojify.dog{background:url(dog.png) no-repeat;background-size:1.5em}.emojify.mouse{background:url(mouse.png) no-repeat;background-size:1.5em}.emojify.hamster{background:url(hamster.png) no-repeat;background-size:1.5em}.emojify.rabbit{background:url(rabbit.png) no-repeat;background-size:1.5em}.emojify.wolf{background:url(wolf.png) no-repeat;background-size:1.5em}.emojify.frog{background:url(frog.png) no-repeat;background-size:1.5em}.emojify.tiger{background:url(tiger.png) no-repeat;background-size:1.5em}.emojify.koala{background:url(koala.png) no-repeat;background-size:1.5em}.emojify.bear{background:url(bear.png) no-repeat;background-size:1.5em}.emojify.pig{background:url(pig.png) no-repeat;background-size:1.5em}.emojify.pig_nose{background:url(pig_nose.png) no-repeat;background-size:1.5em}.emojify.cow{background:url(cow.png) no-repeat;background-size:1.5em}.emojify.boar{background:url(boar.png) no-repeat;background-size:1.5em}.emojify.monkey_face{background:url(monkey_face.png) no-repeat;background-size:1.5em}.emojify.monkey{background:url(monkey.png) no-repeat;background-size:1.5em}.emojify.horse{background:url(horse.png) no-repeat;background-size:1.5em}.emojify.racehorse{background:url(racehorse.png) no-repeat;background-size:1.5em}.emojify.camel{background:url(camel.png) no-repeat;background-size:1.5em}.emojify.sheep{background:url(sheep.png) no-repeat;background-size:1.5em}.emojify.elephant{background:url(elephant.png) no-repeat;background-size:1.5em}.emojify.panda_face{background:url(panda_face.png) no-repeat;background-size:1.5em}.emojify.snake{background:url(snake.png) no-repeat;background-size:1.5em}.emojify.bird{background:url(bird.png) no-repeat;background-size:1.5em}.emojify.baby_chick{background:url(baby_chick.png) no-repeat;background-size:1.5em}.emojify.hatched_chick{background:url(hatched_chick.png) no-repeat;background-size:1.5em}.emojify.hatching_chick{background:url(hatching_chick.png) no-repeat;background-size:1.5em}.emojify.chicken{background:url(chicken.png) no-repeat;background-size:1.5em}.emojify.penguin{background:url(penguin.png) no-repeat;background-size:1.5em}.emojify.turtle{background:url(turtle.png) no-repeat;background-size:1.5em}.emojify.bug{background:url(bug.png) no-repeat;background-size:1.5em}.emojify.honeybee{background:url(honeybee.png) no-repeat;background-size:1.5em}.emojify.ant{background:url(ant.png) no-repeat;background-size:1.5em}.emojify.beetle{background:url(beetle.png) no-repeat;background-size:1.5em}.emojify.snail{background:url(snail.png) no-repeat;background-size:1.5em}.emojify.octopus{background:url(octopus.png) no-repeat;background-size:1.5em}.emojify.tropical_fish{background:url(tropical_fish.png) no-repeat;background-size:1.5em}.emojify.fish{background:url(fish.png) no-repeat;background-size:1.5em}.emojify.whale{background:url(whale.png) no-repeat;background-size:1.5em}.emojify.whale2{background:url(whale2.png) no-repeat;background-size:1.5em}.emojify.dolphin{background:url(dolphin.png) no-repeat;background-size:1.5em}.emojify.cow2{background:url(cow2.png) no-repeat;background-size:1.5em}.emojify.ram{background:url(ram.png) no-repeat;background-size:1.5em}.emojify.rat{background:url(rat.png) no-repeat;background-size:1.5em}.emojify.water_buffalo{background:url(water_buffalo.png) no-repeat;background-size:1.5em}.emojify.tiger2{background:url(tiger2.png) no-repeat;background-size:1.5em}.emojify.rabbit2{background:url(rabbit2.png) no-repeat;background-size:1.5em}.emojify.dragon{background:url(dragon.png) no-repeat;background-size:1.5em}.emojify.goat{background:url(goat.png) no-repeat;background-size:1.5em}.emojify.rooster{background:url(rooster.png) no-repeat;background-size:1.5em}.emojify.dog2{background:url(dog2.png) no-repeat;background-size:1.5em}.emojify.pig2{background:url(pig2.png) no-repeat;background-size:1.5em}.emojify.mouse2{background:url(mouse2.png) no-repeat;background-size:1.5em}.emojify.ox{background:url(ox.png) no-repeat;background-size:1.5em}.emojify.dragon_face{background:url(dragon_face.png) no-repeat;background-size:1.5em}.emojify.blowfish{background:url(blowfish.png) no-repeat;background-size:1.5em}.emojify.crocodile{background:url(crocodile.png) no-repeat;background-size:1.5em}.emojify.dromedary_camel{background:url(dromedary_camel.png) no-repeat;background-size:1.5em}.emojify.leopard{background:url(leopard.png) no-repeat;background-size:1.5em}.emojify.cat2{background:url(cat2.png) no-repeat;background-size:1.5em}.emojify.poodle{background:url(poodle.png) no-repeat;background-size:1.5em}.emojify.paw_prints{background:url(paw_prints.png) no-repeat;background-size:1.5em}.emojify.bouquet{background:url(bouquet.png) no-repeat;background-size:1.5em}.emojify.cherry_blossom{background:url(cherry_blossom.png) no-repeat;background-size:1.5em}.emojify.tulip{background:url(tulip.png) no-repeat;background-size:1.5em}.emojify.four_leaf_clover{background:url(four_leaf_clover.png) no-repeat;background-size:1.5em}.emojify.rose{background:url(rose.png) no-repeat;background-size:1.5em}.emojify.sunflower{background:url(sunflower.png) no-repeat;background-size:1.5em}.emojify.hibiscus{background:url(hibiscus.png) no-repeat;background-size:1.5em}.emojify.maple_leaf{background:url(maple_leaf.png) no-repeat;background-size:1.5em}.emojify.leaves{background:url(leaves.png) no-repeat;background-size:1.5em}.emojify.fallen_leaf{background:url(fallen_leaf.png) no-repeat;background-size:1.5em}.emojify.herb{background:url(herb.png) no-repeat;background-size:1.5em}.emojify.mushroom{background:url(mushroom.png) no-repeat;background-size:1.5em}.emojify.cactus{background:url(cactus.png) no-repeat;background-size:1.5em}.emojify.palm_tree{background:url(palm_tree.png) no-repeat;background-size:1.5em}.emojify.evergreen_tree{background:url(evergreen_tree.png) no-repeat;background-size:1.5em}.emojify.deciduous_tree{background:url(deciduous_tree.png) no-repeat;background-size:1.5em}.emojify.chestnut{background:url(chestnut.png) no-repeat;background-size:1.5em}.emojify.seedling{background:url(seedling.png) no-repeat;background-size:1.5em}.emojify.blossom{background:url(blossom.png) no-repeat;background-size:1.5em}.emojify.ear_of_rice{background:url(ear_of_rice.png) no-repeat;background-size:1.5em}.emojify.shell{background:url(shell.png) no-repeat;background-size:1.5em}.emojify.globe_with_meridians{background:url(globe_with_meridians.png) no-repeat;background-size:1.5em}.emojify.sun_with_face{background:url(sun_with_face.png) no-repeat;background-size:1.5em}.emojify.full_moon_with_face{background:url(full_moon_with_face.png) no-repeat;background-size:1.5em}.emojify.new_moon_with_face{background:url(new_moon_with_face.png) no-repeat;background-size:1.5em}.emojify.new_moon{background:url(new_moon.png) no-repeat;background-size:1.5em}.emojify.waxing_crescent_moon{background:url(waxing_crescent_moon.png) no-repeat;background-size:1.5em}.emojify.first_quarter_moon{background:url(first_quarter_moon.png) no-repeat;background-size:1.5em}.emojify.waxing_gibbous_moon{background:url(waxing_gibbous_moon.png) no-repeat;background-size:1.5em}.emojify.full_moon{background:url(full_moon.png) no-repeat;background-size:1.5em}.emojify.waning_gibbous_moon{background:url(waning_gibbous_moon.png) no-repeat;background-size:1.5em}.emojify.last_quarter_moon{background:url(last_quarter_moon.png) no-repeat;background-size:1.5em}.emojify.waning_crescent_moon{background:url(waning_crescent_moon.png) no-repeat;background-size:1.5em}.emojify.last_quarter_moon_with_face{background:url(last_quarter_moon_with_face.png) no-repeat;background-size:1.5em}.emojify.first_quarter_moon_with_face{background:url(first_quarter_moon_with_face.png) no-repeat;background-size:1.5em}.emojify.moon{background:url(moon.png) no-repeat;background-size:1.5em}.emojify.earth_africa{background:url(earth_africa.png) no-repeat;background-size:1.5em}.emojify.earth_americas{background:url(earth_americas.png) no-repeat;background-size:1.5em}.emojify.earth_asia{background:url(earth_asia.png) no-repeat;background-size:1.5em}.emojify.volcano{background:url(volcano.png) no-repeat;background-size:1.5em}.emojify.milky_way{background:url(milky_way.png) no-repeat;background-size:1.5em}.emojify.partly_sunny{background:url(partly_sunny.png) no-repeat;background-size:1.5em}.emojify.octocat{background:url(octocat.png) no-repeat;background-size:1.5em}.emojify.squirrel{background:url(squirrel.png) no-repeat;background-size:1.5em}.emojify.bamboo{background:url(bamboo.png) no-repeat;background-size:1.5em}.emojify.gift_heart{background:url(gift_heart.png) no-repeat;background-size:1.5em}.emojify.dolls{background:url(dolls.png) no-repeat;background-size:1.5em}.emojify.school_satchel{background:url(school_satchel.png) no-repeat;background-size:1.5em}.emojify.mortar_board{background:url(mortar_board.png) no-repeat;background-size:1.5em}.emojify.flags{background:url(flags.png) no-repeat;background-size:1.5em}.emojify.fireworks{background:url(fireworks.png) no-repeat;background-size:1.5em}.emojify.sparkler{background:url(sparkler.png) no-repeat;background-size:1.5em}.emojify.wind_chime{background:url(wind_chime.png) no-repeat;background-size:1.5em}.emojify.rice_scene{background:url(rice_scene.png) no-repeat;background-size:1.5em}.emojify.jack_o_lantern{background:url(jack_o_lantern.png) no-repeat;background-size:1.5em}.emojify.ghost{background:url(ghost.png) no-repeat;background-size:1.5em}.emojify.santa{background:url(santa.png) no-repeat;background-size:1.5em}.emojify.christmas_tree{background:url(christmas_tree.png) no-repeat;background-size:1.5em}.emojify.gift{background:url(gift.png) no-repeat;background-size:1.5em}.emojify.bell{background:url(bell.png) no-repeat;background-size:1.5em}.emojify.no_bell{background:url(no_bell.png) no-repeat;background-size:1.5em}.emojify.tanabata_tree{background:url(tanabata_tree.png) no-repeat;background-size:1.5em}.emojify.tada{background:url(tada.png) no-repeat;background-size:1.5em}.emojify.confetti_ball{background:url(confetti_ball.png) no-repeat;background-size:1.5em}.emojify.balloon{background:url(balloon.png) no-repeat;background-size:1.5em}.emojify.crystal_ball{background:url(crystal_ball.png) no-repeat;background-size:1.5em}.emojify.cd{background:url(cd.png) no-repeat;background-size:1.5em}.emojify.dvd{background:url(dvd.png) no-repeat;background-size:1.5em}.emojify.floppy_disk{background:url(floppy_disk.png) no-repeat;background-size:1.5em}.emojify.camera{background:url(camera.png) no-repeat;background-size:1.5em}.emojify.video_camera{background:url(video_camera.png) no-repeat;background-size:1.5em}.emojify.movie_camera{background:url(movie_camera.png) no-repeat;background-size:1.5em}.emojify.computer{background:url(computer.png) no-repeat;background-size:1.5em}.emojify.tv{background:url(tv.png) no-repeat;background-size:1.5em}.emojify.iphone{background:url(iphone.png) no-repeat;background-size:1.5em}.emojify.phone{background:url(phone.png) no-repeat;background-size:1.5em}.emojify.telephone{background:url(telephone.png) no-repeat;background-size:1.5em}.emojify.telephone_receiver{background:url(telephone_receiver.png) no-repeat;background-size:1.5em}.emojify.pager{background:url(pager.png) no-repeat;background-size:1.5em}.emojify.fax{background:url(fax.png) no-repeat;background-size:1.5em}.emojify.minidisc{background:url(minidisc.png) no-repeat;background-size:1.5em}.emojify.vhs{background:url(vhs.png) no-repeat;background-size:1.5em}.emojify.sound{background:url(sound.png) no-repeat;background-size:1.5em}.emojify.speaker{background:url(speaker.png) no-repeat;background-size:1.5em}.emojify.mute{background:url(mute.png) no-repeat;background-size:1.5em}.emojify.loudspeaker{background:url(loudspeaker.png) no-repeat;background-size:1.5em}.emojify.mega{background:url(mega.png) no-repeat;background-size:1.5em}.emojify.hourglass{background:url(hourglass.png) no-repeat;background-size:1.5em}.emojify.hourglass_flowing_sand{background:url(hourglass_flowing_sand.png) no-repeat;background-size:1.5em}.emojify.alarm_clock{background:url(alarm_clock.png) no-repeat;background-size:1.5em}.emojify.watch{background:url(watch.png) no-repeat;background-size:1.5em}.emojify.radio{background:url(radio.png) no-repeat;background-size:1.5em}.emojify.satellite{background:url(satellite.png) no-repeat;background-size:1.5em}.emojify.loop{background:url(loop.png) no-repeat;background-size:1.5em}.emojify.mag{background:url(mag.png) no-repeat;background-size:1.5em}.emojify.mag_right{background:url(mag_right.png) no-repeat;background-size:1.5em}.emojify.unlock{background:url(unlock.png) no-repeat;background-size:1.5em}.emojify.lock{background:url(lock.png) no-repeat;background-size:1.5em}.emojify.lock_with_ink_pen{background:url(lock_with_ink_pen.png) no-repeat;background-size:1.5em}.emojify.closed_lock_with_key{background:url(closed_lock_with_key.png) no-repeat;background-size:1.5em}.emojify.key{background:url(key.png) no-repeat;background-size:1.5em}.emojify.bulb{background:url(bulb.png) no-repeat;background-size:1.5em}.emojify.flashlight{background:url(flashlight.png) no-repeat;background-size:1.5em}.emojify.high_brightness{background:url(high_brightness.png) no-repeat;background-size:1.5em}.emojify.low_brightness{background:url(low_brightness.png) no-repeat;background-size:1.5em}.emojify.electric_plug{background:url(electric_plug.png) no-repeat;background-size:1.5em}.emojify.battery{background:url(battery.png) no-repeat;background-size:1.5em}.emojify.calling{background:url(calling.png) no-repeat;background-size:1.5em}.emojify.email{background:url(email.png) no-repeat;background-size:1.5em}.emojify.mailbox{background:url(mailbox.png) no-repeat;background-size:1.5em}.emojify.postbox{background:url(postbox.png) no-repeat;background-size:1.5em}.emojify.bath{background:url(bath.png) no-repeat;background-size:1.5em}.emojify.bathtub{background:url(bathtub.png) no-repeat;background-size:1.5em}.emojify.shower{background:url(shower.png) no-repeat;background-size:1.5em}.emojify.toilet{background:url(toilet.png) no-repeat;background-size:1.5em}.emojify.wrench{background:url(wrench.png) no-repeat;background-size:1.5em}.emojify.nut_and_bolt{background:url(nut_and_bolt.png) no-repeat;background-size:1.5em}.emojify.hammer{background:url(hammer.png) no-repeat;background-size:1.5em}.emojify.seat{background:url(seat.png) no-repeat;background-size:1.5em}.emojify.moneybag{background:url(moneybag.png) no-repeat;background-size:1.5em}.emojify.yen{background:url(yen.png) no-repeat;background-size:1.5em}.emojify.dollar{background:url(dollar.png) no-repeat;background-size:1.5em}.emojify.pound{background:url(pound.png) no-repeat;background-size:1.5em}.emojify.euro{background:url(euro.png) no-repeat;background-size:1.5em}.emojify.credit_card{background:url(credit_card.png) no-repeat;background-size:1.5em}.emojify.money_with_wings{background:url(money_with_wings.png) no-repeat;background-size:1.5em}.emojify.e-mail{background:url(e-mail.png) no-repeat;background-size:1.5em}.emojify.inbox_tray{background:url(inbox_tray.png) no-repeat;background-size:1.5em}.emojify.outbox_tray{background:url(outbox_tray.png) no-repeat;background-size:1.5em}.emojify.envelope{background:url(envelope.png) no-repeat;background-size:1.5em}.emojify.incoming_envelope{background:url(incoming_envelope.png) no-repeat;background-size:1.5em}.emojify.postal_horn{background:url(postal_horn.png) no-repeat;background-size:1.5em}.emojify.mailbox_closed{background:url(mailbox_closed.png) no-repeat;background-size:1.5em}.emojify.mailbox_with_mail{background:url(mailbox_with_mail.png) no-repeat;background-size:1.5em}.emojify.mailbox_with_no_mail{background:url(mailbox_with_no_mail.png) no-repeat;background-size:1.5em}.emojify.door{background:url(door.png) no-repeat;background-size:1.5em}.emojify.smoking{background:url(smoking.png) no-repeat;background-size:1.5em}.emojify.bomb{background:url(bomb.png) no-repeat;background-size:1.5em}.emojify.gun{background:url(gun.png) no-repeat;background-size:1.5em}.emojify.hocho{background:url(hocho.png) no-repeat;background-size:1.5em}.emojify.pill{background:url(pill.png) no-repeat;background-size:1.5em}.emojify.syringe{background:url(syringe.png) no-repeat;background-size:1.5em}.emojify.page_facing_up{background:url(page_facing_up.png) no-repeat;background-size:1.5em}.emojify.page_with_curl{background:url(page_with_curl.png) no-repeat;background-size:1.5em}.emojify.bookmark_tabs{background:url(bookmark_tabs.png) no-repeat;background-size:1.5em}.emojify.bar_chart{background:url(bar_chart.png) no-repeat;background-size:1.5em}.emojify.chart_with_upwards_trend{background:url(chart_with_upwards_trend.png) no-repeat;background-size:1.5em}.emojify.chart_with_downwards_trend{background:url(chart_with_downwards_trend.png) no-repeat;background-size:1.5em}.emojify.scroll{background:url(scroll.png) no-repeat;background-size:1.5em}.emojify.clipboard{background:url(clipboard.png) no-repeat;background-size:1.5em}.emojify.calendar{background:url(calendar.png) no-repeat;background-size:1.5em}.emojify.date{background:url(date.png) no-repeat;background-size:1.5em}.emojify.card_index{background:url(card_index.png) no-repeat;background-size:1.5em}.emojify.file_folder{background:url(file_folder.png) no-repeat;background-size:1.5em}.emojify.open_file_folder{background:url(open_file_folder.png) no-repeat;background-size:1.5em}.emojify.scissors{background:url(scissors.png) no-repeat;background-size:1.5em}.emojify.pushpin{background:url(pushpin.png) no-repeat;background-size:1.5em}.emojify.paperclip{background:url(paperclip.png) no-repeat;background-size:1.5em}.emojify.black_nib{background:url(black_nib.png) no-repeat;background-size:1.5em}.emojify.pencil2{background:url(pencil2.png) no-repeat;background-size:1.5em}.emojify.straight_ruler{background:url(straight_ruler.png) no-repeat;background-size:1.5em}.emojify.triangular_ruler{background:url(triangular_ruler.png) no-repeat;background-size:1.5em}.emojify.closed_book{background:url(closed_book.png) no-repeat;background-size:1.5em}.emojify.green_book{background:url(green_book.png) no-repeat;background-size:1.5em}.emojify.blue_book{background:url(blue_book.png) no-repeat;background-size:1.5em}.emojify.orange_book{background:url(orange_book.png) no-repeat;background-size:1.5em}.emojify.notebook{background:url(notebook.png) no-repeat;background-size:1.5em}.emojify.notebook_with_decorative_cover{background:url(notebook_with_decorative_cover.png) no-repeat;background-size:1.5em}.emojify.ledger{background:url(ledger.png) no-repeat;background-size:1.5em}.emojify.books{background:url(books.png) no-repeat;background-size:1.5em}.emojify.bookmark{background:url(bookmark.png) no-repeat;background-size:1.5em}.emojify.name_badge{background:url(name_badge.png) no-repeat;background-size:1.5em}.emojify.microscope{background:url(microscope.png) no-repeat;background-size:1.5em}.emojify.telescope{background:url(telescope.png) no-repeat;background-size:1.5em}.emojify.newspaper{background:url(newspaper.png) no-repeat;background-size:1.5em}.emojify.football{background:url(football.png) no-repeat;background-size:1.5em}.emojify.basketball{background:url(basketball.png) no-repeat;background-size:1.5em}.emojify.soccer{background:url(soccer.png) no-repeat;background-size:1.5em}.emojify.baseball{background:url(baseball.png) no-repeat;background-size:1.5em}.emojify.tennis{background:url(tennis.png) no-repeat;background-size:1.5em}.emojify.eightball{background:url(eightball.png) no-repeat;background-size:1.5em}.emojify.rugby_football{background:url(rugby_football.png) no-repeat;background-size:1.5em}.emojify.bowling{background:url(bowling.png) no-repeat;background-size:1.5em}.emojify.golf{background:url(golf.png) no-repeat;background-size:1.5em}.emojify.mountain_bicyclist{background:url(mountain_bicyclist.png) no-repeat;background-size:1.5em}.emojify.bicyclist{background:url(bicyclist.png) no-repeat;background-size:1.5em}.emojify.horse_racing{background:url(horse_racing.png) no-repeat;background-size:1.5em}.emojify.snowboarder{background:url(snowboarder.png) no-repeat;background-size:1.5em}.emojify.swimmer{background:url(swimmer.png) no-repeat;background-size:1.5em}.emojify.surfer{background:url(surfer.png) no-repeat;background-size:1.5em}.emojify.ski{background:url(ski.png) no-repeat;background-size:1.5em}.emojify.spades{background:url(spades.png) no-repeat;background-size:1.5em}.emojify.hearts{background:url(hearts.png) no-repeat;background-size:1.5em}.emojify.clubs{background:url(clubs.png) no-repeat;background-size:1.5em}.emojify.diamonds{background:url(diamonds.png) no-repeat;background-size:1.5em}.emojify.gem{background:url(gem.png) no-repeat;background-size:1.5em}.emojify.ring{background:url(ring.png) no-repeat;background-size:1.5em}.emojify.trophy{background:url(trophy.png) no-repeat;background-size:1.5em}.emojify.musical_score{background:url(musical_score.png) no-repeat;background-size:1.5em}.emojify.musical_keyboard{background:url(musical_keyboard.png) no-repeat;background-size:1.5em}.emojify.violin{background:url(violin.png) no-repeat;background-size:1.5em}.emojify.space_invader{background:url(space_invader.png) no-repeat;background-size:1.5em}.emojify.video_game{background:url(video_game.png) no-repeat;background-size:1.5em}.emojify.black_joker{background:url(black_joker.png) no-repeat;background-size:1.5em}.emojify.flower_playing_cards{background:url(flower_playing_cards.png) no-repeat;background-size:1.5em}.emojify.game_die{background:url(game_die.png) no-repeat;background-size:1.5em}.emojify.dart{background:url(dart.png) no-repeat;background-size:1.5em}.emojify.mahjong{background:url(mahjong.png) no-repeat;background-size:1.5em}.emojify.clapper{background:url(clapper.png) no-repeat;background-size:1.5em}.emojify.memo{background:url(memo.png) no-repeat;background-size:1.5em}.emojify.pencil{background:url(pencil.png) no-repeat;background-size:1.5em}.emojify.book{background:url(book.png) no-repeat;background-size:1.5em}.emojify.art{background:url(art.png) no-repeat;background-size:1.5em}.emojify.microphone{background:url(microphone.png) no-repeat;background-size:1.5em}.emojify.headphones{background:url(headphones.png) no-repeat;background-size:1.5em}.emojify.trumpet{background:url(trumpet.png) no-repeat;background-size:1.5em}.emojify.saxophone{background:url(saxophone.png) no-repeat;background-size:1.5em}.emojify.guitar{background:url(guitar.png) no-repeat;background-size:1.5em}.emojify.shoe{background:url(shoe.png) no-repeat;background-size:1.5em}.emojify.sandal{background:url(sandal.png) no-repeat;background-size:1.5em}.emojify.high_heel{background:url(high_heel.png) no-repeat;background-size:1.5em}.emojify.lipstick{background:url(lipstick.png) no-repeat;background-size:1.5em}.emojify.boot{background:url(boot.png) no-repeat;background-size:1.5em}.emojify.shirt{background:url(shirt.png) no-repeat;background-size:1.5em}.emojify.tshirt{background:url(tshirt.png) no-repeat;background-size:1.5em}.emojify.necktie{background:url(necktie.png) no-repeat;background-size:1.5em}.emojify.womans_clothes{background:url(womans_clothes.png) no-repeat;background-size:1.5em}.emojify.dress{background:url(dress.png) no-repeat;background-size:1.5em}.emojify.running_shirt_with_sash{background:url(running_shirt_with_sash.png) no-repeat;background-size:1.5em}.emojify.jeans{background:url(jeans.png) no-repeat;background-size:1.5em}.emojify.kimono{background:url(kimono.png) no-repeat;background-size:1.5em}.emojify.bikini{background:url(bikini.png) no-repeat;background-size:1.5em}.emojify.ribbon{background:url(ribbon.png) no-repeat;background-size:1.5em}.emojify.tophat{background:url(tophat.png) no-repeat;background-size:1.5em}.emojify.crown{background:url(crown.png) no-repeat;background-size:1.5em}.emojify.womans_hat{background:url(womans_hat.png) no-repeat;background-size:1.5em}.emojify.mans_shoe{background:url(mans_shoe.png) no-repeat;background-size:1.5em}.emojify.closed_umbrella{background:url(closed_umbrella.png) no-repeat;background-size:1.5em}.emojify.briefcase{background:url(briefcase.png) no-repeat;background-size:1.5em}.emojify.handbag{background:url(handbag.png) no-repeat;background-size:1.5em}.emojify.pouch{background:url(pouch.png) no-repeat;background-size:1.5em}.emojify.purse{background:url(purse.png) no-repeat;background-size:1.5em}.emojify.eyeglasses{background:url(eyeglasses.png) no-repeat;background-size:1.5em}.emojify.fishing_pole_and_fish{background:url(fishing_pole_and_fish.png) no-repeat;background-size:1.5em}.emojify.coffee{background:url(coffee.png) no-repeat;background-size:1.5em}.emojify.tea{background:url(tea.png) no-repeat;background-size:1.5em}.emojify.sake{background:url(sake.png) no-repeat;background-size:1.5em}.emojify.baby_bottle{background:url(baby_bottle.png) no-repeat;background-size:1.5em}.emojify.beer{background:url(beer.png) no-repeat;background-size:1.5em}.emojify.beers{background:url(beers.png) no-repeat;background-size:1.5em}.emojify.cocktail{background:url(cocktail.png) no-repeat;background-size:1.5em}.emojify.tropical_drink{background:url(tropical_drink.png) no-repeat;background-size:1.5em}.emojify.wine_glass{background:url(wine_glass.png) no-repeat;background-size:1.5em}.emojify.fork_and_knife{background:url(fork_and_knife.png) no-repeat;background-size:1.5em}.emojify.pizza{background:url(pizza.png) no-repeat;background-size:1.5em}.emojify.hamburger{background:url(hamburger.png) no-repeat;background-size:1.5em}.emojify.fries{background:url(fries.png) no-repeat;background-size:1.5em}.emojify.poultry_leg{background:url(poultry_leg.png) no-repeat;background-size:1.5em}.emojify.meat_on_bone{background:url(meat_on_bone.png) no-repeat;background-size:1.5em}.emojify.spaghetti{background:url(spaghetti.png) no-repeat;background-size:1.5em}.emojify.curry{background:url(curry.png) no-repeat;background-size:1.5em}.emojify.fried_shrimp{background:url(fried_shrimp.png) no-repeat;background-size:1.5em}.emojify.bento{background:url(bento.png) no-repeat;background-size:1.5em}.emojify.sushi{background:url(sushi.png) no-repeat;background-size:1.5em}.emojify.fish_cake{background:url(fish_cake.png) no-repeat;background-size:1.5em}.emojify.rice_ball{background:url(rice_ball.png) no-repeat;background-size:1.5em}.emojify.rice_cracker{background:url(rice_cracker.png) no-repeat;background-size:1.5em}.emojify.rice{background:url(rice.png) no-repeat;background-size:1.5em}.emojify.ramen{background:url(ramen.png) no-repeat;background-size:1.5em}.emojify.stew{background:url(stew.png) no-repeat;background-size:1.5em}.emojify.oden{background:url(oden.png) no-repeat;background-size:1.5em}.emojify.dango{background:url(dango.png) no-repeat;background-size:1.5em}.emojify.egg{background:url(egg.png) no-repeat;background-size:1.5em}.emojify.bread{background:url(bread.png) no-repeat;background-size:1.5em}.emojify.doughnut{background:url(doughnut.png) no-repeat;background-size:1.5em}.emojify.custard{background:url(custard.png) no-repeat;background-size:1.5em}.emojify.icecream{background:url(icecream.png) no-repeat;background-size:1.5em}.emojify.ice_cream{background:url(ice_cream.png) no-repeat;background-size:1.5em}.emojify.shaved_ice{background:url(shaved_ice.png) no-repeat;background-size:1.5em}.emojify.birthday{background:url(birthday.png) no-repeat;background-size:1.5em}.emojify.cake{background:url(cake.png) no-repeat;background-size:1.5em}.emojify.cookie{background:url(cookie.png) no-repeat;background-size:1.5em}.emojify.chocolate_bar{background:url(chocolate_bar.png) no-repeat;background-size:1.5em}.emojify.candy{background:url(candy.png) no-repeat;background-size:1.5em}.emojify.lollipop{background:url(lollipop.png) no-repeat;background-size:1.5em}.emojify.honey_pot{background:url(honey_pot.png) no-repeat;background-size:1.5em}.emojify.apple{background:url(apple.png) no-repeat;background-size:1.5em}.emojify.green_apple{background:url(green_apple.png) no-repeat;background-size:1.5em}.emojify.tangerine{background:url(tangerine.png) no-repeat;background-size:1.5em}.emojify.lemon{background:url(lemon.png) no-repeat;background-size:1.5em}.emojify.cherries{background:url(cherries.png) no-repeat;background-size:1.5em}.emojify.grapes{background:url(grapes.png) no-repeat;background-size:1.5em}.emojify.watermelon{background:url(watermelon.png) no-repeat;background-size:1.5em}.emojify.strawberry{background:url(strawberry.png) no-repeat;background-size:1.5em}.emojify.peach{background:url(peach.png) no-repeat;background-size:1.5em}.emojify.melon{background:url(melon.png) no-repeat;background-size:1.5em}.emojify.banana{background:url(banana.png) no-repeat;background-size:1.5em}.emojify.pear{background:url(pear.png) no-repeat;background-size:1.5em}.emojify.pineapple{background:url(pineapple.png) no-repeat;background-size:1.5em}.emojify.sweet_potato{background:url(sweet_potato.png) no-repeat;background-size:1.5em}.emojify.eggplant{background:url(eggplant.png) no-repeat;background-size:1.5em}.emojify.tomato{background:url(tomato.png) no-repeat;background-size:1.5em}.emojify.corn{background:url(corn.png) no-repeat;background-size:1.5em}.emojify.onezeronine{background:url(onezeronine.png) no-repeat;background-size:1.5em}.emojify.house{background:url(house.png) no-repeat;background-size:1.5em}.emojify.house_with_garden{background:url(house_with_garden.png) no-repeat;background-size:1.5em}.emojify.school{background:url(school.png) no-repeat;background-size:1.5em}.emojify.office{background:url(office.png) no-repeat;background-size:1.5em}.emojify.post_office{background:url(post_office.png) no-repeat;background-size:1.5em}.emojify.hospital{background:url(hospital.png) no-repeat;background-size:1.5em}.emojify.bank{background:url(bank.png) no-repeat;background-size:1.5em}.emojify.convenience_store{background:url(convenience_store.png) no-repeat;background-size:1.5em}.emojify.love_hotel{background:url(love_hotel.png) no-repeat;background-size:1.5em}.emojify.hotel{background:url(hotel.png) no-repeat;background-size:1.5em}.emojify.wedding{background:url(wedding.png) no-repeat;background-size:1.5em}.emojify.church{background:url(church.png) no-repeat;background-size:1.5em}.emojify.department_store{background:url(department_store.png) no-repeat;background-size:1.5em}.emojify.european_post_office{background:url(european_post_office.png) no-repeat;background-size:1.5em}.emojify.city_sunrise{background:url(city_sunrise.png) no-repeat;background-size:1.5em}.emojify.city_sunset{background:url(city_sunset.png) no-repeat;background-size:1.5em}.emojify.japanese_castle{background:url(japanese_castle.png) no-repeat;background-size:1.5em}.emojify.european_castle{background:url(european_castle.png) no-repeat;background-size:1.5em}.emojify.tent{background:url(tent.png) no-repeat;background-size:1.5em}.emojify.factory{background:url(factory.png) no-repeat;background-size:1.5em}.emojify.tokyo_tower{background:url(tokyo_tower.png) no-repeat;background-size:1.5em}.emojify.japan{background:url(japan.png) no-repeat;background-size:1.5em}.emojify.mount_fuji{background:url(mount_fuji.png) no-repeat;background-size:1.5em}.emojify.sunrise_over_mountains{background:url(sunrise_over_mountains.png) no-repeat;background-size:1.5em}.emojify.sunrise{background:url(sunrise.png) no-repeat;background-size:1.5em}.emojify.stars{background:url(stars.png) no-repeat;background-size:1.5em}.emojify.statue_of_liberty{background:url(statue_of_liberty.png) no-repeat;background-size:1.5em}.emojify.bridge_at_night{background:url(bridge_at_night.png) no-repeat;background-size:1.5em}.emojify.carousel_horse{background:url(carousel_horse.png) no-repeat;background-size:1.5em}.emojify.rainbow{background:url(rainbow.png) no-repeat;background-size:1.5em}.emojify.ferris_wheel{background:url(ferris_wheel.png) no-repeat;background-size:1.5em}.emojify.fountain{background:url(fountain.png) no-repeat;background-size:1.5em}.emojify.roller_coaster{background:url(roller_coaster.png) no-repeat;background-size:1.5em}.emojify.ship{background:url(ship.png) no-repeat;background-size:1.5em}.emojify.speedboat{background:url(speedboat.png) no-repeat;background-size:1.5em}.emojify.boat{background:url(boat.png) no-repeat;background-size:1.5em}.emojify.sailboat{background:url(sailboat.png) no-repeat;background-size:1.5em}.emojify.rowboat{background:url(rowboat.png) no-repeat;background-size:1.5em}.emojify.anchor{background:url(anchor.png) no-repeat;background-size:1.5em}.emojify.rocket{background:url(rocket.png) no-repeat;background-size:1.5em}.emojify.airplane{background:url(airplane.png) no-repeat;background-size:1.5em}.emojify.helicopter{background:url(helicopter.png) no-repeat;background-size:1.5em}.emojify.steam_locomotive{background:url(steam_locomotive.png) no-repeat;background-size:1.5em}.emojify.tram{background:url(tram.png) no-repeat;background-size:1.5em}.emojify.mountain_railway{background:url(mountain_railway.png) no-repeat;background-size:1.5em}.emojify.bike{background:url(bike.png) no-repeat;background-size:1.5em}.emojify.aerial_tramway{background:url(aerial_tramway.png) no-repeat;background-size:1.5em}.emojify.suspension_railway{background:url(suspension_railway.png) no-repeat;background-size:1.5em}.emojify.mountain_cableway{background:url(mountain_cableway.png) no-repeat;background-size:1.5em}.emojify.tractor{background:url(tractor.png) no-repeat;background-size:1.5em}.emojify.blue_car{background:url(blue_car.png) no-repeat;background-size:1.5em}.emojify.oncoming_automobile{background:url(oncoming_automobile.png) no-repeat;background-size:1.5em}.emojify.car{background:url(car.png) no-repeat;background-size:1.5em}.emojify.red_car{background:url(red_car.png) no-repeat;background-size:1.5em}.emojify.taxi{background:url(taxi.png) no-repeat;background-size:1.5em}.emojify.oncoming_taxi{background:url(oncoming_taxi.png) no-repeat;background-size:1.5em}.emojify.articulated_lorry{background:url(articulated_lorry.png) no-repeat;background-size:1.5em}.emojify.bus{background:url(bus.png) no-repeat;background-size:1.5em}.emojify.oncoming_bus{background:url(oncoming_bus.png) no-repeat;background-size:1.5em}.emojify.rotating_light{background:url(rotating_light.png) no-repeat;background-size:1.5em}.emojify.police_car{background:url(police_car.png) no-repeat;background-size:1.5em}.emojify.oncoming_police_car{background:url(oncoming_police_car.png) no-repeat;background-size:1.5em}.emojify.fire_engine{background:url(fire_engine.png) no-repeat;background-size:1.5em}.emojify.ambulance{background:url(ambulance.png) no-repeat;background-size:1.5em}.emojify.minibus{background:url(minibus.png) no-repeat;background-size:1.5em}.emojify.truck{background:url(truck.png) no-repeat;background-size:1.5em}.emojify.train{background:url(train.png) no-repeat;background-size:1.5em}.emojify.station{background:url(station.png) no-repeat;background-size:1.5em}.emojify.train2{background:url(train2.png) no-repeat;background-size:1.5em}.emojify.bullettrain_front{background:url(bullettrain_front.png) no-repeat;background-size:1.5em}.emojify.bullettrain_side{background:url(bullettrain_side.png) no-repeat;background-size:1.5em}.emojify.light_rail{background:url(light_rail.png) no-repeat;background-size:1.5em}.emojify.monorail{background:url(monorail.png) no-repeat;background-size:1.5em}.emojify.railway_car{background:url(railway_car.png) no-repeat;background-size:1.5em}.emojify.trolleybus{background:url(trolleybus.png) no-repeat;background-size:1.5em}.emojify.ticket{background:url(ticket.png) no-repeat;background-size:1.5em}.emojify.fuelpump{background:url(fuelpump.png) no-repeat;background-size:1.5em}.emojify.vertical_traffic_light{background:url(vertical_traffic_light.png) no-repeat;background-size:1.5em}.emojify.traffic_light{background:url(traffic_light.png) no-repeat;background-size:1.5em}.emojify.warning{background:url(warning.png) no-repeat;background-size:1.5em}.emojify.construction{background:url(construction.png) no-repeat;background-size:1.5em}.emojify.beginner{background:url(beginner.png) no-repeat;background-size:1.5em}.emojify.atm{background:url(atm.png) no-repeat;background-size:1.5em}.emojify.slot_machine{background:url(slot_machine.png) no-repeat;background-size:1.5em}.emojify.busstop{background:url(busstop.png) no-repeat;background-size:1.5em}.emojify.barber{background:url(barber.png) no-repeat;background-size:1.5em}.emojify.hotsprings{background:url(hotsprings.png) no-repeat;background-size:1.5em}.emojify.checkered_flag{background:url(checkered_flag.png) no-repeat;background-size:1.5em}.emojify.crossed_flags{background:url(crossed_flags.png) no-repeat;background-size:1.5em}.emojify.izakaya_lantern{background:url(izakaya_lantern.png) no-repeat;background-size:1.5em}.emojify.moyai{background:url(moyai.png) no-repeat;background-size:1.5em}.emojify.circus_tent{background:url(circus_tent.png) no-repeat;background-size:1.5em}.emojify.performing_arts{background:url(performing_arts.png) no-repeat;background-size:1.5em}.emojify.round_pushpin{background:url(round_pushpin.png) no-repeat;background-size:1.5em}.emojify.triangular_flag_on_post{background:url(triangular_flag_on_post.png) no-repeat;background-size:1.5em}.emojify.jp{background:url(jp.png) no-repeat;background-size:1.5em}.emojify.kr{background:url(kr.png) no-repeat;background-size:1.5em}.emojify.cn{background:url(cn.png) no-repeat;background-size:1.5em}.emojify.us{background:url(us.png) no-repeat;background-size:1.5em}.emojify.fr{background:url(fr.png) no-repeat;background-size:1.5em}.emojify.es{background:url(es.png) no-repeat;background-size:1.5em}.emojify.it{background:url(it.png) no-repeat;background-size:1.5em}.emojify.ru{background:url(ru.png) no-repeat;background-size:1.5em}.emojify.gb{background:url(gb.png) no-repeat;background-size:1.5em}.emojify.uk{background:url(uk.png) no-repeat;background-size:1.5em}.emojify.de{background:url(de.png) no-repeat;background-size:1.5em}.emojify.one{background:url(one.png) no-repeat;background-size:1.5em}.emojify.two{background:url(two.png) no-repeat;background-size:1.5em}.emojify.three{background:url(three.png) no-repeat;background-size:1.5em}.emojify.four{background:url(four.png) no-repeat;background-size:1.5em}.emojify.five{background:url(five.png) no-repeat;background-size:1.5em}.emojify.six{background:url(six.png) no-repeat;background-size:1.5em}.emojify.seven{background:url(seven.png) no-repeat;background-size:1.5em}.emojify.eight{background:url(eight.png) no-repeat;background-size:1.5em}.emojify.nine{background:url(nine.png) no-repeat;background-size:1.5em}.emojify.keycap_ten{background:url(keycap_ten.png) no-repeat;background-size:1.5em}.emojify.onetwothreefour{background:url(onetwothreefour.png) no-repeat;background-size:1.5em}.emojify.zero{background:url(zero.png) no-repeat;background-size:1.5em}.emojify.hash{background:url(hash.png) no-repeat;background-size:1.5em}.emojify.symbols{background:url(symbols.png) no-repeat;background-size:1.5em}.emojify.arrow_backward{background:url(arrow_backward.png) no-repeat;background-size:1.5em}.emojify.arrow_down{background:url(arrow_down.png) no-repeat;background-size:1.5em}.emojify.arrow_forward{background:url(arrow_forward.png) no-repeat;background-size:1.5em}.emojify.arrow_left{background:url(arrow_left.png) no-repeat;background-size:1.5em}.emojify.capital_abcd{background:url(capital_abcd.png) no-repeat;background-size:1.5em}.emojify.abcd{background:url(abcd.png) no-repeat;background-size:1.5em}.emojify.abc{background:url(abc.png) no-repeat;background-size:1.5em}.emojify.arrow_lower_left{background:url(arrow_lower_left.png) no-repeat;background-size:1.5em}.emojify.arrow_lower_right{background:url(arrow_lower_right.png) no-repeat;background-size:1.5em}.emojify.arrow_right{background:url(arrow_right.png) no-repeat;background-size:1.5em}.emojify.arrow_up{background:url(arrow_up.png) no-repeat;background-size:1.5em}.emojify.arrow_upper_left{background:url(arrow_upper_left.png) no-repeat;background-size:1.5em}.emojify.arrow_upper_right{background:url(arrow_upper_right.png) no-repeat;background-size:1.5em}.emojify.arrow_double_down{background:url(arrow_double_down.png) no-repeat;background-size:1.5em}.emojify.arrow_double_up{background:url(arrow_double_up.png) no-repeat;background-size:1.5em}.emojify.arrow_down_small{background:url(arrow_down_small.png) no-repeat;background-size:1.5em}.emojify.arrow_heading_down{background:url(arrow_heading_down.png) no-repeat;background-size:1.5em}.emojify.arrow_heading_up{background:url(arrow_heading_up.png) no-repeat;background-size:1.5em}.emojify.leftwards_arrow_with_hook{background:url(leftwards_arrow_with_hook.png) no-repeat;background-size:1.5em}.emojify.arrow_right_hook{background:url(arrow_right_hook.png) no-repeat;background-size:1.5em}.emojify.left_right_arrow{background:url(left_right_arrow.png) no-repeat;background-size:1.5em}.emojify.arrow_up_down{background:url(arrow_up_down.png) no-repeat;background-size:1.5em}.emojify.arrow_up_small{background:url(arrow_up_small.png) no-repeat;background-size:1.5em}.emojify.arrows_clockwise{background:url(arrows_clockwise.png) no-repeat;background-size:1.5em}.emojify.arrows_counterclockwise{background:url(arrows_counterclockwise.png) no-repeat;background-size:1.5em}.emojify.rewind{background:url(rewind.png) no-repeat;background-size:1.5em}.emojify.fast_forward{background:url(fast_forward.png) no-repeat;background-size:1.5em}.emojify.information_source{background:url(information_source.png) no-repeat;background-size:1.5em}.emojify.ok{background:url(ok.png) no-repeat;background-size:1.5em}.emojify.twisted_rightwards_arrows{background:url(twisted_rightwards_arrows.png) no-repeat;background-size:1.5em}.emojify.repeat{background:url(repeat.png) no-repeat;background-size:1.5em}.emojify.repeat_one{background:url(repeat_one.png) no-repeat;background-size:1.5em}.emojify.new{background:url(new.png) no-repeat;background-size:1.5em}.emojify.top{background:url(top.png) no-repeat;background-size:1.5em}.emojify.up{background:url(up.png) no-repeat;background-size:1.5em}.emojify.cool{background:url(cool.png) no-repeat;background-size:1.5em}.emojify.free{background:url(free.png) no-repeat;background-size:1.5em}.emojify.ng{background:url(ng.png) no-repeat;background-size:1.5em}.emojify.cinema{background:url(cinema.png) no-repeat;background-size:1.5em}.emojify.koko{background:url(koko.png) no-repeat;background-size:1.5em}.emojify.signal_strength{background:url(signal_strength.png) no-repeat;background-size:1.5em}.emojify.u5272{background:url(u5272.png) no-repeat;background-size:1.5em}.emojify.u5408{background:url(u5408.png) no-repeat;background-size:1.5em}.emojify.u55b6{background:url(u55b6.png) no-repeat;background-size:1.5em}.emojify.u6307{background:url(u6307.png) no-repeat;background-size:1.5em}.emojify.u6708{background:url(u6708.png) no-repeat;background-size:1.5em}.emojify.u6709{background:url(u6709.png) no-repeat;background-size:1.5em}.emojify.u6e80{background:url(u6e80.png) no-repeat;background-size:1.5em}.emojify.u7121{background:url(u7121.png) no-repeat;background-size:1.5em}.emojify.u7533{background:url(u7533.png) no-repeat;background-size:1.5em}.emojify.u7a7a{background:url(u7a7a.png) no-repeat;background-size:1.5em}.emojify.u7981{background:url(u7981.png) no-repeat;background-size:1.5em}.emojify.sa{background:url(sa.png) no-repeat;background-size:1.5em}.emojify.restroom{background:url(restroom.png) no-repeat;background-size:1.5em}.emojify.mens{background:url(mens.png) no-repeat;background-size:1.5em}.emojify.womens{background:url(womens.png) no-repeat;background-size:1.5em}.emojify.baby_symbol{background:url(baby_symbol.png) no-repeat;background-size:1.5em}.emojify.no_smoking{background:url(no_smoking.png) no-repeat;background-size:1.5em}.emojify.parking{background:url(parking.png) no-repeat;background-size:1.5em}.emojify.wheelchair{background:url(wheelchair.png) no-repeat;background-size:1.5em}.emojify.metro{background:url(metro.png) no-repeat;background-size:1.5em}.emojify.baggage_claim{background:url(baggage_claim.png) no-repeat;background-size:1.5em}.emojify.accept{background:url(accept.png) no-repeat;background-size:1.5em}.emojify.wc{background:url(wc.png) no-repeat;background-size:1.5em}.emojify.potable_water{background:url(potable_water.png) no-repeat;background-size:1.5em}.emojify.put_litter_in_its_place{background:url(put_litter_in_its_place.png) no-repeat;background-size:1.5em}.emojify.secret{background:url(secret.png) no-repeat;background-size:1.5em}.emojify.congratulations{background:url(congratulations.png) no-repeat;background-size:1.5em}.emojify.m{background:url(m.png) no-repeat;background-size:1.5em}.emojify.passport_control{background:url(passport_control.png) no-repeat;background-size:1.5em}.emojify.left_luggage{background:url(left_luggage.png) no-repeat;background-size:1.5em}.emojify.customs{background:url(customs.png) no-repeat;background-size:1.5em}.emojify.ideograph_advantage{background:url(ideograph_advantage.png) no-repeat;background-size:1.5em}.emojify.cl{background:url(cl.png) no-repeat;background-size:1.5em}.emojify.sos{background:url(sos.png) no-repeat;background-size:1.5em}.emojify.id{background:url(id.png) no-repeat;background-size:1.5em}.emojify.no_entry_sign{background:url(no_entry_sign.png) no-repeat;background-size:1.5em}.emojify.underage{background:url(underage.png) no-repeat;background-size:1.5em}.emojify.no_mobile_phones{background:url(no_mobile_phones.png) no-repeat;background-size:1.5em}.emojify.do_not_litter{background:url(do_not_litter.png) no-repeat;background-size:1.5em}.emojify.non-potable_water{background:url(non-potable_water.png) no-repeat;background-size:1.5em}.emojify.no_bicycles{background:url(no_bicycles.png) no-repeat;background-size:1.5em}.emojify.no_pedestrians{background:url(no_pedestrians.png) no-repeat;background-size:1.5em}.emojify.children_crossing{background:url(children_crossing.png) no-repeat;background-size:1.5em}.emojify.no_entry{background:url(no_entry.png) no-repeat;background-size:1.5em}.emojify.eight_spoked_asterisk{background:url(eight_spoked_asterisk.png) no-repeat;background-size:1.5em}.emojify.eight_pointed_black_star{background:url(eight_pointed_black_star.png) no-repeat;background-size:1.5em}.emojify.heart_decoration{background:url(heart_decoration.png) no-repeat;background-size:1.5em}.emojify.vs{background:url(vs.png) no-repeat;background-size:1.5em}.emojify.vibration_mode{background:url(vibration_mode.png) no-repeat;background-size:1.5em}.emojify.mobile_phone_off{background:url(mobile_phone_off.png) no-repeat;background-size:1.5em}.emojify.chart{background:url(chart.png) no-repeat;background-size:1.5em}.emojify.currency_exchange{background:url(currency_exchange.png) no-repeat;background-size:1.5em}.emojify.aries{background:url(aries.png) no-repeat;background-size:1.5em}.emojify.taurus{background:url(taurus.png) no-repeat;background-size:1.5em}.emojify.gemini{background:url(gemini.png) no-repeat;background-size:1.5em}.emojify.cancer{background:url(cancer.png) no-repeat;background-size:1.5em}.emojify.leo{background:url(leo.png) no-repeat;background-size:1.5em}.emojify.virgo{background:url(virgo.png) no-repeat;background-size:1.5em}.emojify.libra{background:url(libra.png) no-repeat;background-size:1.5em}.emojify.scorpius{background:url(scorpius.png) no-repeat;background-size:1.5em}.emojify.sagittarius{background:url(sagittarius.png) no-repeat;background-size:1.5em}.emojify.capricorn{background:url(capricorn.png) no-repeat;background-size:1.5em}.emojify.aquarius{background:url(aquarius.png) no-repeat;background-size:1.5em}.emojify.pisces{background:url(pisces.png) no-repeat;background-size:1.5em}.emojify.ophiuchus{background:url(ophiuchus.png) no-repeat;background-size:1.5em}.emojify.six_pointed_star{background:url(six_pointed_star.png) no-repeat;background-size:1.5em}.emojify.negative_squared_cross_mark{background:url(negative_squared_cross_mark.png) no-repeat;background-size:1.5em}.emojify.a{background:url(a.png) no-repeat;background-size:1.5em}.emojify.b{background:url(b.png) no-repeat;background-size:1.5em}.emojify.ab{background:url(ab.png) no-repeat;background-size:1.5em}.emojify.o2{background:url(o2.png) no-repeat;background-size:1.5em}.emojify.diamond_shape_with_a_dot_inside{background:url(diamond_shape_with_a_dot_inside.png) no-repeat;background-size:1.5em}.emojify.recycle{background:url(recycle.png) no-repeat;background-size:1.5em}.emojify.end{background:url(end.png) no-repeat;background-size:1.5em}.emojify.on{background:url(on.png) no-repeat;background-size:1.5em}.emojify.soon{background:url(soon.png) no-repeat;background-size:1.5em}.emojify.clock1{background:url(clock1.png) no-repeat;background-size:1.5em}.emojify.clock130{background:url(clock130.png) no-repeat;background-size:1.5em}.emojify.clock10{background:url(clock10.png) no-repeat;background-size:1.5em}.emojify.clock1030{background:url(clock1030.png) no-repeat;background-size:1.5em}.emojify.clock11{background:url(clock11.png) no-repeat;background-size:1.5em}.emojify.clock1130{background:url(clock1130.png) no-repeat;background-size:1.5em}.emojify.clock12{background:url(clock12.png) no-repeat;background-size:1.5em}.emojify.clock1230{background:url(clock1230.png) no-repeat;background-size:1.5em}.emojify.clock2{background:url(clock2.png) no-repeat;background-size:1.5em}.emojify.clock230{background:url(clock230.png) no-repeat;background-size:1.5em}.emojify.clock3{background:url(clock3.png) no-repeat;background-size:1.5em}.emojify.clock330{background:url(clock330.png) no-repeat;background-size:1.5em}.emojify.clock4{background:url(clock4.png) no-repeat;background-size:1.5em}.emojify.clock430{background:url(clock430.png) no-repeat;background-size:1.5em}.emojify.clock5{background:url(clock5.png) no-repeat;background-size:1.5em}.emojify.clock530{background:url(clock530.png) no-repeat;background-size:1.5em}.emojify.clock6{background:url(clock6.png) no-repeat;background-size:1.5em}.emojify.clock630{background:url(clock630.png) no-repeat;background-size:1.5em}.emojify.clock7{background:url(clock7.png) no-repeat;background-size:1.5em}.emojify.clock730{background:url(clock730.png) no-repeat;background-size:1.5em}.emojify.clock8{background:url(clock8.png) no-repeat;background-size:1.5em}.emojify.clock830{background:url(clock830.png) no-repeat;background-size:1.5em}.emojify.clock9{background:url(clock9.png) no-repeat;background-size:1.5em}.emojify.clock930{background:url(clock930.png) no-repeat;background-size:1.5em}.emojify.heavy_dollar_sign{background:url(heavy_dollar_sign.png) no-repeat;background-size:1.5em}.emojify.copyright{background:url(copyright.png) no-repeat;background-size:1.5em}.emojify.registered{background:url(registered.png) no-repeat;background-size:1.5em}.emojify.tm{background:url(tm.png) no-repeat;background-size:1.5em}.emojify.x{background:url(x.png) no-repeat;background-size:1.5em}.emojify.heavy_exclamation_mark{background:url(heavy_exclamation_mark.png) no-repeat;background-size:1.5em}.emojify.bangbang{background:url(bangbang.png) no-repeat;background-size:1.5em}.emojify.interrobang{background:url(interrobang.png) no-repeat;background-size:1.5em}.emojify.o{background:url(o.png) no-repeat;background-size:1.5em}.emojify.heavy_multiplication_x{background:url(heavy_multiplication_x.png) no-repeat;background-size:1.5em}.emojify.heavy_plus_sign{background:url(heavy_plus_sign.png) no-repeat;background-size:1.5em}.emojify.heavy_minus_sign{background:url(heavy_minus_sign.png) no-repeat;background-size:1.5em}.emojify.heavy_division_sign{background:url(heavy_division_sign.png) no-repeat;background-size:1.5em}.emojify.white_flower{background:url(white_flower.png) no-repeat;background-size:1.5em}.emojify.onehundred{background:url(onehundred.png) no-repeat;background-size:1.5em}.emojify.heavy_check_mark{background:url(heavy_check_mark.png) no-repeat;background-size:1.5em}.emojify.ballot_box_with_check{background:url(ballot_box_with_check.png) no-repeat;background-size:1.5em}.emojify.radio_button{background:url(radio_button.png) no-repeat;background-size:1.5em}.emojify.link{background:url(link.png) no-repeat;background-size:1.5em}.emojify.curly_loop{background:url(curly_loop.png) no-repeat;background-size:1.5em}.emojify.wavy_dash{background:url(wavy_dash.png) no-repeat;background-size:1.5em}.emojify.part_alternation_mark{background:url(part_alternation_mark.png) no-repeat;background-size:1.5em}.emojify.trident{background:url(trident.png) no-repeat;background-size:1.5em}.emojify.black_square{background:url(black_square.png) no-repeat;background-size:1.5em}.emojify.white_square{background:url(white_square.png) no-repeat;background-size:1.5em}.emojify.white_check_mark{background:url(white_check_mark.png) no-repeat;background-size:1.5em}.emojify.black_square_button{background:url(black_square_button.png) no-repeat;background-size:1.5em}.emojify.white_square_button{background:url(white_square_button.png) no-repeat;background-size:1.5em}.emojify.black_circle{background:url(black_circle.png) no-repeat;background-size:1.5em}.emojify.white_circle{background:url(white_circle.png) no-repeat;background-size:1.5em}.emojify.red_circle{background:url(red_circle.png) no-repeat;background-size:1.5em}.emojify.large_blue_circle{background:url(large_blue_circle.png) no-repeat;background-size:1.5em}.emojify.large_blue_diamond{background:url(large_blue_diamond.png) no-repeat;background-size:1.5em}.emojify.large_orange_diamond{background:url(large_orange_diamond.png) no-repeat;background-size:1.5em}.emojify.small_blue_diamond{background:url(small_blue_diamond.png) no-repeat;background-size:1.5em}.emojify.small_orange_diamond{background:url(small_orange_diamond.png) no-repeat;background-size:1.5em}.emojify.small_red_triangle{background:url(small_red_triangle.png) no-repeat;background-size:1.5em}.emojify.small_red_triangle_down{background:url(small_red_triangle_down.png) no-repeat;background-size:1.5em}.emojify.shipit{background:url(shipit.png) no-repeat;background-size:1.5em} \ No newline at end of file diff --git a/static/editor.md/plugins/emoji-dialog/emoji/end.png b/static/editor.md/plugins/emoji-dialog/emoji/end.png new file mode 100644 index 0000000..edb0bda Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/end.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/envelope.png b/static/editor.md/plugins/emoji-dialog/emoji/envelope.png new file mode 100644 index 0000000..3631861 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/envelope.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/es.png b/static/editor.md/plugins/emoji-dialog/emoji/es.png new file mode 100644 index 0000000..71b30bf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/es.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/euro.png b/static/editor.md/plugins/emoji-dialog/emoji/euro.png new file mode 100644 index 0000000..1c5904b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/euro.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/european_castle.png b/static/editor.md/plugins/emoji-dialog/emoji/european_castle.png new file mode 100644 index 0000000..8229b8a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/european_castle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/european_post_office.png b/static/editor.md/plugins/emoji-dialog/emoji/european_post_office.png new file mode 100644 index 0000000..0f65b14 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/european_post_office.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/evergreen_tree.png b/static/editor.md/plugins/emoji-dialog/emoji/evergreen_tree.png new file mode 100644 index 0000000..ae8ad10 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/evergreen_tree.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/exclamation.png b/static/editor.md/plugins/emoji-dialog/emoji/exclamation.png new file mode 100644 index 0000000..77bbdea Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/exclamation.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/expressionless.png b/static/editor.md/plugins/emoji-dialog/emoji/expressionless.png new file mode 100644 index 0000000..913ff4e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/expressionless.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/eyeglasses.png b/static/editor.md/plugins/emoji-dialog/emoji/eyeglasses.png new file mode 100644 index 0000000..a3cf75a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/eyeglasses.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/eyes.png b/static/editor.md/plugins/emoji-dialog/emoji/eyes.png new file mode 100644 index 0000000..dc2216f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/eyes.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/facepunch.png b/static/editor.md/plugins/emoji-dialog/emoji/facepunch.png new file mode 100644 index 0000000..277047b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/facepunch.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/factory.png b/static/editor.md/plugins/emoji-dialog/emoji/factory.png new file mode 100644 index 0000000..6404634 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/factory.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fallen_leaf.png b/static/editor.md/plugins/emoji-dialog/emoji/fallen_leaf.png new file mode 100644 index 0000000..d49f9c1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fallen_leaf.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/family.png b/static/editor.md/plugins/emoji-dialog/emoji/family.png new file mode 100644 index 0000000..b4b365f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/family.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fast_forward.png b/static/editor.md/plugins/emoji-dialog/emoji/fast_forward.png new file mode 100644 index 0000000..8830e14 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fast_forward.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fax.png b/static/editor.md/plugins/emoji-dialog/emoji/fax.png new file mode 100644 index 0000000..62be2c9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fax.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fearful.png b/static/editor.md/plugins/emoji-dialog/emoji/fearful.png new file mode 100644 index 0000000..513fce4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fearful.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/feelsgood.png b/static/editor.md/plugins/emoji-dialog/emoji/feelsgood.png new file mode 100644 index 0000000..361f969 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/feelsgood.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/feet.png b/static/editor.md/plugins/emoji-dialog/emoji/feet.png new file mode 100644 index 0000000..1b0147b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/feet.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ferris_wheel.png b/static/editor.md/plugins/emoji-dialog/emoji/ferris_wheel.png new file mode 100644 index 0000000..54a1dcf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ferris_wheel.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/file_folder.png b/static/editor.md/plugins/emoji-dialog/emoji/file_folder.png new file mode 100644 index 0000000..4d8bebf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/file_folder.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/finnadie.png b/static/editor.md/plugins/emoji-dialog/emoji/finnadie.png new file mode 100644 index 0000000..bfc5a0d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/finnadie.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fire.png b/static/editor.md/plugins/emoji-dialog/emoji/fire.png new file mode 100644 index 0000000..f2a3149 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fire.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fire_engine.png b/static/editor.md/plugins/emoji-dialog/emoji/fire_engine.png new file mode 100644 index 0000000..9e6c59c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fire_engine.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fireworks.png b/static/editor.md/plugins/emoji-dialog/emoji/fireworks.png new file mode 100644 index 0000000..b4eccd5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fireworks.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/first_quarter_moon.png b/static/editor.md/plugins/emoji-dialog/emoji/first_quarter_moon.png new file mode 100644 index 0000000..f38c236 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/first_quarter_moon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/first_quarter_moon_with_face.png b/static/editor.md/plugins/emoji-dialog/emoji/first_quarter_moon_with_face.png new file mode 100644 index 0000000..85ae2ce Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/first_quarter_moon_with_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fish.png b/static/editor.md/plugins/emoji-dialog/emoji/fish.png new file mode 100644 index 0000000..90bdda2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fish.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fish_cake.png b/static/editor.md/plugins/emoji-dialog/emoji/fish_cake.png new file mode 100644 index 0000000..a8f2261 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fish_cake.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fishing_pole_and_fish.png b/static/editor.md/plugins/emoji-dialog/emoji/fishing_pole_and_fish.png new file mode 100644 index 0000000..d84609c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fishing_pole_and_fish.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fist.png b/static/editor.md/plugins/emoji-dialog/emoji/fist.png new file mode 100644 index 0000000..ecc8874 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fist.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/five.png b/static/editor.md/plugins/emoji-dialog/emoji/five.png new file mode 100644 index 0000000..794321a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/five.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/flags.png b/static/editor.md/plugins/emoji-dialog/emoji/flags.png new file mode 100644 index 0000000..540164e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/flags.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/flashlight.png b/static/editor.md/plugins/emoji-dialog/emoji/flashlight.png new file mode 100644 index 0000000..215940a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/flashlight.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/floppy_disk.png b/static/editor.md/plugins/emoji-dialog/emoji/floppy_disk.png new file mode 100644 index 0000000..4ad5631 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/floppy_disk.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/flower_playing_cards.png b/static/editor.md/plugins/emoji-dialog/emoji/flower_playing_cards.png new file mode 100644 index 0000000..cc46a6a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/flower_playing_cards.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/flushed.png b/static/editor.md/plugins/emoji-dialog/emoji/flushed.png new file mode 100644 index 0000000..74b78c9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/flushed.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/foggy.png b/static/editor.md/plugins/emoji-dialog/emoji/foggy.png new file mode 100644 index 0000000..3c7b8b0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/foggy.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/football.png b/static/editor.md/plugins/emoji-dialog/emoji/football.png new file mode 100644 index 0000000..0e4e168 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/football.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fork_and_knife.png b/static/editor.md/plugins/emoji-dialog/emoji/fork_and_knife.png new file mode 100644 index 0000000..8ba4bc6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fork_and_knife.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fountain.png b/static/editor.md/plugins/emoji-dialog/emoji/fountain.png new file mode 100644 index 0000000..da126e6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fountain.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/four.png b/static/editor.md/plugins/emoji-dialog/emoji/four.png new file mode 100644 index 0000000..14782ba Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/four.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/four_leaf_clover.png b/static/editor.md/plugins/emoji-dialog/emoji/four_leaf_clover.png new file mode 100644 index 0000000..f2014be Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/four_leaf_clover.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fr.png b/static/editor.md/plugins/emoji-dialog/emoji/fr.png new file mode 100644 index 0000000..6311c91 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fr.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/free.png b/static/editor.md/plugins/emoji-dialog/emoji/free.png new file mode 100644 index 0000000..c886cf2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/free.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fried_shrimp.png b/static/editor.md/plugins/emoji-dialog/emoji/fried_shrimp.png new file mode 100644 index 0000000..c8c284b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fried_shrimp.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fries.png b/static/editor.md/plugins/emoji-dialog/emoji/fries.png new file mode 100644 index 0000000..cfef669 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fries.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/frog.png b/static/editor.md/plugins/emoji-dialog/emoji/frog.png new file mode 100644 index 0000000..cfe11b1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/frog.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/frowning.png b/static/editor.md/plugins/emoji-dialog/emoji/frowning.png new file mode 100644 index 0000000..087a662 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/frowning.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fu.png b/static/editor.md/plugins/emoji-dialog/emoji/fu.png new file mode 100644 index 0000000..61a3fee Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fu.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/fuelpump.png b/static/editor.md/plugins/emoji-dialog/emoji/fuelpump.png new file mode 100644 index 0000000..54c29ae Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/fuelpump.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/full_moon.png b/static/editor.md/plugins/emoji-dialog/emoji/full_moon.png new file mode 100644 index 0000000..8ff657a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/full_moon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/full_moon_with_face.png b/static/editor.md/plugins/emoji-dialog/emoji/full_moon_with_face.png new file mode 100644 index 0000000..d42b3f0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/full_moon_with_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/game_die.png b/static/editor.md/plugins/emoji-dialog/emoji/game_die.png new file mode 100644 index 0000000..4136e78 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/game_die.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/gb.png b/static/editor.md/plugins/emoji-dialog/emoji/gb.png new file mode 100644 index 0000000..2a62c7a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/gb.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/gem.png b/static/editor.md/plugins/emoji-dialog/emoji/gem.png new file mode 100644 index 0000000..8a5d8da Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/gem.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/gemini.png b/static/editor.md/plugins/emoji-dialog/emoji/gemini.png new file mode 100644 index 0000000..d926f6e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/gemini.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ghost.png b/static/editor.md/plugins/emoji-dialog/emoji/ghost.png new file mode 100644 index 0000000..671dd0c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ghost.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/gift.png b/static/editor.md/plugins/emoji-dialog/emoji/gift.png new file mode 100644 index 0000000..552cfdc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/gift.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/gift_heart.png b/static/editor.md/plugins/emoji-dialog/emoji/gift_heart.png new file mode 100644 index 0000000..f31c26a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/gift_heart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/girl.png b/static/editor.md/plugins/emoji-dialog/emoji/girl.png new file mode 100644 index 0000000..ea41269 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/girl.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/globe_with_meridians.png b/static/editor.md/plugins/emoji-dialog/emoji/globe_with_meridians.png new file mode 100644 index 0000000..b198646 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/globe_with_meridians.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/goat.png b/static/editor.md/plugins/emoji-dialog/emoji/goat.png new file mode 100644 index 0000000..4be9cf3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/goat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/goberserk.png b/static/editor.md/plugins/emoji-dialog/emoji/goberserk.png new file mode 100644 index 0000000..59a742a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/goberserk.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/godmode.png b/static/editor.md/plugins/emoji-dialog/emoji/godmode.png new file mode 100644 index 0000000..7e75ab2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/godmode.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/golf.png b/static/editor.md/plugins/emoji-dialog/emoji/golf.png new file mode 100644 index 0000000..cba2116 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/golf.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/grapes.png b/static/editor.md/plugins/emoji-dialog/emoji/grapes.png new file mode 100644 index 0000000..0f9f007 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/grapes.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/green_apple.png b/static/editor.md/plugins/emoji-dialog/emoji/green_apple.png new file mode 100644 index 0000000..337205c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/green_apple.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/green_book.png b/static/editor.md/plugins/emoji-dialog/emoji/green_book.png new file mode 100644 index 0000000..e86651e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/green_book.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/green_heart.png b/static/editor.md/plugins/emoji-dialog/emoji/green_heart.png new file mode 100644 index 0000000..7289cb8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/green_heart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/grey_exclamation.png b/static/editor.md/plugins/emoji-dialog/emoji/grey_exclamation.png new file mode 100644 index 0000000..a50d265 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/grey_exclamation.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/grey_question.png b/static/editor.md/plugins/emoji-dialog/emoji/grey_question.png new file mode 100644 index 0000000..fb97ba7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/grey_question.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/grimacing.png b/static/editor.md/plugins/emoji-dialog/emoji/grimacing.png new file mode 100644 index 0000000..18a63e3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/grimacing.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/grin.png b/static/editor.md/plugins/emoji-dialog/emoji/grin.png new file mode 100644 index 0000000..591cfce Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/grin.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/grinning.png b/static/editor.md/plugins/emoji-dialog/emoji/grinning.png new file mode 100644 index 0000000..7e812b7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/grinning.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/guardsman.png b/static/editor.md/plugins/emoji-dialog/emoji/guardsman.png new file mode 100644 index 0000000..b67b335 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/guardsman.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/guitar.png b/static/editor.md/plugins/emoji-dialog/emoji/guitar.png new file mode 100644 index 0000000..2b7fa43 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/guitar.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/gun.png b/static/editor.md/plugins/emoji-dialog/emoji/gun.png new file mode 100644 index 0000000..c49dc52 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/gun.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/haircut.png b/static/editor.md/plugins/emoji-dialog/emoji/haircut.png new file mode 100644 index 0000000..902d273 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/haircut.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hamburger.png b/static/editor.md/plugins/emoji-dialog/emoji/hamburger.png new file mode 100644 index 0000000..9f1a3fd Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hamburger.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hammer.png b/static/editor.md/plugins/emoji-dialog/emoji/hammer.png new file mode 100644 index 0000000..482b1c7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hammer.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hamster.png b/static/editor.md/plugins/emoji-dialog/emoji/hamster.png new file mode 100644 index 0000000..addfd2e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hamster.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hand.png b/static/editor.md/plugins/emoji-dialog/emoji/hand.png new file mode 100644 index 0000000..5e45c25 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hand.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/handbag.png b/static/editor.md/plugins/emoji-dialog/emoji/handbag.png new file mode 100644 index 0000000..d7adf04 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/handbag.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hankey.png b/static/editor.md/plugins/emoji-dialog/emoji/hankey.png new file mode 100644 index 0000000..73a4dc8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hankey.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hash.png b/static/editor.md/plugins/emoji-dialog/emoji/hash.png new file mode 100644 index 0000000..6765d7d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hash.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hatched_chick.png b/static/editor.md/plugins/emoji-dialog/emoji/hatched_chick.png new file mode 100644 index 0000000..39c25bc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hatched_chick.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hatching_chick.png b/static/editor.md/plugins/emoji-dialog/emoji/hatching_chick.png new file mode 100644 index 0000000..005a555 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hatching_chick.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/headphones.png b/static/editor.md/plugins/emoji-dialog/emoji/headphones.png new file mode 100644 index 0000000..ad83000 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/headphones.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hear_no_evil.png b/static/editor.md/plugins/emoji-dialog/emoji/hear_no_evil.png new file mode 100644 index 0000000..f97a1f9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hear_no_evil.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heart.png b/static/editor.md/plugins/emoji-dialog/emoji/heart.png new file mode 100644 index 0000000..7d7790c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heart_decoration.png b/static/editor.md/plugins/emoji-dialog/emoji/heart_decoration.png new file mode 100644 index 0000000..b8be44d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heart_decoration.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heart_eyes.png b/static/editor.md/plugins/emoji-dialog/emoji/heart_eyes.png new file mode 100644 index 0000000..0e57942 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heart_eyes.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heart_eyes_cat.png b/static/editor.md/plugins/emoji-dialog/emoji/heart_eyes_cat.png new file mode 100644 index 0000000..eeba240 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heart_eyes_cat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heartbeat.png b/static/editor.md/plugins/emoji-dialog/emoji/heartbeat.png new file mode 100644 index 0000000..b6628f6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heartbeat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heartpulse.png b/static/editor.md/plugins/emoji-dialog/emoji/heartpulse.png new file mode 100644 index 0000000..a7491cb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heartpulse.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hearts.png b/static/editor.md/plugins/emoji-dialog/emoji/hearts.png new file mode 100644 index 0000000..e894715 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hearts.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heavy_check_mark.png b/static/editor.md/plugins/emoji-dialog/emoji/heavy_check_mark.png new file mode 100644 index 0000000..d0f010b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heavy_check_mark.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heavy_division_sign.png b/static/editor.md/plugins/emoji-dialog/emoji/heavy_division_sign.png new file mode 100644 index 0000000..ac757a2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heavy_division_sign.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heavy_dollar_sign.png b/static/editor.md/plugins/emoji-dialog/emoji/heavy_dollar_sign.png new file mode 100644 index 0000000..361e26a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heavy_dollar_sign.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heavy_exclamation_mark.png b/static/editor.md/plugins/emoji-dialog/emoji/heavy_exclamation_mark.png new file mode 100644 index 0000000..4c560f5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heavy_exclamation_mark.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heavy_minus_sign.png b/static/editor.md/plugins/emoji-dialog/emoji/heavy_minus_sign.png new file mode 100644 index 0000000..4a33f90 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heavy_minus_sign.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heavy_multiplication_x.png b/static/editor.md/plugins/emoji-dialog/emoji/heavy_multiplication_x.png new file mode 100644 index 0000000..13d6660 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heavy_multiplication_x.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/heavy_plus_sign.png b/static/editor.md/plugins/emoji-dialog/emoji/heavy_plus_sign.png new file mode 100644 index 0000000..6159538 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/heavy_plus_sign.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/helicopter.png b/static/editor.md/plugins/emoji-dialog/emoji/helicopter.png new file mode 100644 index 0000000..8e82a0d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/helicopter.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/herb.png b/static/editor.md/plugins/emoji-dialog/emoji/herb.png new file mode 100644 index 0000000..de1ff1b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/herb.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hibiscus.png b/static/editor.md/plugins/emoji-dialog/emoji/hibiscus.png new file mode 100644 index 0000000..9365ae2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hibiscus.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/high_brightness.png b/static/editor.md/plugins/emoji-dialog/emoji/high_brightness.png new file mode 100644 index 0000000..ba9de7d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/high_brightness.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/high_heel.png b/static/editor.md/plugins/emoji-dialog/emoji/high_heel.png new file mode 100644 index 0000000..525b6a0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/high_heel.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hocho.png b/static/editor.md/plugins/emoji-dialog/emoji/hocho.png new file mode 100644 index 0000000..3f05193 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hocho.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/honey_pot.png b/static/editor.md/plugins/emoji-dialog/emoji/honey_pot.png new file mode 100644 index 0000000..7327889 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/honey_pot.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/honeybee.png b/static/editor.md/plugins/emoji-dialog/emoji/honeybee.png new file mode 100644 index 0000000..f537339 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/honeybee.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/horse.png b/static/editor.md/plugins/emoji-dialog/emoji/horse.png new file mode 100644 index 0000000..78d580a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/horse.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/horse_racing.png b/static/editor.md/plugins/emoji-dialog/emoji/horse_racing.png new file mode 100644 index 0000000..e3bbaec Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/horse_racing.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hospital.png b/static/editor.md/plugins/emoji-dialog/emoji/hospital.png new file mode 100644 index 0000000..c05c493 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hospital.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hotel.png b/static/editor.md/plugins/emoji-dialog/emoji/hotel.png new file mode 100644 index 0000000..d29f276 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hotel.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hotsprings.png b/static/editor.md/plugins/emoji-dialog/emoji/hotsprings.png new file mode 100644 index 0000000..a0bc9d7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hotsprings.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hourglass.png b/static/editor.md/plugins/emoji-dialog/emoji/hourglass.png new file mode 100644 index 0000000..405aab4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hourglass.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hourglass_flowing_sand.png b/static/editor.md/plugins/emoji-dialog/emoji/hourglass_flowing_sand.png new file mode 100644 index 0000000..b68eb69 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hourglass_flowing_sand.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/house.png b/static/editor.md/plugins/emoji-dialog/emoji/house.png new file mode 100644 index 0000000..95b9ee0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/house.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/house_with_garden.png b/static/editor.md/plugins/emoji-dialog/emoji/house_with_garden.png new file mode 100644 index 0000000..6261cd3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/house_with_garden.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hurtrealbad.png b/static/editor.md/plugins/emoji-dialog/emoji/hurtrealbad.png new file mode 100644 index 0000000..146ef1a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hurtrealbad.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/hushed.png b/static/editor.md/plugins/emoji-dialog/emoji/hushed.png new file mode 100644 index 0000000..b1c0108 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/hushed.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ice_cream.png b/static/editor.md/plugins/emoji-dialog/emoji/ice_cream.png new file mode 100644 index 0000000..190be01 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ice_cream.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/icecream.png b/static/editor.md/plugins/emoji-dialog/emoji/icecream.png new file mode 100644 index 0000000..871ce09 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/icecream.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/id.png b/static/editor.md/plugins/emoji-dialog/emoji/id.png new file mode 100644 index 0000000..47437a7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/id.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ideograph_advantage.png b/static/editor.md/plugins/emoji-dialog/emoji/ideograph_advantage.png new file mode 100644 index 0000000..e79af78 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ideograph_advantage.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/imp.png b/static/editor.md/plugins/emoji-dialog/emoji/imp.png new file mode 100644 index 0000000..fa7d9dc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/imp.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/inbox_tray.png b/static/editor.md/plugins/emoji-dialog/emoji/inbox_tray.png new file mode 100644 index 0000000..e2df0f8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/inbox_tray.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/incoming_envelope.png b/static/editor.md/plugins/emoji-dialog/emoji/incoming_envelope.png new file mode 100644 index 0000000..afc8271 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/incoming_envelope.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/information_desk_person.png b/static/editor.md/plugins/emoji-dialog/emoji/information_desk_person.png new file mode 100644 index 0000000..52c0a50 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/information_desk_person.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/information_source.png b/static/editor.md/plugins/emoji-dialog/emoji/information_source.png new file mode 100644 index 0000000..9cb8b09 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/information_source.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/innocent.png b/static/editor.md/plugins/emoji-dialog/emoji/innocent.png new file mode 100644 index 0000000..503b614 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/innocent.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/interrobang.png b/static/editor.md/plugins/emoji-dialog/emoji/interrobang.png new file mode 100644 index 0000000..64304b9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/interrobang.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/iphone.png b/static/editor.md/plugins/emoji-dialog/emoji/iphone.png new file mode 100644 index 0000000..df00710 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/iphone.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/it.png b/static/editor.md/plugins/emoji-dialog/emoji/it.png new file mode 100644 index 0000000..70bc9f3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/it.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/izakaya_lantern.png b/static/editor.md/plugins/emoji-dialog/emoji/izakaya_lantern.png new file mode 100644 index 0000000..18730ad Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/izakaya_lantern.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/jack_o_lantern.png b/static/editor.md/plugins/emoji-dialog/emoji/jack_o_lantern.png new file mode 100644 index 0000000..1f7667e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/jack_o_lantern.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/japan.png b/static/editor.md/plugins/emoji-dialog/emoji/japan.png new file mode 100644 index 0000000..4593280 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/japan.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/japanese_castle.png b/static/editor.md/plugins/emoji-dialog/emoji/japanese_castle.png new file mode 100644 index 0000000..f225ab2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/japanese_castle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/japanese_goblin.png b/static/editor.md/plugins/emoji-dialog/emoji/japanese_goblin.png new file mode 100644 index 0000000..bd21b18 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/japanese_goblin.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/japanese_ogre.png b/static/editor.md/plugins/emoji-dialog/emoji/japanese_ogre.png new file mode 100644 index 0000000..e9f5471 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/japanese_ogre.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/jeans.png b/static/editor.md/plugins/emoji-dialog/emoji/jeans.png new file mode 100644 index 0000000..d721cea Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/jeans.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/joy.png b/static/editor.md/plugins/emoji-dialog/emoji/joy.png new file mode 100644 index 0000000..47df693 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/joy.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/joy_cat.png b/static/editor.md/plugins/emoji-dialog/emoji/joy_cat.png new file mode 100644 index 0000000..6c60cb0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/joy_cat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/jp.png b/static/editor.md/plugins/emoji-dialog/emoji/jp.png new file mode 100644 index 0000000..b786efb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/jp.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/key.png b/static/editor.md/plugins/emoji-dialog/emoji/key.png new file mode 100644 index 0000000..3467321 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/key.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/keycap_ten.png b/static/editor.md/plugins/emoji-dialog/emoji/keycap_ten.png new file mode 100644 index 0000000..71dac1c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/keycap_ten.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/kimono.png b/static/editor.md/plugins/emoji-dialog/emoji/kimono.png new file mode 100644 index 0000000..34ffe13 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/kimono.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/kiss.png b/static/editor.md/plugins/emoji-dialog/emoji/kiss.png new file mode 100644 index 0000000..14fd991 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/kiss.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/kissing.png b/static/editor.md/plugins/emoji-dialog/emoji/kissing.png new file mode 100644 index 0000000..f3c8dcd Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/kissing.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/kissing_cat.png b/static/editor.md/plugins/emoji-dialog/emoji/kissing_cat.png new file mode 100644 index 0000000..adc62fb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/kissing_cat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/kissing_closed_eyes.png b/static/editor.md/plugins/emoji-dialog/emoji/kissing_closed_eyes.png new file mode 100644 index 0000000..449de19 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/kissing_closed_eyes.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/kissing_face.png b/static/editor.md/plugins/emoji-dialog/emoji/kissing_face.png new file mode 100644 index 0000000..449de19 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/kissing_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/kissing_heart.png b/static/editor.md/plugins/emoji-dialog/emoji/kissing_heart.png new file mode 100644 index 0000000..af9a80b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/kissing_heart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/kissing_smiling_eyes.png b/static/editor.md/plugins/emoji-dialog/emoji/kissing_smiling_eyes.png new file mode 100644 index 0000000..57f7b49 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/kissing_smiling_eyes.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/koala.png b/static/editor.md/plugins/emoji-dialog/emoji/koala.png new file mode 100644 index 0000000..e17bd3c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/koala.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/koko.png b/static/editor.md/plugins/emoji-dialog/emoji/koko.png new file mode 100644 index 0000000..3bef28c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/koko.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/kr.png b/static/editor.md/plugins/emoji-dialog/emoji/kr.png new file mode 100644 index 0000000..b4c0c1b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/kr.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/large_blue_circle.png b/static/editor.md/plugins/emoji-dialog/emoji/large_blue_circle.png new file mode 100644 index 0000000..a5b4ad4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/large_blue_circle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/large_blue_diamond.png b/static/editor.md/plugins/emoji-dialog/emoji/large_blue_diamond.png new file mode 100644 index 0000000..f4598ec Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/large_blue_diamond.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/large_orange_diamond.png b/static/editor.md/plugins/emoji-dialog/emoji/large_orange_diamond.png new file mode 100644 index 0000000..803725a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/large_orange_diamond.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/last_quarter_moon.png b/static/editor.md/plugins/emoji-dialog/emoji/last_quarter_moon.png new file mode 100644 index 0000000..6ae30d6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/last_quarter_moon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/last_quarter_moon_with_face.png b/static/editor.md/plugins/emoji-dialog/emoji/last_quarter_moon_with_face.png new file mode 100644 index 0000000..9ece82d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/last_quarter_moon_with_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/laughing.png b/static/editor.md/plugins/emoji-dialog/emoji/laughing.png new file mode 100644 index 0000000..11c91eb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/laughing.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/leaves.png b/static/editor.md/plugins/emoji-dialog/emoji/leaves.png new file mode 100644 index 0000000..5229e06 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/leaves.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ledger.png b/static/editor.md/plugins/emoji-dialog/emoji/ledger.png new file mode 100644 index 0000000..e4f72ac Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ledger.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/left_luggage.png b/static/editor.md/plugins/emoji-dialog/emoji/left_luggage.png new file mode 100644 index 0000000..1c08b46 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/left_luggage.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/left_right_arrow.png b/static/editor.md/plugins/emoji-dialog/emoji/left_right_arrow.png new file mode 100644 index 0000000..b9fd11c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/left_right_arrow.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/leftwards_arrow_with_hook.png b/static/editor.md/plugins/emoji-dialog/emoji/leftwards_arrow_with_hook.png new file mode 100644 index 0000000..bc45dfe Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/leftwards_arrow_with_hook.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/lemon.png b/static/editor.md/plugins/emoji-dialog/emoji/lemon.png new file mode 100644 index 0000000..9814dc9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/lemon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/leo.png b/static/editor.md/plugins/emoji-dialog/emoji/leo.png new file mode 100644 index 0000000..e025933 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/leo.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/leopard.png b/static/editor.md/plugins/emoji-dialog/emoji/leopard.png new file mode 100644 index 0000000..3e738d2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/leopard.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/libra.png b/static/editor.md/plugins/emoji-dialog/emoji/libra.png new file mode 100644 index 0000000..c9062dd Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/libra.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/light_rail.png b/static/editor.md/plugins/emoji-dialog/emoji/light_rail.png new file mode 100644 index 0000000..bcfe801 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/light_rail.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/link.png b/static/editor.md/plugins/emoji-dialog/emoji/link.png new file mode 100644 index 0000000..0239e48 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/link.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/lips.png b/static/editor.md/plugins/emoji-dialog/emoji/lips.png new file mode 100644 index 0000000..826ed11 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/lips.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/lipstick.png b/static/editor.md/plugins/emoji-dialog/emoji/lipstick.png new file mode 100644 index 0000000..82f990c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/lipstick.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/lock.png b/static/editor.md/plugins/emoji-dialog/emoji/lock.png new file mode 100644 index 0000000..4892b02 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/lock.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/lock_with_ink_pen.png b/static/editor.md/plugins/emoji-dialog/emoji/lock_with_ink_pen.png new file mode 100644 index 0000000..375e67e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/lock_with_ink_pen.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/lollipop.png b/static/editor.md/plugins/emoji-dialog/emoji/lollipop.png new file mode 100644 index 0000000..ba55e70 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/lollipop.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/loop.png b/static/editor.md/plugins/emoji-dialog/emoji/loop.png new file mode 100644 index 0000000..ef34df3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/loop.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/loudspeaker.png b/static/editor.md/plugins/emoji-dialog/emoji/loudspeaker.png new file mode 100644 index 0000000..752385e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/loudspeaker.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/love_hotel.png b/static/editor.md/plugins/emoji-dialog/emoji/love_hotel.png new file mode 100644 index 0000000..44d7db8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/love_hotel.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/love_letter.png b/static/editor.md/plugins/emoji-dialog/emoji/love_letter.png new file mode 100644 index 0000000..e29981f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/love_letter.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/low_brightness.png b/static/editor.md/plugins/emoji-dialog/emoji/low_brightness.png new file mode 100644 index 0000000..ea15bde Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/low_brightness.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/m.png b/static/editor.md/plugins/emoji-dialog/emoji/m.png new file mode 100644 index 0000000..7424665 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/m.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mag.png b/static/editor.md/plugins/emoji-dialog/emoji/mag.png new file mode 100644 index 0000000..aa5b1d7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mag.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mag_right.png b/static/editor.md/plugins/emoji-dialog/emoji/mag_right.png new file mode 100644 index 0000000..6e6cf11 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mag_right.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mahjong.png b/static/editor.md/plugins/emoji-dialog/emoji/mahjong.png new file mode 100644 index 0000000..f51ce65 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mahjong.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mailbox.png b/static/editor.md/plugins/emoji-dialog/emoji/mailbox.png new file mode 100644 index 0000000..8351e70 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mailbox.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mailbox_closed.png b/static/editor.md/plugins/emoji-dialog/emoji/mailbox_closed.png new file mode 100644 index 0000000..a5982b6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mailbox_closed.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mailbox_with_mail.png b/static/editor.md/plugins/emoji-dialog/emoji/mailbox_with_mail.png new file mode 100644 index 0000000..dae3459 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mailbox_with_mail.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mailbox_with_no_mail.png b/static/editor.md/plugins/emoji-dialog/emoji/mailbox_with_no_mail.png new file mode 100644 index 0000000..59f15c5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mailbox_with_no_mail.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/man.png b/static/editor.md/plugins/emoji-dialog/emoji/man.png new file mode 100644 index 0000000..d9bfa26 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/man.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/man_with_gua_pi_mao.png b/static/editor.md/plugins/emoji-dialog/emoji/man_with_gua_pi_mao.png new file mode 100644 index 0000000..7aad74b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/man_with_gua_pi_mao.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/man_with_turban.png b/static/editor.md/plugins/emoji-dialog/emoji/man_with_turban.png new file mode 100644 index 0000000..036604c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/man_with_turban.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mans_shoe.png b/static/editor.md/plugins/emoji-dialog/emoji/mans_shoe.png new file mode 100644 index 0000000..ecba9ba Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mans_shoe.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/maple_leaf.png b/static/editor.md/plugins/emoji-dialog/emoji/maple_leaf.png new file mode 100644 index 0000000..4e9b472 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/maple_leaf.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mask.png b/static/editor.md/plugins/emoji-dialog/emoji/mask.png new file mode 100644 index 0000000..05887e9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mask.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/massage.png b/static/editor.md/plugins/emoji-dialog/emoji/massage.png new file mode 100644 index 0000000..dd30d15 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/massage.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/meat_on_bone.png b/static/editor.md/plugins/emoji-dialog/emoji/meat_on_bone.png new file mode 100644 index 0000000..5b79a66 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/meat_on_bone.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mega.png b/static/editor.md/plugins/emoji-dialog/emoji/mega.png new file mode 100644 index 0000000..022df2f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mega.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/melon.png b/static/editor.md/plugins/emoji-dialog/emoji/melon.png new file mode 100644 index 0000000..11c13cb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/melon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/memo.png b/static/editor.md/plugins/emoji-dialog/emoji/memo.png new file mode 100644 index 0000000..fc97ddb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/memo.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mens.png b/static/editor.md/plugins/emoji-dialog/emoji/mens.png new file mode 100644 index 0000000..abccfc9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mens.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/metal.png b/static/editor.md/plugins/emoji-dialog/emoji/metal.png new file mode 100644 index 0000000..94f1fda Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/metal.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/metro.png b/static/editor.md/plugins/emoji-dialog/emoji/metro.png new file mode 100644 index 0000000..4acf5ab Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/metro.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/microphone.png b/static/editor.md/plugins/emoji-dialog/emoji/microphone.png new file mode 100644 index 0000000..68c74ad Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/microphone.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/microscope.png b/static/editor.md/plugins/emoji-dialog/emoji/microscope.png new file mode 100644 index 0000000..f11d54c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/microscope.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/milky_way.png b/static/editor.md/plugins/emoji-dialog/emoji/milky_way.png new file mode 100644 index 0000000..901090a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/milky_way.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/minibus.png b/static/editor.md/plugins/emoji-dialog/emoji/minibus.png new file mode 100644 index 0000000..c52cef2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/minibus.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/minidisc.png b/static/editor.md/plugins/emoji-dialog/emoji/minidisc.png new file mode 100644 index 0000000..e19cc5d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/minidisc.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mobile_phone_off.png b/static/editor.md/plugins/emoji-dialog/emoji/mobile_phone_off.png new file mode 100644 index 0000000..fa16c76 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mobile_phone_off.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/money_with_wings.png b/static/editor.md/plugins/emoji-dialog/emoji/money_with_wings.png new file mode 100644 index 0000000..135e398 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/money_with_wings.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/moneybag.png b/static/editor.md/plugins/emoji-dialog/emoji/moneybag.png new file mode 100644 index 0000000..5546c04 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/moneybag.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/monkey.png b/static/editor.md/plugins/emoji-dialog/emoji/monkey.png new file mode 100644 index 0000000..6407035 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/monkey.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/monkey_face.png b/static/editor.md/plugins/emoji-dialog/emoji/monkey_face.png new file mode 100644 index 0000000..6964cf4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/monkey_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/monorail.png b/static/editor.md/plugins/emoji-dialog/emoji/monorail.png new file mode 100644 index 0000000..913d300 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/monorail.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/moon.png b/static/editor.md/plugins/emoji-dialog/emoji/moon.png new file mode 100644 index 0000000..afdb450 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/moon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mortar_board.png b/static/editor.md/plugins/emoji-dialog/emoji/mortar_board.png new file mode 100644 index 0000000..2e811b0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mortar_board.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mount_fuji.png b/static/editor.md/plugins/emoji-dialog/emoji/mount_fuji.png new file mode 100644 index 0000000..4c313e5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mount_fuji.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mountain_bicyclist.png b/static/editor.md/plugins/emoji-dialog/emoji/mountain_bicyclist.png new file mode 100644 index 0000000..b698897 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mountain_bicyclist.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mountain_cableway.png b/static/editor.md/plugins/emoji-dialog/emoji/mountain_cableway.png new file mode 100644 index 0000000..5688bb2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mountain_cableway.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mountain_railway.png b/static/editor.md/plugins/emoji-dialog/emoji/mountain_railway.png new file mode 100644 index 0000000..1f3d1aa Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mountain_railway.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mouse.png b/static/editor.md/plugins/emoji-dialog/emoji/mouse.png new file mode 100644 index 0000000..8ff162e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mouse.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mouse2.png b/static/editor.md/plugins/emoji-dialog/emoji/mouse2.png new file mode 100644 index 0000000..2d777e5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mouse2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/movie_camera.png b/static/editor.md/plugins/emoji-dialog/emoji/movie_camera.png new file mode 100644 index 0000000..9c14384 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/movie_camera.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/moyai.png b/static/editor.md/plugins/emoji-dialog/emoji/moyai.png new file mode 100644 index 0000000..61a1a9c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/moyai.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/muscle.png b/static/editor.md/plugins/emoji-dialog/emoji/muscle.png new file mode 100644 index 0000000..19f92ef Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/muscle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mushroom.png b/static/editor.md/plugins/emoji-dialog/emoji/mushroom.png new file mode 100644 index 0000000..5eeed8e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mushroom.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/musical_keyboard.png b/static/editor.md/plugins/emoji-dialog/emoji/musical_keyboard.png new file mode 100644 index 0000000..93647a4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/musical_keyboard.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/musical_note.png b/static/editor.md/plugins/emoji-dialog/emoji/musical_note.png new file mode 100644 index 0000000..68b261b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/musical_note.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/musical_score.png b/static/editor.md/plugins/emoji-dialog/emoji/musical_score.png new file mode 100644 index 0000000..c99e338 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/musical_score.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/mute.png b/static/editor.md/plugins/emoji-dialog/emoji/mute.png new file mode 100644 index 0000000..4cf67c3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/mute.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/nail_care.png b/static/editor.md/plugins/emoji-dialog/emoji/nail_care.png new file mode 100644 index 0000000..6a66e63 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/nail_care.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/name_badge.png b/static/editor.md/plugins/emoji-dialog/emoji/name_badge.png new file mode 100644 index 0000000..2b712dc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/name_badge.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/neckbeard.png b/static/editor.md/plugins/emoji-dialog/emoji/neckbeard.png new file mode 100644 index 0000000..35ebdf0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/neckbeard.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/necktie.png b/static/editor.md/plugins/emoji-dialog/emoji/necktie.png new file mode 100644 index 0000000..80461c6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/necktie.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/negative_squared_cross_mark.png b/static/editor.md/plugins/emoji-dialog/emoji/negative_squared_cross_mark.png new file mode 100644 index 0000000..b47a0ce Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/negative_squared_cross_mark.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/neutral_face.png b/static/editor.md/plugins/emoji-dialog/emoji/neutral_face.png new file mode 100644 index 0000000..682a1ba Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/neutral_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/new.png b/static/editor.md/plugins/emoji-dialog/emoji/new.png new file mode 100644 index 0000000..28d1570 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/new.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/new_moon.png b/static/editor.md/plugins/emoji-dialog/emoji/new_moon.png new file mode 100644 index 0000000..72492cb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/new_moon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/new_moon_with_face.png b/static/editor.md/plugins/emoji-dialog/emoji/new_moon_with_face.png new file mode 100644 index 0000000..b9aff7a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/new_moon_with_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/newspaper.png b/static/editor.md/plugins/emoji-dialog/emoji/newspaper.png new file mode 100644 index 0000000..d171394 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/newspaper.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ng.png b/static/editor.md/plugins/emoji-dialog/emoji/ng.png new file mode 100644 index 0000000..2ca180a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ng.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/nine.png b/static/editor.md/plugins/emoji-dialog/emoji/nine.png new file mode 100644 index 0000000..8006cc9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/nine.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/no_bell.png b/static/editor.md/plugins/emoji-dialog/emoji/no_bell.png new file mode 100644 index 0000000..613b81c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/no_bell.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/no_bicycles.png b/static/editor.md/plugins/emoji-dialog/emoji/no_bicycles.png new file mode 100644 index 0000000..4b26216 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/no_bicycles.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/no_entry.png b/static/editor.md/plugins/emoji-dialog/emoji/no_entry.png new file mode 100644 index 0000000..cf2086a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/no_entry.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/no_entry_sign.png b/static/editor.md/plugins/emoji-dialog/emoji/no_entry_sign.png new file mode 100644 index 0000000..a8444d1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/no_entry_sign.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/no_good.png b/static/editor.md/plugins/emoji-dialog/emoji/no_good.png new file mode 100644 index 0000000..d459a35 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/no_good.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/no_mobile_phones.png b/static/editor.md/plugins/emoji-dialog/emoji/no_mobile_phones.png new file mode 100644 index 0000000..41df57c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/no_mobile_phones.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/no_mouth.png b/static/editor.md/plugins/emoji-dialog/emoji/no_mouth.png new file mode 100644 index 0000000..e678020 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/no_mouth.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/no_pedestrians.png b/static/editor.md/plugins/emoji-dialog/emoji/no_pedestrians.png new file mode 100644 index 0000000..c35f530 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/no_pedestrians.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/no_smoking.png b/static/editor.md/plugins/emoji-dialog/emoji/no_smoking.png new file mode 100644 index 0000000..5880ddf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/no_smoking.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/non-potable_water.png b/static/editor.md/plugins/emoji-dialog/emoji/non-potable_water.png new file mode 100644 index 0000000..1b29d35 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/non-potable_water.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/nose.png b/static/editor.md/plugins/emoji-dialog/emoji/nose.png new file mode 100644 index 0000000..ad17c16 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/nose.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/notebook.png b/static/editor.md/plugins/emoji-dialog/emoji/notebook.png new file mode 100644 index 0000000..07ea608 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/notebook.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/notebook_with_decorative_cover.png b/static/editor.md/plugins/emoji-dialog/emoji/notebook_with_decorative_cover.png new file mode 100644 index 0000000..4f3b14c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/notebook_with_decorative_cover.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/notes.png b/static/editor.md/plugins/emoji-dialog/emoji/notes.png new file mode 100644 index 0000000..0956d6a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/notes.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/nut_and_bolt.png b/static/editor.md/plugins/emoji-dialog/emoji/nut_and_bolt.png new file mode 100644 index 0000000..bddfa72 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/nut_and_bolt.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/o.png b/static/editor.md/plugins/emoji-dialog/emoji/o.png new file mode 100644 index 0000000..0ededeb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/o.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/o2.png b/static/editor.md/plugins/emoji-dialog/emoji/o2.png new file mode 100644 index 0000000..d85f9fb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/o2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ocean.png b/static/editor.md/plugins/emoji-dialog/emoji/ocean.png new file mode 100644 index 0000000..f8d520c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ocean.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/octocat.png b/static/editor.md/plugins/emoji-dialog/emoji/octocat.png new file mode 100644 index 0000000..361f682 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/octocat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/octopus.png b/static/editor.md/plugins/emoji-dialog/emoji/octopus.png new file mode 100644 index 0000000..52ce64b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/octopus.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/oden.png b/static/editor.md/plugins/emoji-dialog/emoji/oden.png new file mode 100644 index 0000000..73add1c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/oden.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/office.png b/static/editor.md/plugins/emoji-dialog/emoji/office.png new file mode 100644 index 0000000..ea9281a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/office.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ok.png b/static/editor.md/plugins/emoji-dialog/emoji/ok.png new file mode 100644 index 0000000..6433d1a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ok.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ok_hand.png b/static/editor.md/plugins/emoji-dialog/emoji/ok_hand.png new file mode 100644 index 0000000..80c5aeb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ok_hand.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ok_woman.png b/static/editor.md/plugins/emoji-dialog/emoji/ok_woman.png new file mode 100644 index 0000000..e8b9819 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ok_woman.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/older_man.png b/static/editor.md/plugins/emoji-dialog/emoji/older_man.png new file mode 100644 index 0000000..149f0cf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/older_man.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/older_woman.png b/static/editor.md/plugins/emoji-dialog/emoji/older_woman.png new file mode 100644 index 0000000..f839565 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/older_woman.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/on.png b/static/editor.md/plugins/emoji-dialog/emoji/on.png new file mode 100644 index 0000000..3595387 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/on.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/oncoming_automobile.png b/static/editor.md/plugins/emoji-dialog/emoji/oncoming_automobile.png new file mode 100644 index 0000000..cb46de2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/oncoming_automobile.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/oncoming_bus.png b/static/editor.md/plugins/emoji-dialog/emoji/oncoming_bus.png new file mode 100644 index 0000000..3695f76 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/oncoming_bus.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/oncoming_police_car.png b/static/editor.md/plugins/emoji-dialog/emoji/oncoming_police_car.png new file mode 100644 index 0000000..af20e7e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/oncoming_police_car.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/oncoming_taxi.png b/static/editor.md/plugins/emoji-dialog/emoji/oncoming_taxi.png new file mode 100644 index 0000000..f78cf31 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/oncoming_taxi.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/one.png b/static/editor.md/plugins/emoji-dialog/emoji/one.png new file mode 100644 index 0000000..2d1f9f8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/one.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/open_file_folder.png b/static/editor.md/plugins/emoji-dialog/emoji/open_file_folder.png new file mode 100644 index 0000000..2bbbbf5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/open_file_folder.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/open_hands.png b/static/editor.md/plugins/emoji-dialog/emoji/open_hands.png new file mode 100644 index 0000000..2cc25bd Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/open_hands.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/open_mouth.png b/static/editor.md/plugins/emoji-dialog/emoji/open_mouth.png new file mode 100644 index 0000000..daf9142 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/open_mouth.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ophiuchus.png b/static/editor.md/plugins/emoji-dialog/emoji/ophiuchus.png new file mode 100644 index 0000000..4eef715 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ophiuchus.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/orange_book.png b/static/editor.md/plugins/emoji-dialog/emoji/orange_book.png new file mode 100644 index 0000000..49650d5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/orange_book.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/outbox_tray.png b/static/editor.md/plugins/emoji-dialog/emoji/outbox_tray.png new file mode 100644 index 0000000..7ad15e6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/outbox_tray.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ox.png b/static/editor.md/plugins/emoji-dialog/emoji/ox.png new file mode 100644 index 0000000..8d98194 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ox.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/package.png b/static/editor.md/plugins/emoji-dialog/emoji/package.png new file mode 100644 index 0000000..26602af Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/package.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/page_facing_up.png b/static/editor.md/plugins/emoji-dialog/emoji/page_facing_up.png new file mode 100644 index 0000000..64cd2e1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/page_facing_up.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/page_with_curl.png b/static/editor.md/plugins/emoji-dialog/emoji/page_with_curl.png new file mode 100644 index 0000000..bf8f979 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/page_with_curl.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pager.png b/static/editor.md/plugins/emoji-dialog/emoji/pager.png new file mode 100644 index 0000000..e3e1fc4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pager.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/palm_tree.png b/static/editor.md/plugins/emoji-dialog/emoji/palm_tree.png new file mode 100644 index 0000000..d534785 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/palm_tree.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/panda_face.png b/static/editor.md/plugins/emoji-dialog/emoji/panda_face.png new file mode 100644 index 0000000..a794fb1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/panda_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/paperclip.png b/static/editor.md/plugins/emoji-dialog/emoji/paperclip.png new file mode 100644 index 0000000..677669a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/paperclip.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/parking.png b/static/editor.md/plugins/emoji-dialog/emoji/parking.png new file mode 100644 index 0000000..c24af81 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/parking.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/part_alternation_mark.png b/static/editor.md/plugins/emoji-dialog/emoji/part_alternation_mark.png new file mode 100644 index 0000000..45dc9b8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/part_alternation_mark.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/partly_sunny.png b/static/editor.md/plugins/emoji-dialog/emoji/partly_sunny.png new file mode 100644 index 0000000..020dd5f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/partly_sunny.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/passport_control.png b/static/editor.md/plugins/emoji-dialog/emoji/passport_control.png new file mode 100644 index 0000000..675b76d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/passport_control.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/paw_prints.png b/static/editor.md/plugins/emoji-dialog/emoji/paw_prints.png new file mode 100644 index 0000000..89b9fec Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/paw_prints.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/peach.png b/static/editor.md/plugins/emoji-dialog/emoji/peach.png new file mode 100644 index 0000000..ee2139e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/peach.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pear.png b/static/editor.md/plugins/emoji-dialog/emoji/pear.png new file mode 100644 index 0000000..f24aca8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pear.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pencil.png b/static/editor.md/plugins/emoji-dialog/emoji/pencil.png new file mode 100644 index 0000000..fc97ddb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pencil.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pencil2.png b/static/editor.md/plugins/emoji-dialog/emoji/pencil2.png new file mode 100644 index 0000000..61bfef9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pencil2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/penguin.png b/static/editor.md/plugins/emoji-dialog/emoji/penguin.png new file mode 100644 index 0000000..d8edbcb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/penguin.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pensive.png b/static/editor.md/plugins/emoji-dialog/emoji/pensive.png new file mode 100644 index 0000000..4159f3c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pensive.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/performing_arts.png b/static/editor.md/plugins/emoji-dialog/emoji/performing_arts.png new file mode 100644 index 0000000..899fbe5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/performing_arts.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/persevere.png b/static/editor.md/plugins/emoji-dialog/emoji/persevere.png new file mode 100644 index 0000000..f99f6da Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/persevere.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/person_frowning.png b/static/editor.md/plugins/emoji-dialog/emoji/person_frowning.png new file mode 100644 index 0000000..6f34d5e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/person_frowning.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/person_with_blond_hair.png b/static/editor.md/plugins/emoji-dialog/emoji/person_with_blond_hair.png new file mode 100644 index 0000000..c144301 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/person_with_blond_hair.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/person_with_pouting_face.png b/static/editor.md/plugins/emoji-dialog/emoji/person_with_pouting_face.png new file mode 100644 index 0000000..c4a95c3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/person_with_pouting_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/phone.png b/static/editor.md/plugins/emoji-dialog/emoji/phone.png new file mode 100644 index 0000000..87d2559 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/phone.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pig.png b/static/editor.md/plugins/emoji-dialog/emoji/pig.png new file mode 100644 index 0000000..f7f273c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pig.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pig2.png b/static/editor.md/plugins/emoji-dialog/emoji/pig2.png new file mode 100644 index 0000000..fec3374 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pig2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pig_nose.png b/static/editor.md/plugins/emoji-dialog/emoji/pig_nose.png new file mode 100644 index 0000000..38d6124 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pig_nose.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pill.png b/static/editor.md/plugins/emoji-dialog/emoji/pill.png new file mode 100644 index 0000000..cd84a78 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pill.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pineapple.png b/static/editor.md/plugins/emoji-dialog/emoji/pineapple.png new file mode 100644 index 0000000..d6f8e28 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pineapple.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pisces.png b/static/editor.md/plugins/emoji-dialog/emoji/pisces.png new file mode 100644 index 0000000..6db2c3d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pisces.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pizza.png b/static/editor.md/plugins/emoji-dialog/emoji/pizza.png new file mode 100644 index 0000000..460367d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pizza.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/plus1.png b/static/editor.md/plugins/emoji-dialog/emoji/plus1.png new file mode 100644 index 0000000..81786c1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/plus1.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/point_down.png b/static/editor.md/plugins/emoji-dialog/emoji/point_down.png new file mode 100644 index 0000000..658c6d9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/point_down.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/point_left.png b/static/editor.md/plugins/emoji-dialog/emoji/point_left.png new file mode 100644 index 0000000..38a99b4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/point_left.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/point_right.png b/static/editor.md/plugins/emoji-dialog/emoji/point_right.png new file mode 100644 index 0000000..6f9f029 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/point_right.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/point_up.png b/static/editor.md/plugins/emoji-dialog/emoji/point_up.png new file mode 100644 index 0000000..01896e2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/point_up.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/point_up_2.png b/static/editor.md/plugins/emoji-dialog/emoji/point_up_2.png new file mode 100644 index 0000000..1cfe736 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/point_up_2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/police_car.png b/static/editor.md/plugins/emoji-dialog/emoji/police_car.png new file mode 100644 index 0000000..b8f1727 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/police_car.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/poodle.png b/static/editor.md/plugins/emoji-dialog/emoji/poodle.png new file mode 100644 index 0000000..adac80b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/poodle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/poop.png b/static/editor.md/plugins/emoji-dialog/emoji/poop.png new file mode 100644 index 0000000..73a4dc8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/poop.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/post_office.png b/static/editor.md/plugins/emoji-dialog/emoji/post_office.png new file mode 100644 index 0000000..43b59e3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/post_office.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/postal_horn.png b/static/editor.md/plugins/emoji-dialog/emoji/postal_horn.png new file mode 100644 index 0000000..b12c300 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/postal_horn.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/postbox.png b/static/editor.md/plugins/emoji-dialog/emoji/postbox.png new file mode 100644 index 0000000..ce04b70 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/postbox.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/potable_water.png b/static/editor.md/plugins/emoji-dialog/emoji/potable_water.png new file mode 100644 index 0000000..e9fd560 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/potable_water.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pouch.png b/static/editor.md/plugins/emoji-dialog/emoji/pouch.png new file mode 100644 index 0000000..dc35ae8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pouch.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/poultry_leg.png b/static/editor.md/plugins/emoji-dialog/emoji/poultry_leg.png new file mode 100644 index 0000000..43ad859 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/poultry_leg.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pound.png b/static/editor.md/plugins/emoji-dialog/emoji/pound.png new file mode 100644 index 0000000..f8be91d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pound.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pouting_cat.png b/static/editor.md/plugins/emoji-dialog/emoji/pouting_cat.png new file mode 100644 index 0000000..4325fd4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pouting_cat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pray.png b/static/editor.md/plugins/emoji-dialog/emoji/pray.png new file mode 100644 index 0000000..f86c992 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pray.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/princess.png b/static/editor.md/plugins/emoji-dialog/emoji/princess.png new file mode 100644 index 0000000..1ebb2ce Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/princess.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/punch.png b/static/editor.md/plugins/emoji-dialog/emoji/punch.png new file mode 100644 index 0000000..277047b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/punch.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/purple_heart.png b/static/editor.md/plugins/emoji-dialog/emoji/purple_heart.png new file mode 100644 index 0000000..d5f8750 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/purple_heart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/purse.png b/static/editor.md/plugins/emoji-dialog/emoji/purse.png new file mode 100644 index 0000000..8f06a2b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/purse.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/pushpin.png b/static/editor.md/plugins/emoji-dialog/emoji/pushpin.png new file mode 100644 index 0000000..540c4ec Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/pushpin.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/put_litter_in_its_place.png b/static/editor.md/plugins/emoji-dialog/emoji/put_litter_in_its_place.png new file mode 100644 index 0000000..c2e350c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/put_litter_in_its_place.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/question.png b/static/editor.md/plugins/emoji-dialog/emoji/question.png new file mode 100644 index 0000000..38cedf5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/question.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rabbit.png b/static/editor.md/plugins/emoji-dialog/emoji/rabbit.png new file mode 100644 index 0000000..5cb3ef6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rabbit.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rabbit2.png b/static/editor.md/plugins/emoji-dialog/emoji/rabbit2.png new file mode 100644 index 0000000..789de15 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rabbit2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/racehorse.png b/static/editor.md/plugins/emoji-dialog/emoji/racehorse.png new file mode 100644 index 0000000..4d09c64 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/racehorse.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/radio.png b/static/editor.md/plugins/emoji-dialog/emoji/radio.png new file mode 100644 index 0000000..ea589ef Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/radio.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/radio_button.png b/static/editor.md/plugins/emoji-dialog/emoji/radio_button.png new file mode 100644 index 0000000..63755ee Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/radio_button.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rage.png b/static/editor.md/plugins/emoji-dialog/emoji/rage.png new file mode 100644 index 0000000..c65ddff Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rage.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rage1.png b/static/editor.md/plugins/emoji-dialog/emoji/rage1.png new file mode 100644 index 0000000..1506ba4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rage1.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rage2.png b/static/editor.md/plugins/emoji-dialog/emoji/rage2.png new file mode 100644 index 0000000..f792e06 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rage2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rage3.png b/static/editor.md/plugins/emoji-dialog/emoji/rage3.png new file mode 100644 index 0000000..58764cb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rage3.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rage4.png b/static/editor.md/plugins/emoji-dialog/emoji/rage4.png new file mode 100644 index 0000000..c726c94 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rage4.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/railway_car.png b/static/editor.md/plugins/emoji-dialog/emoji/railway_car.png new file mode 100644 index 0000000..2236115 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/railway_car.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rainbow.png b/static/editor.md/plugins/emoji-dialog/emoji/rainbow.png new file mode 100644 index 0000000..6b1faa0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rainbow.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/raised_hand.png b/static/editor.md/plugins/emoji-dialog/emoji/raised_hand.png new file mode 100644 index 0000000..5e45c25 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/raised_hand.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/raised_hands.png b/static/editor.md/plugins/emoji-dialog/emoji/raised_hands.png new file mode 100644 index 0000000..e03142b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/raised_hands.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/raising_hand.png b/static/editor.md/plugins/emoji-dialog/emoji/raising_hand.png new file mode 100644 index 0000000..e1741a4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/raising_hand.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ram.png b/static/editor.md/plugins/emoji-dialog/emoji/ram.png new file mode 100644 index 0000000..5ea7bfb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ram.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ramen.png b/static/editor.md/plugins/emoji-dialog/emoji/ramen.png new file mode 100644 index 0000000..78dc7d5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ramen.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rat.png b/static/editor.md/plugins/emoji-dialog/emoji/rat.png new file mode 100644 index 0000000..1c463df Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/recycle.png b/static/editor.md/plugins/emoji-dialog/emoji/recycle.png new file mode 100644 index 0000000..99104c0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/recycle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/red_car.png b/static/editor.md/plugins/emoji-dialog/emoji/red_car.png new file mode 100644 index 0000000..d70a2f0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/red_car.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/red_circle.png b/static/editor.md/plugins/emoji-dialog/emoji/red_circle.png new file mode 100644 index 0000000..b391289 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/red_circle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/registered.png b/static/editor.md/plugins/emoji-dialog/emoji/registered.png new file mode 100644 index 0000000..31c68a8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/registered.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/relaxed.png b/static/editor.md/plugins/emoji-dialog/emoji/relaxed.png new file mode 100644 index 0000000..bbab82d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/relaxed.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/relieved.png b/static/editor.md/plugins/emoji-dialog/emoji/relieved.png new file mode 100644 index 0000000..fe5629f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/relieved.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/repeat.png b/static/editor.md/plugins/emoji-dialog/emoji/repeat.png new file mode 100644 index 0000000..80113b6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/repeat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/repeat_one.png b/static/editor.md/plugins/emoji-dialog/emoji/repeat_one.png new file mode 100644 index 0000000..3c47bcc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/repeat_one.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/restroom.png b/static/editor.md/plugins/emoji-dialog/emoji/restroom.png new file mode 100644 index 0000000..d6c111b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/restroom.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/revolving_hearts.png b/static/editor.md/plugins/emoji-dialog/emoji/revolving_hearts.png new file mode 100644 index 0000000..ea3317c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/revolving_hearts.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rewind.png b/static/editor.md/plugins/emoji-dialog/emoji/rewind.png new file mode 100644 index 0000000..26289dc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rewind.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ribbon.png b/static/editor.md/plugins/emoji-dialog/emoji/ribbon.png new file mode 100644 index 0000000..63ee5ba Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ribbon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rice.png b/static/editor.md/plugins/emoji-dialog/emoji/rice.png new file mode 100644 index 0000000..1fd2202 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rice.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rice_ball.png b/static/editor.md/plugins/emoji-dialog/emoji/rice_ball.png new file mode 100644 index 0000000..04f8a88 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rice_ball.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rice_cracker.png b/static/editor.md/plugins/emoji-dialog/emoji/rice_cracker.png new file mode 100644 index 0000000..954c901 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rice_cracker.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rice_scene.png b/static/editor.md/plugins/emoji-dialog/emoji/rice_scene.png new file mode 100644 index 0000000..1436198 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rice_scene.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ring.png b/static/editor.md/plugins/emoji-dialog/emoji/ring.png new file mode 100644 index 0000000..8a57fd6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ring.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rocket.png b/static/editor.md/plugins/emoji-dialog/emoji/rocket.png new file mode 100644 index 0000000..783078d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rocket.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/roller_coaster.png b/static/editor.md/plugins/emoji-dialog/emoji/roller_coaster.png new file mode 100644 index 0000000..9180b98 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/roller_coaster.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rooster.png b/static/editor.md/plugins/emoji-dialog/emoji/rooster.png new file mode 100644 index 0000000..fab23ad Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rooster.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rose.png b/static/editor.md/plugins/emoji-dialog/emoji/rose.png new file mode 100644 index 0000000..3479fbc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rose.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rotating_light.png b/static/editor.md/plugins/emoji-dialog/emoji/rotating_light.png new file mode 100644 index 0000000..6cf4a77 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rotating_light.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/round_pushpin.png b/static/editor.md/plugins/emoji-dialog/emoji/round_pushpin.png new file mode 100644 index 0000000..e498e92 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/round_pushpin.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rowboat.png b/static/editor.md/plugins/emoji-dialog/emoji/rowboat.png new file mode 100644 index 0000000..e370d0f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rowboat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ru.png b/static/editor.md/plugins/emoji-dialog/emoji/ru.png new file mode 100644 index 0000000..55fcf35 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ru.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/rugby_football.png b/static/editor.md/plugins/emoji-dialog/emoji/rugby_football.png new file mode 100644 index 0000000..f8db67d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/rugby_football.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/runner.png b/static/editor.md/plugins/emoji-dialog/emoji/runner.png new file mode 100644 index 0000000..cb00429 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/runner.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/running.png b/static/editor.md/plugins/emoji-dialog/emoji/running.png new file mode 100644 index 0000000..cb00429 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/running.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/running_shirt_with_sash.png b/static/editor.md/plugins/emoji-dialog/emoji/running_shirt_with_sash.png new file mode 100644 index 0000000..0d68bba Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/running_shirt_with_sash.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sa.png b/static/editor.md/plugins/emoji-dialog/emoji/sa.png new file mode 100644 index 0000000..387f098 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sa.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sagittarius.png b/static/editor.md/plugins/emoji-dialog/emoji/sagittarius.png new file mode 100644 index 0000000..8b5435b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sagittarius.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sailboat.png b/static/editor.md/plugins/emoji-dialog/emoji/sailboat.png new file mode 100644 index 0000000..ff656dc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sailboat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sake.png b/static/editor.md/plugins/emoji-dialog/emoji/sake.png new file mode 100644 index 0000000..1f69907 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sake.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sandal.png b/static/editor.md/plugins/emoji-dialog/emoji/sandal.png new file mode 100644 index 0000000..0bb3f66 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sandal.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/santa.png b/static/editor.md/plugins/emoji-dialog/emoji/santa.png new file mode 100644 index 0000000..a2240c0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/santa.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/satellite.png b/static/editor.md/plugins/emoji-dialog/emoji/satellite.png new file mode 100644 index 0000000..3481cc2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/satellite.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/satisfied.png b/static/editor.md/plugins/emoji-dialog/emoji/satisfied.png new file mode 100644 index 0000000..11c91eb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/satisfied.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/saxophone.png b/static/editor.md/plugins/emoji-dialog/emoji/saxophone.png new file mode 100644 index 0000000..011559a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/saxophone.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/school.png b/static/editor.md/plugins/emoji-dialog/emoji/school.png new file mode 100644 index 0000000..afd922b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/school.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/school_satchel.png b/static/editor.md/plugins/emoji-dialog/emoji/school_satchel.png new file mode 100644 index 0000000..edfb19a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/school_satchel.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/scissors.png b/static/editor.md/plugins/emoji-dialog/emoji/scissors.png new file mode 100644 index 0000000..be91604 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/scissors.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/scorpius.png b/static/editor.md/plugins/emoji-dialog/emoji/scorpius.png new file mode 100644 index 0000000..67fcea1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/scorpius.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/scream.png b/static/editor.md/plugins/emoji-dialog/emoji/scream.png new file mode 100644 index 0000000..9e93c88 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/scream.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/scream_cat.png b/static/editor.md/plugins/emoji-dialog/emoji/scream_cat.png new file mode 100644 index 0000000..d94cd34 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/scream_cat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/scroll.png b/static/editor.md/plugins/emoji-dialog/emoji/scroll.png new file mode 100644 index 0000000..c5a10e6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/scroll.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/seat.png b/static/editor.md/plugins/emoji-dialog/emoji/seat.png new file mode 100644 index 0000000..d1cb864 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/seat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/secret.png b/static/editor.md/plugins/emoji-dialog/emoji/secret.png new file mode 100644 index 0000000..82e383a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/secret.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/see_no_evil.png b/static/editor.md/plugins/emoji-dialog/emoji/see_no_evil.png new file mode 100644 index 0000000..0890a62 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/see_no_evil.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/seedling.png b/static/editor.md/plugins/emoji-dialog/emoji/seedling.png new file mode 100644 index 0000000..2ab0793 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/seedling.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/seven.png b/static/editor.md/plugins/emoji-dialog/emoji/seven.png new file mode 100644 index 0000000..354e89a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/seven.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/shaved_ice.png b/static/editor.md/plugins/emoji-dialog/emoji/shaved_ice.png new file mode 100644 index 0000000..0d0b382 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/shaved_ice.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sheep.png b/static/editor.md/plugins/emoji-dialog/emoji/sheep.png new file mode 100644 index 0000000..c7277d2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sheep.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/shell.png b/static/editor.md/plugins/emoji-dialog/emoji/shell.png new file mode 100644 index 0000000..3145b56 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/shell.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ship.png b/static/editor.md/plugins/emoji-dialog/emoji/ship.png new file mode 100644 index 0000000..5d2d8b6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ship.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/shipit.png b/static/editor.md/plugins/emoji-dialog/emoji/shipit.png new file mode 100644 index 0000000..a58a47f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/shipit.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/shirt.png b/static/editor.md/plugins/emoji-dialog/emoji/shirt.png new file mode 100644 index 0000000..297a6d6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/shirt.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/shit.png b/static/editor.md/plugins/emoji-dialog/emoji/shit.png new file mode 100644 index 0000000..73a4dc8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/shit.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/shoe.png b/static/editor.md/plugins/emoji-dialog/emoji/shoe.png new file mode 100644 index 0000000..45b82e6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/shoe.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/shower.png b/static/editor.md/plugins/emoji-dialog/emoji/shower.png new file mode 100644 index 0000000..0d72ab8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/shower.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/signal_strength.png b/static/editor.md/plugins/emoji-dialog/emoji/signal_strength.png new file mode 100644 index 0000000..a4bd23e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/signal_strength.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/six.png b/static/editor.md/plugins/emoji-dialog/emoji/six.png new file mode 100644 index 0000000..5688055 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/six.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/six_pointed_star.png b/static/editor.md/plugins/emoji-dialog/emoji/six_pointed_star.png new file mode 100644 index 0000000..010f8f5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/six_pointed_star.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ski.png b/static/editor.md/plugins/emoji-dialog/emoji/ski.png new file mode 100644 index 0000000..98f5cb0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ski.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/skull.png b/static/editor.md/plugins/emoji-dialog/emoji/skull.png new file mode 100644 index 0000000..bd4ee38 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/skull.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sleeping.png b/static/editor.md/plugins/emoji-dialog/emoji/sleeping.png new file mode 100644 index 0000000..093b852 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sleeping.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sleepy.png b/static/editor.md/plugins/emoji-dialog/emoji/sleepy.png new file mode 100644 index 0000000..df4f55e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sleepy.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/slot_machine.png b/static/editor.md/plugins/emoji-dialog/emoji/slot_machine.png new file mode 100644 index 0000000..26f1148 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/slot_machine.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/small_blue_diamond.png b/static/editor.md/plugins/emoji-dialog/emoji/small_blue_diamond.png new file mode 100644 index 0000000..8cd4920 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/small_blue_diamond.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/small_orange_diamond.png b/static/editor.md/plugins/emoji-dialog/emoji/small_orange_diamond.png new file mode 100644 index 0000000..04941d3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/small_orange_diamond.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/small_red_triangle.png b/static/editor.md/plugins/emoji-dialog/emoji/small_red_triangle.png new file mode 100644 index 0000000..8c4428d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/small_red_triangle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/small_red_triangle_down.png b/static/editor.md/plugins/emoji-dialog/emoji/small_red_triangle_down.png new file mode 100644 index 0000000..94832f0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/small_red_triangle_down.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/smile.png b/static/editor.md/plugins/emoji-dialog/emoji/smile.png new file mode 100644 index 0000000..81a8396 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/smile.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/smile_cat.png b/static/editor.md/plugins/emoji-dialog/emoji/smile_cat.png new file mode 100644 index 0000000..ad333ba Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/smile_cat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/smiley.png b/static/editor.md/plugins/emoji-dialog/emoji/smiley.png new file mode 100644 index 0000000..77b581d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/smiley.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/smiley_cat.png b/static/editor.md/plugins/emoji-dialog/emoji/smiley_cat.png new file mode 100644 index 0000000..dbf1b02 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/smiley_cat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/smiling_imp.png b/static/editor.md/plugins/emoji-dialog/emoji/smiling_imp.png new file mode 100644 index 0000000..d904049 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/smiling_imp.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/smirk.png b/static/editor.md/plugins/emoji-dialog/emoji/smirk.png new file mode 100644 index 0000000..bc6e508 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/smirk.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/smirk_cat.png b/static/editor.md/plugins/emoji-dialog/emoji/smirk_cat.png new file mode 100644 index 0000000..351565e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/smirk_cat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/smoking.png b/static/editor.md/plugins/emoji-dialog/emoji/smoking.png new file mode 100644 index 0000000..4aad6cb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/smoking.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/snail.png b/static/editor.md/plugins/emoji-dialog/emoji/snail.png new file mode 100644 index 0000000..e75e69a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/snail.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/snake.png b/static/editor.md/plugins/emoji-dialog/emoji/snake.png new file mode 100644 index 0000000..ef58933 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/snake.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/snowboarder.png b/static/editor.md/plugins/emoji-dialog/emoji/snowboarder.png new file mode 100644 index 0000000..aeda5c8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/snowboarder.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/snowflake.png b/static/editor.md/plugins/emoji-dialog/emoji/snowflake.png new file mode 100644 index 0000000..54b68ff Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/snowflake.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/snowman.png b/static/editor.md/plugins/emoji-dialog/emoji/snowman.png new file mode 100644 index 0000000..a97902e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/snowman.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sob.png b/static/editor.md/plugins/emoji-dialog/emoji/sob.png new file mode 100644 index 0000000..1561df9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sob.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/soccer.png b/static/editor.md/plugins/emoji-dialog/emoji/soccer.png new file mode 100644 index 0000000..1e118b5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/soccer.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/soon.png b/static/editor.md/plugins/emoji-dialog/emoji/soon.png new file mode 100644 index 0000000..9386615 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/soon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sos.png b/static/editor.md/plugins/emoji-dialog/emoji/sos.png new file mode 100644 index 0000000..e3e16ef Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sos.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sound.png b/static/editor.md/plugins/emoji-dialog/emoji/sound.png new file mode 100644 index 0000000..6aa4dbf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sound.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/space_invader.png b/static/editor.md/plugins/emoji-dialog/emoji/space_invader.png new file mode 100644 index 0000000..3840491 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/space_invader.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/spades.png b/static/editor.md/plugins/emoji-dialog/emoji/spades.png new file mode 100644 index 0000000..133a1ab Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/spades.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/spaghetti.png b/static/editor.md/plugins/emoji-dialog/emoji/spaghetti.png new file mode 100644 index 0000000..08de243 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/spaghetti.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sparkle.png b/static/editor.md/plugins/emoji-dialog/emoji/sparkle.png new file mode 100644 index 0000000..23a68ce Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sparkle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sparkler.png b/static/editor.md/plugins/emoji-dialog/emoji/sparkler.png new file mode 100644 index 0000000..4aabd7e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sparkler.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sparkles.png b/static/editor.md/plugins/emoji-dialog/emoji/sparkles.png new file mode 100644 index 0000000..9213882 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sparkles.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sparkling_heart.png b/static/editor.md/plugins/emoji-dialog/emoji/sparkling_heart.png new file mode 100644 index 0000000..64ac066 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sparkling_heart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/speak_no_evil.png b/static/editor.md/plugins/emoji-dialog/emoji/speak_no_evil.png new file mode 100644 index 0000000..87944c4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/speak_no_evil.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/speaker.png b/static/editor.md/plugins/emoji-dialog/emoji/speaker.png new file mode 100644 index 0000000..470476e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/speaker.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/speech_balloon.png b/static/editor.md/plugins/emoji-dialog/emoji/speech_balloon.png new file mode 100644 index 0000000..2896c27 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/speech_balloon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/speedboat.png b/static/editor.md/plugins/emoji-dialog/emoji/speedboat.png new file mode 100644 index 0000000..da6689b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/speedboat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/squirrel.png b/static/editor.md/plugins/emoji-dialog/emoji/squirrel.png new file mode 100644 index 0000000..a58a47f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/squirrel.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/star.png b/static/editor.md/plugins/emoji-dialog/emoji/star.png new file mode 100644 index 0000000..1bfddc8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/star.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/star2.png b/static/editor.md/plugins/emoji-dialog/emoji/star2.png new file mode 100644 index 0000000..8b40ff4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/star2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/stars.png b/static/editor.md/plugins/emoji-dialog/emoji/stars.png new file mode 100644 index 0000000..097a842 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/stars.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/station.png b/static/editor.md/plugins/emoji-dialog/emoji/station.png new file mode 100644 index 0000000..e77daa8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/station.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/statue_of_liberty.png b/static/editor.md/plugins/emoji-dialog/emoji/statue_of_liberty.png new file mode 100644 index 0000000..9ad9028 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/statue_of_liberty.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/steam_locomotive.png b/static/editor.md/plugins/emoji-dialog/emoji/steam_locomotive.png new file mode 100644 index 0000000..5495077 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/steam_locomotive.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/stew.png b/static/editor.md/plugins/emoji-dialog/emoji/stew.png new file mode 100644 index 0000000..e9687f9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/stew.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/straight_ruler.png b/static/editor.md/plugins/emoji-dialog/emoji/straight_ruler.png new file mode 100644 index 0000000..d96658e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/straight_ruler.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/strawberry.png b/static/editor.md/plugins/emoji-dialog/emoji/strawberry.png new file mode 100644 index 0000000..13eb827 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/strawberry.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/stuck_out_tongue.png b/static/editor.md/plugins/emoji-dialog/emoji/stuck_out_tongue.png new file mode 100644 index 0000000..fa7b58e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/stuck_out_tongue.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/stuck_out_tongue_closed_eyes.png b/static/editor.md/plugins/emoji-dialog/emoji/stuck_out_tongue_closed_eyes.png new file mode 100644 index 0000000..333716e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/stuck_out_tongue_closed_eyes.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/stuck_out_tongue_winking_eye.png b/static/editor.md/plugins/emoji-dialog/emoji/stuck_out_tongue_winking_eye.png new file mode 100644 index 0000000..6ae9d49 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/stuck_out_tongue_winking_eye.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sun_with_face.png b/static/editor.md/plugins/emoji-dialog/emoji/sun_with_face.png new file mode 100644 index 0000000..ee27663 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sun_with_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sunflower.png b/static/editor.md/plugins/emoji-dialog/emoji/sunflower.png new file mode 100644 index 0000000..d9bad19 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sunflower.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sunglasses.png b/static/editor.md/plugins/emoji-dialog/emoji/sunglasses.png new file mode 100644 index 0000000..1c468a1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sunglasses.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sunny.png b/static/editor.md/plugins/emoji-dialog/emoji/sunny.png new file mode 100644 index 0000000..d23c095 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sunny.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sunrise.png b/static/editor.md/plugins/emoji-dialog/emoji/sunrise.png new file mode 100644 index 0000000..ec58dcc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sunrise.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sunrise_over_mountains.png b/static/editor.md/plugins/emoji-dialog/emoji/sunrise_over_mountains.png new file mode 100644 index 0000000..ebc3db1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sunrise_over_mountains.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/surfer.png b/static/editor.md/plugins/emoji-dialog/emoji/surfer.png new file mode 100644 index 0000000..b067e8c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/surfer.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sushi.png b/static/editor.md/plugins/emoji-dialog/emoji/sushi.png new file mode 100644 index 0000000..0d179bd Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sushi.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/suspect.png b/static/editor.md/plugins/emoji-dialog/emoji/suspect.png new file mode 100644 index 0000000..58e8921 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/suspect.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/suspension_railway.png b/static/editor.md/plugins/emoji-dialog/emoji/suspension_railway.png new file mode 100644 index 0000000..aaa45f6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/suspension_railway.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sweat.png b/static/editor.md/plugins/emoji-dialog/emoji/sweat.png new file mode 100644 index 0000000..e894b76 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sweat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sweat_drops.png b/static/editor.md/plugins/emoji-dialog/emoji/sweat_drops.png new file mode 100644 index 0000000..a83b3e9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sweat_drops.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sweat_smile.png b/static/editor.md/plugins/emoji-dialog/emoji/sweat_smile.png new file mode 100644 index 0000000..3903f71 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sweat_smile.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/sweet_potato.png b/static/editor.md/plugins/emoji-dialog/emoji/sweet_potato.png new file mode 100644 index 0000000..cde7880 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/sweet_potato.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/swimmer.png b/static/editor.md/plugins/emoji-dialog/emoji/swimmer.png new file mode 100644 index 0000000..d3878a0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/swimmer.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/symbols.png b/static/editor.md/plugins/emoji-dialog/emoji/symbols.png new file mode 100644 index 0000000..16bc1da Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/symbols.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/syringe.png b/static/editor.md/plugins/emoji-dialog/emoji/syringe.png new file mode 100644 index 0000000..7314255 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/syringe.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tada.png b/static/editor.md/plugins/emoji-dialog/emoji/tada.png new file mode 100644 index 0000000..7411b52 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tada.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tanabata_tree.png b/static/editor.md/plugins/emoji-dialog/emoji/tanabata_tree.png new file mode 100644 index 0000000..6dea4b2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tanabata_tree.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tangerine.png b/static/editor.md/plugins/emoji-dialog/emoji/tangerine.png new file mode 100644 index 0000000..fc9d4f8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tangerine.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/taurus.png b/static/editor.md/plugins/emoji-dialog/emoji/taurus.png new file mode 100644 index 0000000..6af582f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/taurus.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/taxi.png b/static/editor.md/plugins/emoji-dialog/emoji/taxi.png new file mode 100644 index 0000000..60a50d3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/taxi.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tea.png b/static/editor.md/plugins/emoji-dialog/emoji/tea.png new file mode 100644 index 0000000..3ece0b7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tea.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/telephone.png b/static/editor.md/plugins/emoji-dialog/emoji/telephone.png new file mode 100644 index 0000000..87d2559 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/telephone.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/telephone_receiver.png b/static/editor.md/plugins/emoji-dialog/emoji/telephone_receiver.png new file mode 100644 index 0000000..36e21e0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/telephone_receiver.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/telescope.png b/static/editor.md/plugins/emoji-dialog/emoji/telescope.png new file mode 100644 index 0000000..8511fa9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/telescope.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tennis.png b/static/editor.md/plugins/emoji-dialog/emoji/tennis.png new file mode 100644 index 0000000..278d904 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tennis.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tent.png b/static/editor.md/plugins/emoji-dialog/emoji/tent.png new file mode 100644 index 0000000..5c0d20e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tent.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/thought_balloon.png b/static/editor.md/plugins/emoji-dialog/emoji/thought_balloon.png new file mode 100644 index 0000000..febe30d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/thought_balloon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/three.png b/static/editor.md/plugins/emoji-dialog/emoji/three.png new file mode 100644 index 0000000..55644c9 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/three.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/thumbsdown.png b/static/editor.md/plugins/emoji-dialog/emoji/thumbsdown.png new file mode 100644 index 0000000..41c6b82 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/thumbsdown.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/thumbsup.png b/static/editor.md/plugins/emoji-dialog/emoji/thumbsup.png new file mode 100644 index 0000000..81786c1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/thumbsup.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/ticket.png b/static/editor.md/plugins/emoji-dialog/emoji/ticket.png new file mode 100644 index 0000000..cdacf1a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/ticket.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tiger.png b/static/editor.md/plugins/emoji-dialog/emoji/tiger.png new file mode 100644 index 0000000..d6cc84a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tiger.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tiger2.png b/static/editor.md/plugins/emoji-dialog/emoji/tiger2.png new file mode 100644 index 0000000..b0c7d8d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tiger2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tired_face.png b/static/editor.md/plugins/emoji-dialog/emoji/tired_face.png new file mode 100644 index 0000000..3a8eefe Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tired_face.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tm.png b/static/editor.md/plugins/emoji-dialog/emoji/tm.png new file mode 100644 index 0000000..c7dec75 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tm.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/toilet.png b/static/editor.md/plugins/emoji-dialog/emoji/toilet.png new file mode 100644 index 0000000..e5cc411 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/toilet.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tokyo_tower.png b/static/editor.md/plugins/emoji-dialog/emoji/tokyo_tower.png new file mode 100644 index 0000000..e1cbd7a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tokyo_tower.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tomato.png b/static/editor.md/plugins/emoji-dialog/emoji/tomato.png new file mode 100644 index 0000000..a129700 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tomato.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tongue.png b/static/editor.md/plugins/emoji-dialog/emoji/tongue.png new file mode 100644 index 0000000..b0bab12 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tongue.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/top.png b/static/editor.md/plugins/emoji-dialog/emoji/top.png new file mode 100644 index 0000000..5aa4dd4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/top.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tophat.png b/static/editor.md/plugins/emoji-dialog/emoji/tophat.png new file mode 100644 index 0000000..7d27134 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tophat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tractor.png b/static/editor.md/plugins/emoji-dialog/emoji/tractor.png new file mode 100644 index 0000000..058fd3e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tractor.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/traffic_light.png b/static/editor.md/plugins/emoji-dialog/emoji/traffic_light.png new file mode 100644 index 0000000..50c7810 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/traffic_light.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/train.png b/static/editor.md/plugins/emoji-dialog/emoji/train.png new file mode 100644 index 0000000..3202d80 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/train.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/train2.png b/static/editor.md/plugins/emoji-dialog/emoji/train2.png new file mode 100644 index 0000000..9c0d3ab Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/train2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tram.png b/static/editor.md/plugins/emoji-dialog/emoji/tram.png new file mode 100644 index 0000000..5eb29fb Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tram.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/triangular_flag_on_post.png b/static/editor.md/plugins/emoji-dialog/emoji/triangular_flag_on_post.png new file mode 100644 index 0000000..f9a3f32 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/triangular_flag_on_post.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/triangular_ruler.png b/static/editor.md/plugins/emoji-dialog/emoji/triangular_ruler.png new file mode 100644 index 0000000..383677c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/triangular_ruler.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/trident.png b/static/editor.md/plugins/emoji-dialog/emoji/trident.png new file mode 100644 index 0000000..d79a7b4 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/trident.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/triumph.png b/static/editor.md/plugins/emoji-dialog/emoji/triumph.png new file mode 100644 index 0000000..92f93bd Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/triumph.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/trolleybus.png b/static/editor.md/plugins/emoji-dialog/emoji/trolleybus.png new file mode 100644 index 0000000..b9740a5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/trolleybus.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/trollface.png b/static/editor.md/plugins/emoji-dialog/emoji/trollface.png new file mode 100644 index 0000000..e234893 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/trollface.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/trophy.png b/static/editor.md/plugins/emoji-dialog/emoji/trophy.png new file mode 100644 index 0000000..95d3b63 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/trophy.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tropical_drink.png b/static/editor.md/plugins/emoji-dialog/emoji/tropical_drink.png new file mode 100644 index 0000000..55ca9ee Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tropical_drink.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tropical_fish.png b/static/editor.md/plugins/emoji-dialog/emoji/tropical_fish.png new file mode 100644 index 0000000..a6d7349 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tropical_fish.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/truck.png b/static/editor.md/plugins/emoji-dialog/emoji/truck.png new file mode 100644 index 0000000..3f25ba1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/truck.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/trumpet.png b/static/editor.md/plugins/emoji-dialog/emoji/trumpet.png new file mode 100644 index 0000000..c84cfb1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/trumpet.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tshirt.png b/static/editor.md/plugins/emoji-dialog/emoji/tshirt.png new file mode 100644 index 0000000..297a6d6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tshirt.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tulip.png b/static/editor.md/plugins/emoji-dialog/emoji/tulip.png new file mode 100644 index 0000000..b3ee110 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tulip.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/turtle.png b/static/editor.md/plugins/emoji-dialog/emoji/turtle.png new file mode 100644 index 0000000..04d1d96 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/turtle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/tv.png b/static/editor.md/plugins/emoji-dialog/emoji/tv.png new file mode 100644 index 0000000..803dc3d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/tv.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/twisted_rightwards_arrows.png b/static/editor.md/plugins/emoji-dialog/emoji/twisted_rightwards_arrows.png new file mode 100644 index 0000000..25cde18 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/twisted_rightwards_arrows.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/two.png b/static/editor.md/plugins/emoji-dialog/emoji/two.png new file mode 100644 index 0000000..c191f8a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/two.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/two_hearts.png b/static/editor.md/plugins/emoji-dialog/emoji/two_hearts.png new file mode 100644 index 0000000..b189e9a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/two_hearts.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/two_men_holding_hands.png b/static/editor.md/plugins/emoji-dialog/emoji/two_men_holding_hands.png new file mode 100644 index 0000000..d1099f2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/two_men_holding_hands.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/two_women_holding_hands.png b/static/editor.md/plugins/emoji-dialog/emoji/two_women_holding_hands.png new file mode 100644 index 0000000..619646c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/two_women_holding_hands.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u5272.png b/static/editor.md/plugins/emoji-dialog/emoji/u5272.png new file mode 100644 index 0000000..2148253 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u5272.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u5408.png b/static/editor.md/plugins/emoji-dialog/emoji/u5408.png new file mode 100644 index 0000000..03ab0d8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u5408.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u55b6.png b/static/editor.md/plugins/emoji-dialog/emoji/u55b6.png new file mode 100644 index 0000000..ba946d3 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u55b6.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u6307.png b/static/editor.md/plugins/emoji-dialog/emoji/u6307.png new file mode 100644 index 0000000..6557f56 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u6307.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u6708.png b/static/editor.md/plugins/emoji-dialog/emoji/u6708.png new file mode 100644 index 0000000..e4dfe5a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u6708.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u6709.png b/static/editor.md/plugins/emoji-dialog/emoji/u6709.png new file mode 100644 index 0000000..cd8fb3f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u6709.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u6e80.png b/static/editor.md/plugins/emoji-dialog/emoji/u6e80.png new file mode 100644 index 0000000..5df1cb8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u6e80.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u7121.png b/static/editor.md/plugins/emoji-dialog/emoji/u7121.png new file mode 100644 index 0000000..25f694e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u7121.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u7533.png b/static/editor.md/plugins/emoji-dialog/emoji/u7533.png new file mode 100644 index 0000000..fc4a990 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u7533.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u7981.png b/static/editor.md/plugins/emoji-dialog/emoji/u7981.png new file mode 100644 index 0000000..f550a57 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u7981.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/u7a7a.png b/static/editor.md/plugins/emoji-dialog/emoji/u7a7a.png new file mode 100644 index 0000000..c05f5cf Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/u7a7a.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/uk.png b/static/editor.md/plugins/emoji-dialog/emoji/uk.png new file mode 100644 index 0000000..2a62c7a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/uk.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/umbrella.png b/static/editor.md/plugins/emoji-dialog/emoji/umbrella.png new file mode 100644 index 0000000..1db722f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/umbrella.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/unamused.png b/static/editor.md/plugins/emoji-dialog/emoji/unamused.png new file mode 100644 index 0000000..3722e6f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/unamused.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/underage.png b/static/editor.md/plugins/emoji-dialog/emoji/underage.png new file mode 100644 index 0000000..a789b3c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/underage.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/unlock.png b/static/editor.md/plugins/emoji-dialog/emoji/unlock.png new file mode 100644 index 0000000..22b429c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/unlock.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/up.png b/static/editor.md/plugins/emoji-dialog/emoji/up.png new file mode 100644 index 0000000..829219a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/up.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/us.png b/static/editor.md/plugins/emoji-dialog/emoji/us.png new file mode 100644 index 0000000..3813766 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/us.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/v.png b/static/editor.md/plugins/emoji-dialog/emoji/v.png new file mode 100644 index 0000000..f61267c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/v.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/vertical_traffic_light.png b/static/editor.md/plugins/emoji-dialog/emoji/vertical_traffic_light.png new file mode 100644 index 0000000..7a5ba35 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/vertical_traffic_light.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/vhs.png b/static/editor.md/plugins/emoji-dialog/emoji/vhs.png new file mode 100644 index 0000000..881081c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/vhs.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/vibration_mode.png b/static/editor.md/plugins/emoji-dialog/emoji/vibration_mode.png new file mode 100644 index 0000000..a716e96 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/vibration_mode.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/video_camera.png b/static/editor.md/plugins/emoji-dialog/emoji/video_camera.png new file mode 100644 index 0000000..274cecd Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/video_camera.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/video_game.png b/static/editor.md/plugins/emoji-dialog/emoji/video_game.png new file mode 100644 index 0000000..59d45ba Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/video_game.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/violin.png b/static/editor.md/plugins/emoji-dialog/emoji/violin.png new file mode 100644 index 0000000..27fdc8f Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/violin.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/virgo.png b/static/editor.md/plugins/emoji-dialog/emoji/virgo.png new file mode 100644 index 0000000..72e1763 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/virgo.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/volcano.png b/static/editor.md/plugins/emoji-dialog/emoji/volcano.png new file mode 100644 index 0000000..9b43453 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/volcano.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/vs.png b/static/editor.md/plugins/emoji-dialog/emoji/vs.png new file mode 100644 index 0000000..8636388 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/vs.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/walking.png b/static/editor.md/plugins/emoji-dialog/emoji/walking.png new file mode 100644 index 0000000..52bc038 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/walking.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/waning_crescent_moon.png b/static/editor.md/plugins/emoji-dialog/emoji/waning_crescent_moon.png new file mode 100644 index 0000000..3038778 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/waning_crescent_moon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/waning_gibbous_moon.png b/static/editor.md/plugins/emoji-dialog/emoji/waning_gibbous_moon.png new file mode 100644 index 0000000..5100990 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/waning_gibbous_moon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/warning.png b/static/editor.md/plugins/emoji-dialog/emoji/warning.png new file mode 100644 index 0000000..466658d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/warning.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/watch.png b/static/editor.md/plugins/emoji-dialog/emoji/watch.png new file mode 100644 index 0000000..d503bb8 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/watch.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/water_buffalo.png b/static/editor.md/plugins/emoji-dialog/emoji/water_buffalo.png new file mode 100644 index 0000000..3bcde3e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/water_buffalo.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/watermelon.png b/static/editor.md/plugins/emoji-dialog/emoji/watermelon.png new file mode 100644 index 0000000..fc212be Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/watermelon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wave.png b/static/editor.md/plugins/emoji-dialog/emoji/wave.png new file mode 100644 index 0000000..e78402e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wave.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wavy_dash.png b/static/editor.md/plugins/emoji-dialog/emoji/wavy_dash.png new file mode 100644 index 0000000..77f626c Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wavy_dash.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/waxing_crescent_moon.png b/static/editor.md/plugins/emoji-dialog/emoji/waxing_crescent_moon.png new file mode 100644 index 0000000..c8f13dd Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/waxing_crescent_moon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/waxing_gibbous_moon.png b/static/editor.md/plugins/emoji-dialog/emoji/waxing_gibbous_moon.png new file mode 100644 index 0000000..54e7ec6 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/waxing_gibbous_moon.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wc.png b/static/editor.md/plugins/emoji-dialog/emoji/wc.png new file mode 100644 index 0000000..dfe84d2 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wc.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/weary.png b/static/editor.md/plugins/emoji-dialog/emoji/weary.png new file mode 100644 index 0000000..0c54754 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/weary.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wedding.png b/static/editor.md/plugins/emoji-dialog/emoji/wedding.png new file mode 100644 index 0000000..ead19d5 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wedding.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/whale.png b/static/editor.md/plugins/emoji-dialog/emoji/whale.png new file mode 100644 index 0000000..5bb113e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/whale.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/whale2.png b/static/editor.md/plugins/emoji-dialog/emoji/whale2.png new file mode 100644 index 0000000..f6fb07e Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/whale2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wheelchair.png b/static/editor.md/plugins/emoji-dialog/emoji/wheelchair.png new file mode 100644 index 0000000..eddcdd7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wheelchair.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/white_check_mark.png b/static/editor.md/plugins/emoji-dialog/emoji/white_check_mark.png new file mode 100644 index 0000000..61dc058 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/white_check_mark.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/white_circle.png b/static/editor.md/plugins/emoji-dialog/emoji/white_circle.png new file mode 100644 index 0000000..3f648d1 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/white_circle.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/white_flower.png b/static/editor.md/plugins/emoji-dialog/emoji/white_flower.png new file mode 100644 index 0000000..c0929d0 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/white_flower.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/white_large_square.png b/static/editor.md/plugins/emoji-dialog/emoji/white_large_square.png new file mode 100644 index 0000000..60cb19a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/white_large_square.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/white_medium_small_square.png b/static/editor.md/plugins/emoji-dialog/emoji/white_medium_small_square.png new file mode 100644 index 0000000..a115cdc Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/white_medium_small_square.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/white_medium_square.png b/static/editor.md/plugins/emoji-dialog/emoji/white_medium_square.png new file mode 100644 index 0000000..199808b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/white_medium_square.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/white_small_square.png b/static/editor.md/plugins/emoji-dialog/emoji/white_small_square.png new file mode 100644 index 0000000..24ba879 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/white_small_square.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/white_square.png b/static/editor.md/plugins/emoji-dialog/emoji/white_square.png new file mode 100644 index 0000000..60cb19a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/white_square.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/white_square_button.png b/static/editor.md/plugins/emoji-dialog/emoji/white_square_button.png new file mode 100644 index 0000000..ad54d55 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/white_square_button.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wind_chime.png b/static/editor.md/plugins/emoji-dialog/emoji/wind_chime.png new file mode 100644 index 0000000..efacf5d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wind_chime.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wine_glass.png b/static/editor.md/plugins/emoji-dialog/emoji/wine_glass.png new file mode 100644 index 0000000..82b0f00 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wine_glass.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wink.png b/static/editor.md/plugins/emoji-dialog/emoji/wink.png new file mode 100644 index 0000000..756766d Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wink.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wink2.png b/static/editor.md/plugins/emoji-dialog/emoji/wink2.png new file mode 100644 index 0000000..6ae9d49 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wink2.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wolf.png b/static/editor.md/plugins/emoji-dialog/emoji/wolf.png new file mode 100644 index 0000000..c60c968 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wolf.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/woman.png b/static/editor.md/plugins/emoji-dialog/emoji/woman.png new file mode 100644 index 0000000..6bf0d2b Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/woman.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/womans_clothes.png b/static/editor.md/plugins/emoji-dialog/emoji/womans_clothes.png new file mode 100644 index 0000000..aa297c7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/womans_clothes.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/womans_hat.png b/static/editor.md/plugins/emoji-dialog/emoji/womans_hat.png new file mode 100644 index 0000000..4cb2e6a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/womans_hat.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/womens.png b/static/editor.md/plugins/emoji-dialog/emoji/womens.png new file mode 100644 index 0000000..2fab296 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/womens.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/worried.png b/static/editor.md/plugins/emoji-dialog/emoji/worried.png new file mode 100644 index 0000000..276291a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/worried.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/wrench.png b/static/editor.md/plugins/emoji-dialog/emoji/wrench.png new file mode 100644 index 0000000..a87072a Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/wrench.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/x.png b/static/editor.md/plugins/emoji-dialog/emoji/x.png new file mode 100644 index 0000000..dff9efa Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/x.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/yellow_heart.png b/static/editor.md/plugins/emoji-dialog/emoji/yellow_heart.png new file mode 100644 index 0000000..fa41ce7 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/yellow_heart.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/yen.png b/static/editor.md/plugins/emoji-dialog/emoji/yen.png new file mode 100644 index 0000000..139bc93 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/yen.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/yum.png b/static/editor.md/plugins/emoji-dialog/emoji/yum.png new file mode 100644 index 0000000..fc39637 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/yum.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/zap.png b/static/editor.md/plugins/emoji-dialog/emoji/zap.png new file mode 100644 index 0000000..260c531 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/zap.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/zero.png b/static/editor.md/plugins/emoji-dialog/emoji/zero.png new file mode 100644 index 0000000..6e57b33 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/zero.png differ diff --git a/static/editor.md/plugins/emoji-dialog/emoji/zzz.png b/static/editor.md/plugins/emoji-dialog/emoji/zzz.png new file mode 100644 index 0000000..30be046 Binary files /dev/null and b/static/editor.md/plugins/emoji-dialog/emoji/zzz.png differ diff --git a/static/editor.md/plugins/goto-line-dialog/goto-line-dialog.js b/static/editor.md/plugins/goto-line-dialog/goto-line-dialog.js new file mode 100644 index 0000000..f875743 --- /dev/null +++ b/static/editor.md/plugins/goto-line-dialog/goto-line-dialog.js @@ -0,0 +1,157 @@ +/*! + * Goto line dialog plugin for Editor.md + * + * @file goto-line-dialog.js + * @author pandao + * @version 1.2.1 + * @updateTime 2015-06-09 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + + var $ = jQuery; + var pluginName = "goto-line-dialog"; + + var langs = { + "zh-cn" : { + toolbar : { + "goto-line" : "跳转到行" + }, + dialog : { + "goto-line" : { + title : "跳转到行", + label : "请输入行号", + error : "错误:" + } + } + }, + "zh-tw" : { + toolbar : { + "goto-line" : "跳轉到行" + }, + dialog : { + "goto-line" : { + title : "跳轉到行", + label : "請輸入行號", + error : "錯誤:" + } + } + }, + "en" : { + toolbar : { + "goto-line" : "Goto line" + }, + dialog : { + "goto-line" : { + title : "Goto line", + label : "Enter a line number, range ", + error : "Error: " + } + } + } + }; + + exports.fn.gotoLineDialog = function() { + var _this = this; + var cm = this.cm; + var editor = this.editor; + var settings = this.settings; + var path = settings.pluginPath + pluginName +"/"; + var classPrefix = this.classPrefix; + var dialogName = classPrefix + pluginName, dialog; + + $.extend(true, this.lang, langs[this.lang.name]); + this.setToolbar(); + + var lang = this.lang; + var dialogLang = lang.dialog["goto-line"]; + var lineCount = cm.lineCount(); + + dialogLang.error += dialogLang.label + " 1-" + lineCount; + + if (editor.find("." + dialogName).length < 1) + { + var dialogContent = [ + "
                    ", + "

                    " + dialogLang.label + " 1-" + lineCount +"   

                    ", + "
                    " + ].join("\n"); + + dialog = this.createDialog({ + name : dialogName, + title : dialogLang.title, + width : 400, + height : 180, + mask : settings.dialogShowMask, + drag : settings.dialogDraggable, + content : dialogContent, + lockScreen : settings.dialogLockScreen, + maskStyle : { + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }, + buttons : { + enter : [lang.buttons.enter, function() { + var line = parseInt(this.find("[data-line-number]").val()); + + if (line < 1 || line > lineCount) { + alert(dialogLang.error); + + return false; + } + + _this.gotoLine(line); + + this.hide().lockScreen(false).hideMask(); + + return false; + }], + + cancel : [lang.buttons.cancel, function() { + this.hide().lockScreen(false).hideMask(); + + return false; + }] + } + }); + } + + dialog = editor.find("." + dialogName); + + this.dialogShowMask(dialog); + this.dialogLockScreen(); + dialog.show(); + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/help-dialog/help-dialog.js b/static/editor.md/plugins/help-dialog/help-dialog.js new file mode 100644 index 0000000..339b3c0 --- /dev/null +++ b/static/editor.md/plugins/help-dialog/help-dialog.js @@ -0,0 +1,102 @@ +/*! + * Help dialog plugin for Editor.md + * + * @file help-dialog.js + * @author pandao + * @version 1.2.0 + * @updateTime 2015-03-08 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + + var $ = jQuery; + var pluginName = "help-dialog"; + + exports.fn.helpDialog = function() { + var _this = this; + var lang = this.lang; + var editor = this.editor; + var settings = this.settings; + var path = settings.pluginPath + pluginName + "/"; + var classPrefix = this.classPrefix; + var dialogName = classPrefix + pluginName, dialog; + var dialogLang = lang.dialog.help; + + if (editor.find("." + dialogName).length < 1) + { + var dialogContent = "
                    "; + + dialog = this.createDialog({ + name : dialogName, + title : dialogLang.title, + width : 840, + height : 540, + mask : settings.dialogShowMask, + drag : settings.dialogDraggable, + content : dialogContent, + lockScreen : settings.dialogLockScreen, + maskStyle : { + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }, + buttons : { + close : [lang.buttons.close, function() { + this.hide().lockScreen(false).hideMask(); + + return false; + }] + } + }); + } + + dialog = editor.find("." + dialogName); + + this.dialogShowMask(dialog); + this.dialogLockScreen(); + dialog.show(); + + var helpContent = dialog.find(".markdown-body"); + + if (helpContent.html() === "") + { + $.get(path + "help.md", function(text) { + var md = exports.$marked(text); + helpContent.html(md); + + helpContent.find("a").attr("target", "_blank"); + }); + } + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/help-dialog/help.md b/static/editor.md/plugins/help-dialog/help.md new file mode 100644 index 0000000..9a030f2 --- /dev/null +++ b/static/editor.md/plugins/help-dialog/help.md @@ -0,0 +1,77 @@ +##### Markdown语法教程 (Markdown syntax tutorial) + +- [Markdown Syntax](http://daringfireball.net/projects/markdown/syntax/ "Markdown Syntax") +- [Mastering Markdown](https://guides.github.com/features/mastering-markdown/ "Mastering Markdown") +- [Markdown Basics](https://help.github.com/articles/markdown-basics/ "Markdown Basics") +- [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/ "GitHub Flavored Markdown") +- [Markdown 语法说明(简体中文)](http://www.markdown.cn/ "Markdown 语法说明(简体中文)") +- [Markdown 語法說明(繁體中文)](http://markdown.tw/ "Markdown 語法說明(繁體中文)") + +##### 键盘快捷键 (Keyboard shortcuts) + +> If Editor.md code editor is on focus, you can use keyboard shortcuts. + +| Keyboard shortcuts (键盘快捷键) | 说明 | Description | +| :---------------------------------------------- |:--------------------------------- | :------------------------------------------------- | +| F9 | 切换实时预览 | Switch watch/unwatch | +| F10 | 全屏HTML预览(按 Shift + ESC 退出) | Full preview HTML (Press Shift + ESC exit) | +| F11 | 切换全屏状态 | Switch fullscreen (Press ESC exit) | +| Ctrl + 1~6 / Command + 1~6 | 插入标题1~6 | Insert heading 1~6 | +| Ctrl + A / Command + A | 全选 | Select all | +| Ctrl + B / Command + B | 插入粗体 | Insert bold | +| Ctrl + D / Command + D | 插入日期时间 | Insert datetime | +| Ctrl + E / Command + E | 插入Emoji符号 | Insert :emoji: | +| Ctrl + F / Command + F | 查找/搜索 | Start searching | +| Ctrl + G / Command + G | 切换到下一个搜索结果项 | Find next search results | +| Ctrl + H / Command + H | 插入水平线 | Insert horizontal rule | +| Ctrl + I / Command + I | 插入斜体 | Insert italic | +| Ctrl + K / Command + K | 插入行内代码 | Insert inline code | +| Ctrl + L / Command + L | 插入链接 | Insert link | +| Ctrl + U / Command + U | 插入无序列表 | Insert unordered list | +| Ctrl + Q | 代码折叠切换 | Switch code fold | +| Ctrl + Z / Command + Z | 撤销 | Undo | +| Ctrl + Y / Command + Y | 重做 | Redo | +| Ctrl + Shift + A | 插入@链接 | Insert @link | +| Ctrl + Shift + C | 插入行内代码 | Insert inline code | +| Ctrl + Shift + E | 打开插入Emoji表情对话框 | Open emoji dialog | +| Ctrl + Shift + F / Command + Option + F | 替换 | Replace | +| Ctrl + Shift + G / Shift + Command + G | 切换到上一个搜索结果项 | Find previous search results | +| Ctrl + Shift + H | 打开HTML实体字符对话框 | Open HTML Entities dialog | +| Ctrl + Shift + I | 插入图片 | Insert image ![]() | +| Ctrl + Shift + K | 插入TeX(KaTeX)公式符号 | Insert TeX(KaTeX) symbol $$TeX$$ | +| Ctrl + Shift + L | 打开插入链接对话框 | Open link dialog | +| Ctrl + Shift + O | 插入有序列表 | Insert ordered list | +| Ctrl + Shift + P | 打开插入PRE对话框 | Open Preformatted text dialog | +| Ctrl + Shift + Q | 插入引用 | Insert blockquotes | +| Ctrl + Shift + R / Shift + Command + Option + F | 全部替换 | Replace all | +| Ctrl + Shift + S | 插入删除线 | Insert strikethrough | +| Ctrl + Shift + T | 打开插入表格对话框 | Open table dialog | +| Ctrl + Shift + U | 将所选文字转成大写 | Selection text convert to uppercase | +| Shift + Alt + C | 插入```代码 | Insert code blocks (```) | +| Shift + Alt + H | 打开使用帮助对话框 | Open help dialog | +| Shift + Alt + L | 将所选文本转成小写 | Selection text convert to lowercase | +| Shift + Alt + P | 插入分页符 | Insert page break | +| Alt + L | 将所选文本转成小写 | Selection text convert to lowercase | +| Shift + Alt + U | 将所选的每个单词的首字母转成大写 | Selection words first letter convert to Uppercase | +| Ctrl + Shift + Alt + C | 打开插入代码块对话框层 | Open code blocks dialog | +| Ctrl + Shift + Alt + I | 打开插入图片对话框层 | Open image dialog | +| Ctrl + Shift + Alt + U | 将所选文本的第一个首字母转成大写 | Selection text first letter convert to uppercase | +| Ctrl + Alt + G | 跳转到指定的行 | Goto line | + +##### Emoji表情参考 (Emoji reference) + +- [Github emoji](http://www.emoji-cheat-sheet.com/ "Github emoji") +- [Twitter Emoji \(Twemoji\)](http://twitter.github.io/twemoji/preview.html "Twitter Emoji \(Twemoji\)") +- [FontAwesome icons emoji](http://fortawesome.github.io/Font-Awesome/icons/ "FontAwesome icons emoji") + +##### 流程图参考 (Flowchart reference) + +[http://adrai.github.io/flowchart.js/](http://adrai.github.io/flowchart.js/) + +##### 时序图参考 (SequenceDiagram reference) + +[http://bramp.github.io/js-sequence-diagrams/](http://bramp.github.io/js-sequence-diagrams/) + +##### TeX/LaTeX reference + +[http://meta.wikimedia.org/wiki/Help:Formula](http://meta.wikimedia.org/wiki/Help:Formula) diff --git a/static/editor.md/plugins/html-entities-dialog/html-entities-dialog.js b/static/editor.md/plugins/html-entities-dialog/html-entities-dialog.js new file mode 100644 index 0000000..6c77053 --- /dev/null +++ b/static/editor.md/plugins/html-entities-dialog/html-entities-dialog.js @@ -0,0 +1,173 @@ +/*! + * HTML entities dialog plugin for Editor.md + * + * @file html-entities-dialog.js + * @author pandao + * @version 1.2.0 + * @updateTime 2015-03-08 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + + var $ = jQuery; + var pluginName = "html-entities-dialog"; + var selecteds = []; + var entitiesData = []; + + exports.fn.htmlEntitiesDialog = function() { + var _this = this; + var cm = this.cm; + var lang = _this.lang; + var settings = _this.settings; + var path = settings.pluginPath + pluginName + "/"; + var editor = this.editor; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var classPrefix = _this.classPrefix; + + var dialogName = classPrefix + "dialog-" + pluginName, dialog; + var dialogLang = lang.dialog.htmlEntities; + + var dialogContent = [ + '
                    ', + '
                    ', + '
                    ', + '
                    ', + ].join("\r\n"); + + cm.focus(); + + if (editor.find("." + dialogName).length > 0) + { + dialog = editor.find("." + dialogName); + + selecteds = []; + dialog.find("a").removeClass("selected"); + + this.dialogShowMask(dialog); + this.dialogLockScreen(); + dialog.show(); + } + else + { + dialog = this.createDialog({ + name : dialogName, + title : dialogLang.title, + width : 800, + height : 475, + mask : settings.dialogShowMask, + drag : settings.dialogDraggable, + content : dialogContent, + lockScreen : settings.dialogLockScreen, + maskStyle : { + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }, + buttons : { + enter : [lang.buttons.enter, function() { + cm.replaceSelection(selecteds.join(" ")); + this.hide().lockScreen(false).hideMask(); + + return false; + }], + cancel : [lang.buttons.cancel, function() { + this.hide().lockScreen(false).hideMask(); + + return false; + }] + } + }); + } + + var table = dialog.find("." + classPrefix + "grid-table"); + + var drawTable = function() { + + if (entitiesData.length < 1) return ; + + var rowNumber = 20; + var pageTotal = Math.ceil(entitiesData.length / rowNumber); + + table.html(""); + + for (var i = 0; i < pageTotal; i++) + { + var row = "
                    "; + + for (var x = 0; x < rowNumber; x++) + { + var entity = entitiesData[(i * rowNumber) + x]; + + if (typeof entity !== "undefined") + { + var name = entity.name.replace("&", "&"); + + row += "" + name + ""; + } + } + + row += "
                    "; + + table.append(row); + } + + dialog.find("." + classPrefix + "html-entity-btn").bind(exports.mouseOrTouch("click", "touchend"), function() { + $(this).toggleClass("selected"); + + if ($(this).hasClass("selected")) + { + selecteds.push($(this).attr("value")); + } + }); + }; + + if (entitiesData.length < 1) + { + if (typeof (dialog.loading) == "function") dialog.loading(true); + + $.getJSON(path + pluginName.replace("-dialog", "") + ".json", function(json) { + + if (typeof (dialog.loading) == "function") dialog.loading(false); + + entitiesData = json; + drawTable(); + }); + } + else + { + drawTable(); + } + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/html-entities-dialog/html-entities.json b/static/editor.md/plugins/html-entities-dialog/html-entities.json new file mode 100644 index 0000000..e9e8229 --- /dev/null +++ b/static/editor.md/plugins/html-entities-dialog/html-entities.json @@ -0,0 +1,936 @@ +[ + { + "name" : "&#64;", + "description":"at symbol" + }, + { + "name":"&copy;", + "description":"copyright symbol" + }, + { + "name":"&reg;", + "description":"registered symbol" + }, + { + "name":"&trade;", + "description":"trademark symbol" + }, + { + "name":"&hearts;", + "description":"heart" + }, + { + "name":"&nbsp;", + "description":"Inserts a non-breaking blank space" + }, + { + "name":"&amp;", + "description":"Ampersand" + }, + { + "name":"&#36;", + "description":"dollar symbol" + }, + { + "name":"&cent;", + "description":"Cent symbol" + }, + { + "name":"&pound;", + "description":"Pound" + }, + { + "name":"&yen;", + "description":"Yen" + }, + { + "name":"&euro;", + "description":"Euro symbol" + }, + { + "name":"&quot;", + "description":"quotation mark" + }, + { + "name":"&ldquo;", + "description":"Opening Double Quotes " + }, + { + "name":"&rdquo;", + "description":"Closing Double Quotes " + }, + { + "name":"&lsquo;", + "description":"Opening Single Quote Mark " + }, + { + "name":"&rsquo;", + "description":"Closing Single Quote Mark " + }, + { + "name":"&laquo;", + "description":"angle quotation mark (left)" + }, + { + "name":"&raquo;", + "description":"angle quotation mark (right)" + }, + { + "name":"&lsaquo;", + "description":"single left angle quotation" + }, + { + "name":"&rsaquo;", + "description":"single right angle quotation" + }, + { + "name":"&sect;", + "description":"Section Symbol" + }, + { + "name":"&micro;", + "description":"micro sign" + }, + { + "name":"&para;", + "description":"Paragraph symbol" + }, + { + "name":"&bull;", + "description":"Big List Dot" + }, + { + "name":"&middot;", + "description":"Medium List Dot" + }, + { + "name":"&hellip;", + "description":"horizontal ellipsis" + }, + { + "name":"&#124;", + "description":"vertical bar" + }, + { + "name":"&brvbar;", + "description":"broken vertical bar" + }, + { + "name":"&ndash;", + "description":"en-dash" + }, + { + "name":"&mdash;", + "description":"em-dash" + }, + { + "name":"&curren;", + "description":"Generic currency symbol" + }, + { + "name":"&#33;", + "description":"exclamation point" + }, + { + "name":"&#35;", + "description":"number sign" + }, + { + "name":"&#39;", + "description":"single quote" + }, + { + "name":"&#40;", + "description":"" + }, + { + "name":"&#41;", + "description":"" + }, + { + "name":"&#42;", + "description":"asterisk" + }, + { + "name":"&#43;", + "description":"plus sign" + }, + { + "name":"&#44;", + "description":"comma" + }, + { + "name":"&#45;", + "description":"minus sign - hyphen" + }, + { + "name":"&#46;", + "description":"period" + }, + { + "name":"&#47;", + "description":"slash" + }, + { + "name":"&#48;", + "description":"0" + }, + { + "name":"&#49;", + "description":"1" + }, + { + "name":"&#50;", + "description":"2" + }, + { + "name":"&#51;", + "description":"3" + }, + { + "name":"&#52;", + "description":"4" + }, + { + "name":"&#53;", + "description":"5" + }, + { + "name":"&#54;", + "description":"6" + }, + { + "name":"&#55;", + "description":"7" + }, + { + "name":"&#56;", + "description":"8" + }, + { + "name":"&#57;", + "description":"9" + }, + { + "name":"&#58;", + "description":"colon" + }, + { + "name":"&#59;", + "description":"semicolon" + }, + { + "name":"&#61;", + "description":"equal sign" + }, + { + "name":"&#63;", + "description":"question mark" + }, + { + "name":"&lt;", + "description":"Less than" + }, + { + "name":"&gt;", + "description":"Greater than" + }, + { + "name":"&le;", + "description":"Less than or Equal to" + }, + { + "name":"&ge;", + "description":"Greater than or Equal to" + }, + { + "name":"&times;", + "description":"Multiplication symbol" + }, + { + "name":"&divide;", + "description":"Division symbol" + }, + { + "name":"&minus;", + "description":"Minus symbol" + }, + { + "name":"&plusmn;", + "description":"Plus/minus symbol" + }, + { + "name":"&ne;", + "description":"Not Equal" + }, + { + "name":"&sup1;", + "description":"Superscript 1" + }, + { + "name":"&sup2;", + "description":"Superscript 2" + }, + { + "name":"&sup3;", + "description":"Superscript 3" + }, + { + "name":"&frac12;", + "description":"Fraction ½" + }, + { + "name":"&frac14;", + "description":"Fraction ¼" + }, + { + "name":"&frac34;", + "description":"Fraction ¾" + }, + { + "name":"&permil;", + "description":"per mille" + }, + { + "name":"&deg;", + "description":"Degree symbol" + }, + { + "name":"&radic;", + "description":"square root" + }, + { + "name":"&infin;", + "description":"Infinity" + }, + { + "name":"&larr;", + "description":"left arrow" + }, + { + "name":"&uarr;", + "description":"up arrow" + }, + { + "name":"&rarr;", + "description":"right arrow" + }, + { + "name":"&darr;", + "description":"down arrow" + }, + { + "name":"&harr;", + "description":"left right arrow" + }, + { + "name":"&crarr;", + "description":"carriage return arrow" + }, + { + "name":"&lceil;", + "description":"left ceiling" + }, + { + "name":"&rceil;", + "description":"right ceiling" + }, + { + "name":"&lfloor;", + "description":"left floor" + }, + { + "name":"&rfloor;", + "description":"right floor" + }, + { + "name":"&spades;", + "description":"spade" + }, + { + "name":"&clubs;", + "description":"club" + }, + { + "name":"&hearts;", + "description":"heart" + }, + { + "name":"&diams;", + "description":"diamond" + }, + { + "name":"&loz;", + "description":"lozenge" + }, + { + "name":"&dagger;", + "description":"dagger" + }, + { + "name":"&Dagger;", + "description":"double dagger" + }, + { + "name":"&iexcl;", + "description":"inverted exclamation mark" + }, + { + "name":"&iquest;", + "description":"inverted question mark" + }, + { + "name":"&#338;", + "description":"latin capital letter OE" + }, + { + "name":"&#339;", + "description":"latin small letter oe" + }, + { + "name":"&#352;", + "description":"latin capital letter S with caron" + }, + { + "name":"&#353;", + "description":"latin small letter s with caron" + }, + { + "name":"&#376;", + "description":"latin capital letter Y with diaeresis" + }, + { + "name":"&#402;", + "description":"latin small f with hook - function" + }, + { + "name":"&not;", + "description":"not sign" + }, + { + "name":"&ordf;", + "description":"feminine ordinal indicator" + }, + { + "name":"&uml;", + "description":"spacing diaeresis - umlaut" + }, + { + "name":"&macr;", + "description":"spacing macron - overline" + }, + { + "name":"&acute;", + "description":"acute accent - spacing acute" + }, + { + "name":"&Agrave;", + "description":"latin capital letter A with grave" + }, + { + "name":"&Aacute;", + "description":"latin capital letter A with acute" + }, + { + "name":"&Acirc;", + "description":"latin capital letter A with circumflex" + }, + { + "name":"&Atilde;", + "description":"latin capital letter A with tilde" + }, + { + "name":"&Auml;", + "description":"latin capital letter A with diaeresis" + }, + { + "name":"&Aring;", + "description":"latin capital letter A with ring above" + }, + { + "name":"&AElig;", + "description":"latin capital letter AE" + }, + { + "name":"&Ccedil;", + "description":"latin capital letter C with cedilla" + }, + { + "name":"&Egrave;", + "description":"latin capital letter E with grave" + }, + { + "name":"&Eacute;", + "description":"latin capital letter E with acute" + }, + { + "name":"&Ecirc;", + "description":"latin capital letter E with circumflex" + }, + { + "name":"&Euml;", + "description":"latin capital letter E with diaeresis" + }, + { + "name":"&Igrave;", + "description":"latin capital letter I with grave" + }, + { + "name":"&Iacute;", + "description":"latin capital letter I with acute" + }, + { + "name":"&Icirc;", + "description":"latin capital letter I with circumflex" + }, + { + "name":"&Iuml;", + "description":"latin capital letter I with diaeresis" + }, + + { + "name":"&ETH;", + "description":"latin capital letter ETH" + }, + { + "name":"&Ntilde;", + "description":"latin capital letter N with tilde" + }, + { + "name":"&Ograve;", + "description":"latin capital letter O with grave" + }, + { + "name":"&Oacute;", + "description":"latin capital letter O with acute" + }, + { + "name":"&Ocirc;", + "description":"latin capital letter O with circumflex" + }, + { + "name":"&Otilde;", + "description":"latin capital letter O with tilde" + }, + { + "name":"&Ouml;", + "description":"latin capital letter O with diaeresis" + }, + { + "name":"&times;", + "description":"multiplication sign" + }, + { + "name":"&Oslash;", + "description":"latin capital letter O with slash" + }, + { + "name":"&Ugrave;", + "description":"latin capital letter U with grave" + }, + { + "name":"&Uacute;", + "description":"latin capital letter U with acute" + }, + { + "name":"&Ucirc;", + "description":"latin capital letter U with circumflex" + }, + { + "name":"&Uuml;", + "description":"latin capital letter U with diaeresis" + }, + { + "name":"&Yacute;", + "description":"latin capital letter Y with acute" + }, + { + "name":"&THORN;", + "description":"latin capital letter THORN" + }, + { + "name":"&szlig;", + "description":"latin small letter sharp s - ess-zed" + }, + + + { + "name":"&eth;", + "description":"latin capital letter eth" + }, + { + "name":"&ntilde;", + "description":"latin capital letter n with tilde" + }, + { + "name":"&ograve;", + "description":"latin capital letter o with grave" + }, + { + "name":"&oacute;", + "description":"latin capital letter o with acute" + }, + { + "name":"&ocirc;", + "description":"latin capital letter o with circumflex" + }, + { + "name":"&otilde;", + "description":"latin capital letter o with tilde" + }, + { + "name":"&ouml;", + "description":"latin capital letter o with diaeresis" + }, + { + "name":"&times;", + "description":"multiplication sign" + }, + { + "name":"&oslash;", + "description":"latin capital letter o with slash" + }, + { + "name":"&ugrave;", + "description":"latin capital letter u with grave" + }, + { + "name":"&uacute;", + "description":"latin capital letter u with acute" + }, + { + "name":"&ucirc;", + "description":"latin capital letter u with circumflex" + }, + { + "name":"&uuml;", + "description":"latin capital letter u with diaeresis" + }, + { + "name":"&yacute;", + "description":"latin capital letter y with acute" + }, + { + "name":"&thorn;", + "description":"latin capital letter thorn" + }, + { + "name":"&yuml;", + "description":"latin small letter y with diaeresis" + }, + + { + "name":"&agrave;", + "description":"latin capital letter a with grave" + }, + { + "name":"&aacute;", + "description":"latin capital letter a with acute" + }, + { + "name":"&acirc;", + "description":"latin capital letter a with circumflex" + }, + { + "name":"&atilde;", + "description":"latin capital letter a with tilde" + }, + { + "name":"&auml;", + "description":"latin capital letter a with diaeresis" + }, + { + "name":"&aring;", + "description":"latin capital letter a with ring above" + }, + { + "name":"&aelig;", + "description":"latin capital letter ae" + }, + { + "name":"&ccedil;", + "description":"latin capital letter c with cedilla" + }, + { + "name":"&egrave;", + "description":"latin capital letter e with grave" + }, + { + "name":"&eacute;", + "description":"latin capital letter e with acute" + }, + { + "name":"&ecirc;", + "description":"latin capital letter e with circumflex" + }, + { + "name":"&euml;", + "description":"latin capital letter e with diaeresis" + }, + { + "name":"&igrave;", + "description":"latin capital letter i with grave" + }, + { + "name":"&Iacute;", + "description":"latin capital letter i with acute" + }, + { + "name":"&icirc;", + "description":"latin capital letter i with circumflex" + }, + { + "name":"&iuml;", + "description":"latin capital letter i with diaeresis" + }, + + { + "name":"&#65;", + "description":"A" + }, + { + "name":"&#66;", + "description":"B" + }, + { + "name":"&#67;", + "description":"C" + }, + { + "name":"&#68;", + "description":"D" + }, + { + "name":"&#69;", + "description":"E" + }, + { + "name":"&#70;", + "description":"F" + }, + { + "name":"&#71;", + "description":"G" + }, + { + "name":"&#72;", + "description":"H" + }, + { + "name":"&#73;", + "description":"I" + }, + { + "name":"&#74;", + "description":"J" + }, + { + "name":"&#75;", + "description":"K" + }, + { + "name":"&#76;", + "description":"L" + }, + { + "name":"&#77;", + "description":"M" + }, + { + "name":"&#78;", + "description":"N" + }, + { + "name":"&#79;", + "description":"O" + }, + { + "name":"&#80;", + "description":"P" + }, + { + "name":"&#81;", + "description":"Q" + }, + { + "name":"&#82;", + "description":"R" + }, + { + "name":"&#83;", + "description":"S" + }, + { + "name":"&#84;", + "description":"T" + }, + { + "name":"&#85;", + "description":"U" + }, + { + "name":"&#86;", + "description":"V" + }, + { + "name":"&#87;", + "description":"W" + }, + { + "name":"&#88;", + "description":"X" + }, + { + "name":"&#89;", + "description":"Y" + }, + { + "name":"&#90;", + "description":"Z" + }, + { + "name":"&#91;", + "description":"opening bracket" + }, + { + "name":"&#92;", + "description":"backslash" + }, + { + "name":"&#93;", + "description":"closing bracket" + }, + { + "name":"&#94;", + "description":"caret - circumflex" + }, + { + "name":"&#95;", + "description":"underscore" + }, + + { + "name":"&#96;", + "description":"grave accent" + }, + { + "name":"&#97;", + "description":"a" + }, + { + "name":"&#98;", + "description":"b" + }, + { + "name":"&#99;", + "description":"c" + }, + { + "name":"&#100;", + "description":"d" + }, + { + "name":"&#101;", + "description":"e" + }, + { + "name":"&#102;", + "description":"f" + }, + { + "name":"&#103;", + "description":"g" + }, + { + "name":"&#104;", + "description":"h" + }, + { + "name":"&#105;", + "description":"i" + }, + { + "name":"&#106;", + "description":"j" + }, + { + "name":"&#107;", + "description":"k" + }, + { + "name":"&#108;", + "description":"l" + }, + { + "name":"&#109;", + "description":"m" + }, + { + "name":"&#110;", + "description":"n" + }, + { + "name":"&#111;", + "description":"o" + }, + { + "name":"&#112;", + "description":"p" + }, + { + "name":"&#113;", + "description":"q" + }, + { + "name":"&#114;", + "description":"r" + }, + { + "name":"&#115;", + "description":"s" + }, + { + "name":"&#116;", + "description":"t" + }, + { + "name":"&#117;", + "description":"u" + }, + { + "name":"&#118;", + "description":"v" + }, + { + "name":"&#119;", + "description":"w" + }, + { + "name":"&#120;", + "description":"x" + }, + { + "name":"&#121;", + "description":"y" + }, + { + "name":"&#122;", + "description":"z" + }, + { + "name":"&#123;", + "description":"opening brace" + }, + { + "name":"&#124;", + "description":"vertical bar" + }, + { + "name":"&#125;", + "description":"closing brace" + }, + { + "name":"&#126;", + "description":"equivalency sign - tilde" + } +] \ No newline at end of file diff --git a/static/editor.md/plugins/image-dialog/image-dialog.js b/static/editor.md/plugins/image-dialog/image-dialog.js new file mode 100644 index 0000000..58c5d25 --- /dev/null +++ b/static/editor.md/plugins/image-dialog/image-dialog.js @@ -0,0 +1,221 @@ +/*! + * Image (upload) dialog plugin for Editor.md + * + * @file image-dialog.js + * @author pandao + * @version 1.3.4 + * @updateTime 2015-06-09 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + + var pluginName = "image-dialog"; + + exports.fn.imageDialog = function() { + + var _this = this; + var cm = this.cm; + var lang = this.lang; + var editor = this.editor; + var settings = this.settings; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var imageLang = lang.dialog.image; + var classPrefix = this.classPrefix; + var iframeName = classPrefix + "image-iframe"; + var dialogName = classPrefix + pluginName, dialog; + + cm.focus(); + + var loading = function(show) { + var _loading = dialog.find("." + classPrefix + "dialog-mask"); + _loading[(show) ? "show" : "hide"](); + }; + + if (editor.find("." + dialogName).length < 1) + { + var guid = (new Date).getTime(); + var action = settings.imageUploadURL + (settings.imageUploadURL.indexOf("?") >= 0 ? "&" : "?") + "guid=" + guid; + + if (settings.crossDomainUpload) + { + action += "&callback=" + settings.uploadCallbackURL + "&dialog_id=editormd-image-dialog-" + guid; + } + + var dialogContent = ( (settings.imageUpload) ? "
                    " : "
                    " ) + + ( (settings.imageUpload) ? "" : "" ) + + "" + + "" + (function(){ + return (settings.imageUpload) ? "
                    " + + "" + + "" + + "
                    " : ""; + })() + + "
                    " + + "" + + "" + + "
                    " + + "" + + "" + + "
                    " + + ( (settings.imageUpload) ? "" : "
                    "); + + //var imageFooterHTML = ""; + + dialog = this.createDialog({ + title : imageLang.title, + width : (settings.imageUpload) ? 465 : 380, + height : 254, + name : dialogName, + content : dialogContent, + mask : settings.dialogShowMask, + drag : settings.dialogDraggable, + lockScreen : settings.dialogLockScreen, + maskStyle : { + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }, + buttons : { + enter : [lang.buttons.enter, function() { + var url = this.find("[data-url]").val(); + var alt = this.find("[data-alt]").val(); + var link = this.find("[data-link]").val(); + + if (url === "") + { + alert(imageLang.imageURLEmpty); + return false; + } + + var altAttr = (alt !== "") ? " \"" + alt + "\"" : ""; + + if (link === "" || link === "http://") + { + cm.replaceSelection("![" + alt + "](" + url + altAttr + ")"); + } + else + { + cm.replaceSelection("[![" + alt + "](" + url + altAttr + ")](" + link + altAttr + ")"); + } + + if (alt === "") { + cm.setCursor(cursor.line, cursor.ch + 2); + } + + this.hide().lockScreen(false).hideMask(); + + return false; + }], + + cancel : [lang.buttons.cancel, function() { + this.hide().lockScreen(false).hideMask(); + + return false; + }] + } + }); + + dialog.attr("id", classPrefix + "image-dialog-" + guid); + + if (!settings.imageUpload) { + return ; + } + + var fileInput = dialog.find("[name=\"" + classPrefix + "image-file\"]"); + + fileInput.bind("change", function() { + var fileName = fileInput.val(); + var isImage = new RegExp("(\\.(" + settings.imageFormats.join("|") + "))$"); // /(\.(webp|jpg|jpeg|gif|bmp|png))$/ + + if (fileName === "") + { + alert(imageLang.uploadFileEmpty); + + return false; + } + + if (!isImage.test(fileName)) + { + alert(imageLang.formatNotAllowed + settings.imageFormats.join(", ")); + + return false; + } + + loading(true); + + var submitHandler = function() { + + var uploadIframe = document.getElementById(iframeName); + + uploadIframe.onload = function() { + + loading(false); + + var body = (uploadIframe.contentWindow ? uploadIframe.contentWindow : uploadIframe.contentDocument).document.body; + var json = (body.innerText) ? body.innerText : ( (body.textContent) ? body.textContent : null); + + json = (typeof JSON.parse !== "undefined") ? JSON.parse(json) : eval("(" + json + ")"); + + if(!settings.crossDomainUpload) + { + if (json.success === 1) + { + dialog.find("[data-url]").val(json.url); + } + else + { + alert(json.message); + } + } + + return false; + }; + }; + + dialog.find("[type=\"submit\"]").bind("click", submitHandler).trigger("click"); + }); + } + + dialog = editor.find("." + dialogName); + dialog.find("[type=\"text\"]").val(""); + dialog.find("[type=\"file\"]").val(""); + dialog.find("[data-link]").val("http://"); + + this.dialogShowMask(dialog); + this.dialogLockScreen(); + dialog.show(); + + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/link-dialog/link-dialog.js b/static/editor.md/plugins/link-dialog/link-dialog.js new file mode 100644 index 0000000..3e1d0bf --- /dev/null +++ b/static/editor.md/plugins/link-dialog/link-dialog.js @@ -0,0 +1,133 @@ +/*! + * Link dialog plugin for Editor.md + * + * @file link-dialog.js + * @author pandao + * @version 1.2.1 + * @updateTime 2015-06-09 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + + var pluginName = "link-dialog"; + + exports.fn.linkDialog = function() { + + var _this = this; + var cm = this.cm; + var editor = this.editor; + var settings = this.settings; + var selection = cm.getSelection(); + var lang = this.lang; + var linkLang = lang.dialog.link; + var classPrefix = this.classPrefix; + var dialogName = classPrefix + pluginName, dialog; + + cm.focus(); + + if (editor.find("." + dialogName).length > 0) + { + dialog = editor.find("." + dialogName); + dialog.find("[data-url]").val("http://"); + dialog.find("[data-title]").val(selection); + + this.dialogShowMask(dialog); + this.dialogLockScreen(); + dialog.show(); + } + else + { + var dialogHTML = "
                    " + + "" + + "" + + "
                    " + + "" + + "" + + "
                    " + + "
                    "; + + dialog = this.createDialog({ + title : linkLang.title, + width : 380, + height : 211, + content : dialogHTML, + mask : settings.dialogShowMask, + drag : settings.dialogDraggable, + lockScreen : settings.dialogLockScreen, + maskStyle : { + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }, + buttons : { + enter : [lang.buttons.enter, function() { + var url = this.find("[data-url]").val(); + var title = this.find("[data-title]").val(); + + if (url === "http://" || url === "") + { + alert(linkLang.urlEmpty); + return false; + } + + /*if (title === "") + { + alert(linkLang.titleEmpty); + return false; + }*/ + + var str = "[" + title + "](" + url + " \"" + title + "\")"; + + if (title == "") + { + str = "[" + url + "](" + url + ")"; + } + + cm.replaceSelection(str); + + this.hide().lockScreen(false).hideMask(); + + return false; + }], + + cancel : [lang.buttons.cancel, function() { + this.hide().lockScreen(false).hideMask(); + + return false; + }] + } + }); + } + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/plugin-template.js b/static/editor.md/plugins/plugin-template.js new file mode 100644 index 0000000..8e30169 --- /dev/null +++ b/static/editor.md/plugins/plugin-template.js @@ -0,0 +1,111 @@ +/*! + * Link dialog plugin for Editor.md + * + * @file link-dialog.js + * @author pandao + * @version 1.2.0 + * @updateTime 2015-03-07 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + + var $ = jQuery; // if using module loader(Require.js/Sea.js). + + var langs = { + "zh-cn" : { + toolbar : { + table : "表格" + }, + dialog : { + table : { + title : "添加表格", + cellsLabel : "单元格数", + alignLabel : "对齐方式", + rows : "行数", + cols : "列数", + aligns : ["默认", "左对齐", "居中对齐", "右对齐"] + } + } + }, + "zh-tw" : { + toolbar : { + table : "添加表格" + }, + dialog : { + table : { + title : "添加表格", + cellsLabel : "單元格數", + alignLabel : "對齊方式", + rows : "行數", + cols : "列數", + aligns : ["默認", "左對齊", "居中對齊", "右對齊"] + } + } + }, + "en" : { + toolbar : { + table : "Tables" + }, + dialog : { + table : { + title : "Tables", + cellsLabel : "Cells", + alignLabel : "Align", + rows : "Rows", + cols : "Cols", + aligns : ["Default", "Left align", "Center align", "Right align"] + } + } + } + }; + + exports.fn.htmlEntities = function() { + /* + var _this = this; // this == the current instance object of Editor.md + var lang = _this.lang; + var settings = _this.settings; + var editor = this.editor; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var classPrefix = this.classPrefix; + + $.extend(true, this.lang, langs[this.lang.name]); // l18n + this.setToolbar(); + + cm.focus(); + */ + //.... + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/preformatted-text-dialog/preformatted-text-dialog.js b/static/editor.md/plugins/preformatted-text-dialog/preformatted-text-dialog.js new file mode 100644 index 0000000..c890adc --- /dev/null +++ b/static/editor.md/plugins/preformatted-text-dialog/preformatted-text-dialog.js @@ -0,0 +1,172 @@ +/*! + * Preformatted text dialog plugin for Editor.md + * + * @file preformatted-text-dialog.js + * @author pandao + * @version 1.2.0 + * @updateTime 2015-03-07 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + var cmEditor; + var pluginName = "preformatted-text-dialog"; + + exports.fn.preformattedTextDialog = function() { + + var _this = this; + var cm = this.cm; + var lang = this.lang; + var editor = this.editor; + var settings = this.settings; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var classPrefix = this.classPrefix; + var dialogLang = lang.dialog.preformattedText; + var dialogName = classPrefix + pluginName, dialog; + + cm.focus(); + + if (editor.find("." + dialogName).length > 0) + { + dialog = editor.find("." + dialogName); + dialog.find("textarea").val(selection); + + this.dialogShowMask(dialog); + this.dialogLockScreen(); + dialog.show(); + } + else + { + var dialogContent = ""; + + dialog = this.createDialog({ + name : dialogName, + title : dialogLang.title, + width : 780, + height : 540, + mask : settings.dialogShowMask, + drag : settings.dialogDraggable, + content : dialogContent, + lockScreen : settings.dialogLockScreen, + maskStyle : { + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }, + buttons : { + enter : [lang.buttons.enter, function() { + var codeTexts = this.find("textarea").val(); + + if (codeTexts === "") + { + alert(dialogLang.emptyAlert); + return false; + } + + codeTexts = codeTexts.split("\n"); + + for (var i in codeTexts) + { + codeTexts[i] = " " + codeTexts[i]; + } + + codeTexts = codeTexts.join("\n"); + + if (cursor.ch !== 0) { + codeTexts = "\r\n\r\n" + codeTexts; + } + + cm.replaceSelection(codeTexts); + + this.hide().lockScreen(false).hideMask(); + + return false; + }], + cancel : [lang.buttons.cancel, function() { + this.hide().lockScreen(false).hideMask(); + + return false; + }] + } + }); + } + + var cmConfig = { + mode : "text/html", + theme : settings.theme, + tabSize : 4, + autofocus : true, + autoCloseTags : true, + indentUnit : 4, + lineNumbers : true, + lineWrapping : true, + extraKeys : {"Ctrl-Q": function(cm){ cm.foldCode(cm.getCursor()); }}, + foldGutter : true, + gutters : ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + matchBrackets : true, + indentWithTabs : true, + styleActiveLine : true, + styleSelectedText : true, + autoCloseBrackets : true, + showTrailingSpace : true, + highlightSelectionMatches : true + }; + + var textarea = dialog.find("textarea"); + var cmObj = dialog.find(".CodeMirror"); + + if (dialog.find(".CodeMirror").length < 1) + { + cmEditor = exports.$CodeMirror.fromTextArea(textarea[0], cmConfig); + cmObj = dialog.find(".CodeMirror"); + + cmObj.css({ + "float" : "none", + margin : "0 0 5px", + border : "1px solid #ddd", + fontSize : settings.fontSize, + width : "100%", + height : "410px" + }); + + cmEditor.on("change", function(cm) { + textarea.val(cm.getValue()); + }); + } + else + { + cmEditor.setValue(cm.getSelection()); + } + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/reference-link-dialog/reference-link-dialog.js b/static/editor.md/plugins/reference-link-dialog/reference-link-dialog.js new file mode 100644 index 0000000..f1ad086 --- /dev/null +++ b/static/editor.md/plugins/reference-link-dialog/reference-link-dialog.js @@ -0,0 +1,153 @@ +/*! + * Reference link dialog plugin for Editor.md + * + * @file reference-link-dialog.js + * @author pandao + * @version 1.2.1 + * @updateTime 2015-06-09 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + + var pluginName = "reference-link-dialog"; + var ReLinkId = 1; + + exports.fn.referenceLinkDialog = function() { + + var _this = this; + var cm = this.cm; + var lang = this.lang; + var editor = this.editor; + var settings = this.settings; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var dialogLang = lang.dialog.referenceLink; + var classPrefix = this.classPrefix; + var dialogName = classPrefix + pluginName, dialog; + + cm.focus(); + + if (editor.find("." + dialogName).length < 1) + { + var dialogHTML = "
                    " + + "" + + "" + + "
                    " + + "" + + "" + + "
                    " + + "" + + "" + + "
                    " + + "" + + "" + + "
                    " + + "
                    "; + + dialog = this.createDialog({ + name : dialogName, + title : dialogLang.title, + width : 380, + height : 296, + content : dialogHTML, + mask : settings.dialogShowMask, + drag : settings.dialogDraggable, + lockScreen : settings.dialogLockScreen, + maskStyle : { + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }, + buttons : { + enter : [lang.buttons.enter, function() { + var name = this.find("[data-name]").val(); + var url = this.find("[data-url]").val(); + var rid = this.find("[data-url-id]").val(); + var title = this.find("[data-title]").val(); + + if (name === "") + { + alert(dialogLang.nameEmpty); + return false; + } + + if (rid === "") + { + alert(dialogLang.idEmpty); + return false; + } + + if (url === "http://" || url === "") + { + alert(dialogLang.urlEmpty); + return false; + } + + //cm.replaceSelection("[" + title + "][" + name + "]\n[" + name + "]: " + url + ""); + cm.replaceSelection("[" + name + "][" + rid + "]"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + + title = (title === "") ? "" : " \"" + title + "\""; + + cm.setValue(cm.getValue() + "\n[" + rid + "]: " + url + title + ""); + + this.hide().lockScreen(false).hideMask(); + + return false; + }], + cancel : [lang.buttons.cancel, function() { + this.hide().lockScreen(false).hideMask(); + + return false; + }] + } + }); + } + + dialog = editor.find("." + dialogName); + dialog.find("[data-name]").val("[" + ReLinkId + "]"); + dialog.find("[data-url-id]").val(""); + dialog.find("[data-url]").val("http://"); + dialog.find("[data-title]").val(selection); + + this.dialogShowMask(dialog); + this.dialogLockScreen(); + dialog.show(); + + ReLinkId++; + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/table-dialog/table-dialog.js b/static/editor.md/plugins/table-dialog/table-dialog.js new file mode 100644 index 0000000..578adf2 --- /dev/null +++ b/static/editor.md/plugins/table-dialog/table-dialog.js @@ -0,0 +1,218 @@ +/*! + * Table dialog plugin for Editor.md + * + * @file table-dialog.js + * @author pandao + * @version 1.2.1 + * @updateTime 2015-06-09 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + + var $ = jQuery; + var pluginName = "table-dialog"; + + var langs = { + "zh-cn" : { + toolbar : { + table : "表格" + }, + dialog : { + table : { + title : "添加表格", + cellsLabel : "单元格数", + alignLabel : "对齐方式", + rows : "行数", + cols : "列数", + aligns : ["默认", "左对齐", "居中对齐", "右对齐"] + } + } + }, + "zh-tw" : { + toolbar : { + table : "添加表格" + }, + dialog : { + table : { + title : "添加表格", + cellsLabel : "單元格數", + alignLabel : "對齊方式", + rows : "行數", + cols : "列數", + aligns : ["默認", "左對齊", "居中對齊", "右對齊"] + } + } + }, + "en" : { + toolbar : { + table : "Tables" + }, + dialog : { + table : { + title : "Tables", + cellsLabel : "Cells", + alignLabel : "Align", + rows : "Rows", + cols : "Cols", + aligns : ["Default", "Left align", "Center align", "Right align"] + } + } + } + }; + + exports.fn.tableDialog = function() { + var _this = this; + var cm = this.cm; + var editor = this.editor; + var settings = this.settings; + var path = settings.path + "../plugins/" + pluginName +"/"; + var classPrefix = this.classPrefix; + var dialogName = classPrefix + pluginName, dialog; + + $.extend(true, this.lang, langs[this.lang.name]); + this.setToolbar(); + + var lang = this.lang; + var dialogLang = lang.dialog.table; + + var dialogContent = [ + "
                    ", + "", + dialogLang.rows + "   ", + dialogLang.cols + "
                    ", + "", + "
                    ", + "
                    " + ].join("\n"); + + if (editor.find("." + dialogName).length > 0) + { + dialog = editor.find("." + dialogName); + + this.dialogShowMask(dialog); + this.dialogLockScreen(); + dialog.show(); + } + else + { + dialog = this.createDialog({ + name : dialogName, + title : dialogLang.title, + width : 360, + height : 226, + mask : settings.dialogShowMask, + drag : settings.dialogDraggable, + content : dialogContent, + lockScreen : settings.dialogLockScreen, + maskStyle : { + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }, + buttons : { + enter : [lang.buttons.enter, function() { + var rows = parseInt(this.find("[data-rows]").val()); + var cols = parseInt(this.find("[data-cols]").val()); + var align = this.find("[name=\"table-align\"]:checked").val(); + var table = ""; + var hrLine = "------------"; + + var alignSign = { + _default : hrLine, + left : ":" + hrLine, + center : ":" + hrLine + ":", + right : hrLine + ":" + }; + + if ( rows > 1 && cols > 0) + { + for (var r = 0, len = rows; r < len; r++) + { + var row = []; + var head = []; + + for (var c = 0, len2 = cols; c < len2; c++) + { + if (r === 1) { + head.push(alignSign[align]); + } + + row.push(" "); + } + + if (r === 1) { + table += "| " + head.join(" | ") + " |" + "\n"; + } + + table += "| " + row.join( (cols === 1) ? "" : " | " ) + " |" + "\n"; + } + } + + cm.replaceSelection(table); + + this.hide().lockScreen(false).hideMask(); + + return false; + }], + + cancel : [lang.buttons.cancel, function() { + this.hide().lockScreen(false).hideMask(); + + return false; + }] + } + }); + } + + var faBtns = dialog.find(".fa-btns"); + + if (faBtns.html() === "") + { + var icons = ["align-justify", "align-left", "align-center", "align-right"]; + var _lang = dialogLang.aligns; + var values = ["_default", "left", "center", "right"]; + + for (var i = 0, len = icons.length; i < len; i++) + { + var checked = (i === 0) ? " checked=\"checked\"" : ""; + var btn = ""; + + faBtns.append(btn); + } + } + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/plugins/test-plugin/test-plugin.js b/static/editor.md/plugins/test-plugin/test-plugin.js new file mode 100644 index 0000000..bc4da31 --- /dev/null +++ b/static/editor.md/plugins/test-plugin/test-plugin.js @@ -0,0 +1,66 @@ +/*! + * Test plugin for Editor.md + * + * @file test-plugin.js + * @author pandao + * @version 1.2.0 + * @updateTime 2015-03-07 + * {@link https://github.com/pandao/editor.md} + * @license MIT + */ + +(function() { + + var factory = function (exports) { + + var $ = jQuery; // if using module loader(Require.js/Sea.js). + + exports.testPlugin = function(){ + alert("testPlugin"); + }; + + exports.fn.testPluginMethodA = function() { + /* + var _this = this; // this == the current instance object of Editor.md + var lang = _this.lang; + var settings = _this.settings; + var editor = this.editor; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var classPrefix = this.classPrefix; + + cm.focus(); + */ + //.... + + alert("testPluginMethodA"); + }; + + }; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) { // for Require.js + + define(["editormd"], function(editormd) { + factory(editormd); + }); + + } else { // for Sea.js + define(function(require) { + var editormd = require("./../../editormd"); + factory(editormd); + }); + } + } + else + { + factory(window.editormd); + } + +})(); diff --git a/static/editor.md/src/editormd.js b/static/editor.md/src/editormd.js new file mode 100644 index 0000000..483a8c3 --- /dev/null +++ b/static/editor.md/src/editormd.js @@ -0,0 +1,4588 @@ +;(function(factory) { + "use strict"; + + // CommonJS/Node.js + if (typeof require === "function" && typeof exports === "object" && typeof module === "object") + { + module.exports = factory; + } + else if (typeof define === "function") // AMD/CMD/Sea.js + { + if (define.amd) // for Require.js + { + /* Require.js define replace */ + } + else + { + define(["jquery"], factory); // for Sea.js + } + } + else + { + window.editormd = factory(); + } + +}(function() { + + /* Require.js assignment replace */ + + "use strict"; + + var $ = (typeof (jQuery) !== "undefined") ? jQuery : Zepto; + + if (typeof ($) === "undefined") { + return ; + } + + /** + * editormd + * + * @param {String} id 编辑器的ID + * @param {Object} options 配置选项 Key/Value + * @returns {Object} editormd 返回editormd对象 + */ + + var editormd = function (id, options) { + return new editormd.fn.init(id, options); + }; + + editormd.title = editormd.$name = "Editor.md"; + editormd.version = "1.5.0"; + editormd.homePage = "https://pandao.github.io/editor.md/"; + editormd.classPrefix = "editormd-"; + + editormd.toolbarModes = { + full : [ + "undo", "redo", "|", + "bold", "del", "italic", "quote", "ucwords", "uppercase", "lowercase", "|", + "h1", "h2", "h3", "h4", "h5", "h6", "|", + "list-ul", "list-ol", "hr", "|", + "link", "reference-link", "image", "code", "preformatted-text", "code-block", "table", "datetime", "emoji", "html-entities", "pagebreak", "|", + "goto-line", "watch", "preview", "fullscreen", "clear", "search", "|", + "help", "info" + ], + simple : [ + "undo", "redo", "|", + "bold", "del", "italic", "quote", "uppercase", "lowercase", "|", + "h1", "h2", "h3", "h4", "h5", "h6", "|", + "list-ul", "list-ol", "hr", "|", + "watch", "preview", "fullscreen", "|", + "help", "info" + ], + mini : [ + "undo", "redo", "|", + "watch", "preview", "|", + "help", "info" + ] + }; + + editormd.defaults = { + mode : "gfm", //gfm or markdown + name : "", // Form element name + value : "", // value for CodeMirror, if mode not gfm/markdown + theme : "", // Editor.md self themes, before v1.5.0 is CodeMirror theme, default empty + editorTheme : "default", // Editor area, this is CodeMirror theme at v1.5.0 + previewTheme : "", // Preview area theme, default empty + markdown : "", // Markdown source code + appendMarkdown : "", // if in init textarea value not empty, append markdown to textarea + width : "100%", + height : "100%", + path : "./lib/", // Dependents module file directory + pluginPath : "", // If this empty, default use settings.path + "../plugins/" + delay : 300, // Delay parse markdown to html, Uint : ms + autoLoadModules : true, // Automatic load dependent module files + watch : true, + placeholder : "Enjoy Markdown! coding now...", + gotoLine : true, + codeFold : false, + autoHeight : false, + autoFocus : true, + autoCloseTags : true, + searchReplace : true, + syncScrolling : true, // true | false | "single", default true + readOnly : false, + tabSize : 4, + indentUnit : 4, + lineNumbers : true, + lineWrapping : true, + autoCloseBrackets : true, + showTrailingSpace : true, + matchBrackets : true, + indentWithTabs : true, + styleSelectedText : true, + matchWordHighlight : true, // options: true, false, "onselected" + styleActiveLine : true, // Highlight the current line + dialogLockScreen : true, + dialogShowMask : true, + dialogDraggable : true, + dialogMaskBgColor : "#fff", + dialogMaskOpacity : 0.1, + fontSize : "13px", + saveHTMLToTextarea : false, + disabledKeyMaps : [], + + onload : function() {}, + onresize : function() {}, + onchange : function() {}, + onwatch : null, + onunwatch : null, + onpreviewing : function() {}, + onpreviewed : function() {}, + onfullscreen : function() {}, + onfullscreenExit : function() {}, + onscroll : function() {}, + onpreviewscroll : function() {}, + + imageUpload : false, + imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"], + imageUploadURL : "", + crossDomainUpload : false, + uploadCallbackURL : "", + + toc : true, // Table of contents + tocm : false, // Using [TOCM], auto create ToC dropdown menu + tocTitle : "", // for ToC dropdown menu btn + tocDropdown : false, + tocContainer : "", + tocStartLevel : 1, // Said from H1 to create ToC + htmlDecode : false, // Open the HTML tag identification + pageBreak : true, // Enable parse page break [========] + atLink : true, // for @link + emailLink : true, // for email address auto link + taskList : false, // Enable Github Flavored Markdown task lists + emoji : false, // :emoji: , Support Github emoji, Twitter Emoji (Twemoji); + // Support FontAwesome icon emoji :fa-xxx: > Using fontAwesome icon web fonts; + // Support Editor.md logo icon emoji :editormd-logo: :editormd-logo-1x: > 1~8x; + tex : false, // TeX(LaTeX), based on KaTeX + flowChart : false, // flowChart.js only support IE9+ + sequenceDiagram : false, // sequenceDiagram.js only support IE9+ + previewCodeHighlight : true, + + toolbar : true, // show/hide toolbar + toolbarAutoFixed : true, // on window scroll auto fixed position + toolbarIcons : "full", + toolbarTitles : {}, + toolbarHandlers : { + ucwords : function() { + return editormd.toolbarHandlers.ucwords; + }, + lowercase : function() { + return editormd.toolbarHandlers.lowercase; + } + }, + toolbarCustomIcons : { // using html tag create toolbar icon, unused default tag. + lowercase : "a", + "ucwords" : "Aa" + }, + toolbarIconsClass : { + undo : "fa-undo", + redo : "fa-repeat", + bold : "fa-bold", + del : "fa-strikethrough", + italic : "fa-italic", + quote : "fa-quote-left", + uppercase : "fa-font", + h1 : editormd.classPrefix + "bold", + h2 : editormd.classPrefix + "bold", + h3 : editormd.classPrefix + "bold", + h4 : editormd.classPrefix + "bold", + h5 : editormd.classPrefix + "bold", + h6 : editormd.classPrefix + "bold", + "list-ul" : "fa-list-ul", + "list-ol" : "fa-list-ol", + hr : "fa-minus", + link : "fa-link", + "reference-link" : "fa-anchor", + image : "fa-picture-o", + code : "fa-code", + "preformatted-text" : "fa-file-code-o", + "code-block" : "fa-file-code-o", + table : "fa-table", + datetime : "fa-clock-o", + emoji : "fa-smile-o", + "html-entities" : "fa-copyright", + pagebreak : "fa-newspaper-o", + "goto-line" : "fa-terminal", // fa-crosshairs + watch : "fa-eye-slash", + unwatch : "fa-eye", + preview : "fa-desktop", + search : "fa-search", + fullscreen : "fa-arrows-alt", + clear : "fa-eraser", + help : "fa-question-circle", + info : "fa-info-circle" + }, + toolbarIconTexts : {}, + + lang : { + name : "zh-cn", + description : "开源在线Markdown编辑器
                    Open source online Markdown editor.", + tocTitle : "目录", + toolbar : { + undo : "撤销(Ctrl+Z)", + redo : "重做(Ctrl+Y)", + bold : "粗体", + del : "删除线", + italic : "斜体", + quote : "引用", + ucwords : "将每个单词首字母转成大写", + uppercase : "将所选转换成大写", + lowercase : "将所选转换成小写", + h1 : "标题1", + h2 : "标题2", + h3 : "标题3", + h4 : "标题4", + h5 : "标题5", + h6 : "标题6", + "list-ul" : "无序列表", + "list-ol" : "有序列表", + hr : "横线", + link : "链接", + "reference-link" : "引用链接", + image : "添加图片", + code : "行内代码", + "preformatted-text" : "预格式文本 / 代码块(缩进风格)", + "code-block" : "代码块(多语言风格)", + table : "添加表格", + datetime : "日期时间", + emoji : "Emoji表情", + "html-entities" : "HTML实体字符", + pagebreak : "插入分页符", + "goto-line" : "跳转到行", + watch : "关闭实时预览", + unwatch : "开启实时预览", + preview : "全窗口预览HTML(按 Shift + ESC还原)", + fullscreen : "全屏(按ESC还原)", + clear : "清空", + search : "搜索", + help : "使用帮助", + info : "关于" + editormd.title + }, + buttons : { + enter : "确定", + cancel : "取消", + close : "关闭" + }, + dialog : { + link : { + title : "添加链接", + url : "链接地址", + urlTitle : "链接标题", + urlEmpty : "错误:请填写链接地址。" + }, + referenceLink : { + title : "添加引用链接", + name : "引用名称", + url : "链接地址", + urlId : "链接ID", + urlTitle : "链接标题", + nameEmpty: "错误:引用链接的名称不能为空。", + idEmpty : "错误:请填写引用链接的ID。", + urlEmpty : "错误:请填写引用链接的URL地址。" + }, + image : { + title : "添加图片", + url : "图片地址", + link : "图片链接", + alt : "图片描述", + uploadButton : "本地上传", + imageURLEmpty : "错误:图片地址不能为空。", + uploadFileEmpty : "错误:上传的图片不能为空。", + formatNotAllowed : "错误:只允许上传图片文件,允许上传的图片文件格式有:" + }, + preformattedText : { + title : "添加预格式文本或代码块", + emptyAlert : "错误:请填写预格式文本或代码的内容。" + }, + codeBlock : { + title : "添加代码块", + selectLabel : "代码语言:", + selectDefaultText : "请选择代码语言", + otherLanguage : "其他语言", + unselectedLanguageAlert : "错误:请选择代码所属的语言类型。", + codeEmptyAlert : "错误:请填写代码内容。" + }, + htmlEntities : { + title : "HTML 实体字符" + }, + help : { + title : "使用帮助" + } + } + } + }; + + editormd.classNames = { + tex : editormd.classPrefix + "tex" + }; + + editormd.dialogZindex = 99999; + + editormd.$katex = null; + editormd.$marked = null; + editormd.$CodeMirror = null; + editormd.$prettyPrint = null; + + var timer, flowchartTimer; + + editormd.prototype = editormd.fn = { + state : { + watching : false, + loaded : false, + preview : false, + fullscreen : false + }, + + /** + * 构造函数/实例初始化 + * Constructor / instance initialization + * + * @param {String} id 编辑器的ID + * @param {Object} [options={}] 配置选项 Key/Value + * @returns {editormd} 返回editormd的实例对象 + */ + + init : function (id, options) { + + options = options || {}; + + if (typeof id === "object") + { + options = id; + } + + var _this = this; + var classPrefix = this.classPrefix = editormd.classPrefix; + var settings = this.settings = $.extend(true, editormd.defaults, options); + + id = (typeof id === "object") ? settings.id : id; + + var editor = this.editor = $("#" + id); + + this.id = id; + this.lang = settings.lang; + + var classNames = this.classNames = { + textarea : { + html : classPrefix + "html-textarea", + markdown : classPrefix + "markdown-textarea" + } + }; + + settings.pluginPath = (settings.pluginPath === "") ? settings.path + "../plugins/" : settings.pluginPath; + + this.state.watching = (settings.watch) ? true : false; + + if ( !editor.hasClass("editormd") ) { + editor.addClass("editormd"); + } + + editor.css({ + width : (typeof settings.width === "number") ? settings.width + "px" : settings.width, + height : (typeof settings.height === "number") ? settings.height + "px" : settings.height + }); + + if (settings.autoHeight) + { + editor.css("height", "auto"); + } + + var markdownTextarea = this.markdownTextarea = editor.children("textarea"); + + if (markdownTextarea.length < 1) + { + editor.append(""); + markdownTextarea = this.markdownTextarea = editor.children("textarea"); + } + + markdownTextarea.addClass(classNames.textarea.markdown).attr("placeholder", settings.placeholder); + + if (typeof markdownTextarea.attr("name") === "undefined" || markdownTextarea.attr("name") === "") + { + markdownTextarea.attr("name", (settings.name !== "") ? settings.name : id + "-markdown-doc"); + } + + var appendElements = [ + (!settings.readOnly) ? "" : "", + ( (settings.saveHTMLToTextarea) ? "" : "" ), + "
                    ", + "
                    ", + "
                    " + ].join("\n"); + + editor.append(appendElements).addClass(classPrefix + "vertical"); + + if (settings.theme !== "") + { + editor.addClass(classPrefix + "theme-" + settings.theme); + } + + this.mask = editor.children("." + classPrefix + "mask"); + this.containerMask = editor.children("." + classPrefix + "container-mask"); + + if (settings.markdown !== "") + { + markdownTextarea.val(settings.markdown); + } + + if (settings.appendMarkdown !== "") + { + markdownTextarea.val(markdownTextarea.val() + settings.appendMarkdown); + } + + this.htmlTextarea = editor.children("." + classNames.textarea.html); + this.preview = editor.children("." + classPrefix + "preview"); + this.previewContainer = this.preview.children("." + classPrefix + "preview-container"); + + if (settings.previewTheme !== "") + { + this.preview.addClass(classPrefix + "preview-theme-" + settings.previewTheme); + } + + if (typeof define === "function" && define.amd) + { + if (typeof katex !== "undefined") + { + editormd.$katex = katex; + } + + if (settings.searchReplace && !settings.readOnly) + { + editormd.loadCSS(settings.path + "codemirror/addon/dialog/dialog"); + editormd.loadCSS(settings.path + "codemirror/addon/search/matchesonscrollbar"); + } + } + + if ((typeof define === "function" && define.amd) || !settings.autoLoadModules) + { + if (typeof CodeMirror !== "undefined") { + editormd.$CodeMirror = CodeMirror; + } + + if (typeof marked !== "undefined") { + editormd.$marked = marked; + } + + this.setCodeMirror().setToolbar().loadedDisplay(); + } + else + { + this.loadQueues(); + } + + return this; + }, + + /** + * 所需组件加载队列 + * Required components loading queue + * + * @returns {editormd} 返回editormd的实例对象 + */ + + loadQueues : function() { + var _this = this; + var settings = this.settings; + var loadPath = settings.path; + + var loadFlowChartOrSequenceDiagram = function() { + + if (editormd.isIE8) + { + _this.loadedDisplay(); + + return ; + } + + if (settings.flowChart || settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "raphael.min", function() { + + editormd.loadScript(loadPath + "underscore.min", function() { + + if (!settings.flowChart && settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "sequence-diagram.min", function() { + _this.loadedDisplay(); + }); + } + else if (settings.flowChart && !settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "flowchart.min", function() { + editormd.loadScript(loadPath + "jquery.flowchart.min", function() { + _this.loadedDisplay(); + }); + }); + } + else if (settings.flowChart && settings.sequenceDiagram) + { + editormd.loadScript(loadPath + "flowchart.min", function() { + editormd.loadScript(loadPath + "jquery.flowchart.min", function() { + editormd.loadScript(loadPath + "sequence-diagram.min", function() { + _this.loadedDisplay(); + }); + }); + }); + } + }); + + }); + } + else + { + _this.loadedDisplay(); + } + }; + + editormd.loadCSS(loadPath + "codemirror/codemirror.min"); + + if (settings.searchReplace && !settings.readOnly) + { + editormd.loadCSS(loadPath + "codemirror/addon/dialog/dialog"); + editormd.loadCSS(loadPath + "codemirror/addon/search/matchesonscrollbar"); + } + + if (settings.codeFold) + { + editormd.loadCSS(loadPath + "codemirror/addon/fold/foldgutter"); + } + + editormd.loadScript(loadPath + "codemirror/codemirror.min", function() { + editormd.$CodeMirror = CodeMirror; + + editormd.loadScript(loadPath + "codemirror/modes.min", function() { + + editormd.loadScript(loadPath + "codemirror/addons.min", function() { + + _this.setCodeMirror(); + + if (settings.mode !== "gfm" && settings.mode !== "markdown") + { + _this.loadedDisplay(); + + return false; + } + + _this.setToolbar(); + + editormd.loadScript(loadPath + "marked.min", function() { + + editormd.$marked = marked; + + if (settings.previewCodeHighlight) + { + editormd.loadScript(loadPath + "prettify.min", function() { + loadFlowChartOrSequenceDiagram(); + }); + } + else + { + loadFlowChartOrSequenceDiagram(); + } + }); + + }); + + }); + + }); + + return this; + }, + + /** + * 设置 Editor.md 的整体主题,主要是工具栏 + * Setting Editor.md theme + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setTheme : function(theme) { + var editor = this.editor; + var oldTheme = this.settings.theme; + var themePrefix = this.classPrefix + "theme-"; + + editor.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme); + + this.settings.theme = theme; + + return this; + }, + + /** + * 设置 CodeMirror(编辑区)的主题 + * Setting CodeMirror (Editor area) theme + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setEditorTheme : function(theme) { + var settings = this.settings; + settings.editorTheme = theme; + + if (theme !== "default") + { + editormd.loadCSS(settings.path + "codemirror/theme/" + settings.editorTheme); + } + + this.cm.setOption("theme", theme); + + return this; + }, + + /** + * setEditorTheme() 的别名 + * setEditorTheme() alias + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setCodeMirrorTheme : function (theme) { + this.setEditorTheme(theme); + + return this; + }, + + /** + * 设置 Editor.md 的主题 + * Setting Editor.md theme + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setPreviewTheme : function(theme) { + var preview = this.preview; + var oldTheme = this.settings.previewTheme; + var themePrefix = this.classPrefix + "preview-theme-"; + + preview.removeClass(themePrefix + oldTheme).addClass(themePrefix + theme); + + this.settings.previewTheme = theme; + + return this; + }, + + /** + * 配置和初始化CodeMirror组件 + * CodeMirror initialization + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setCodeMirror : function() { + var settings = this.settings; + var editor = this.editor; + + if (settings.editorTheme !== "default") + { + editormd.loadCSS(settings.path + "codemirror/theme/" + settings.editorTheme); + } + + var codeMirrorConfig = { + mode : settings.mode, + theme : settings.editorTheme, + tabSize : settings.tabSize, + dragDrop : false, + autofocus : settings.autoFocus, + autoCloseTags : settings.autoCloseTags, + readOnly : (settings.readOnly) ? "nocursor" : false, + indentUnit : settings.indentUnit, + lineNumbers : settings.lineNumbers, + lineWrapping : settings.lineWrapping, + extraKeys : { + "Ctrl-Q": function(cm) { + cm.foldCode(cm.getCursor()); + } + }, + foldGutter : settings.codeFold, + gutters : ["CodeMirror-linenumbers", "CodeMirror-foldgutter"], + matchBrackets : settings.matchBrackets, + indentWithTabs : settings.indentWithTabs, + styleActiveLine : settings.styleActiveLine, + styleSelectedText : settings.styleSelectedText, + autoCloseBrackets : settings.autoCloseBrackets, + showTrailingSpace : settings.showTrailingSpace, + highlightSelectionMatches : ( (!settings.matchWordHighlight) ? false : { showToken: (settings.matchWordHighlight === "onselected") ? false : /\w/ } ) + }; + + this.codeEditor = this.cm = editormd.$CodeMirror.fromTextArea(this.markdownTextarea[0], codeMirrorConfig); + this.codeMirror = this.cmElement = editor.children(".CodeMirror"); + + if (settings.value !== "") + { + this.cm.setValue(settings.value); + } + + this.codeMirror.css({ + fontSize : settings.fontSize, + width : (!settings.watch) ? "100%" : "50%" + }); + + if (settings.autoHeight) + { + this.codeMirror.css("height", "auto"); + this.cm.setOption("viewportMargin", Infinity); + } + + if (!settings.lineNumbers) + { + this.codeMirror.find(".CodeMirror-gutters").css("border-right", "none"); + } + + return this; + }, + + /** + * 获取CodeMirror的配置选项 + * Get CodeMirror setting options + * + * @returns {Mixed} return CodeMirror setting option value + */ + + getCodeMirrorOption : function(key) { + return this.cm.getOption(key); + }, + + /** + * 配置和重配置CodeMirror的选项 + * CodeMirror setting options / resettings + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setCodeMirrorOption : function(key, value) { + + this.cm.setOption(key, value); + + return this; + }, + + /** + * 添加 CodeMirror 键盘快捷键 + * Add CodeMirror keyboard shortcuts key map + * + * @returns {editormd} 返回editormd的实例对象 + */ + + addKeyMap : function(map, bottom) { + this.cm.addKeyMap(map, bottom); + + return this; + }, + + /** + * 移除 CodeMirror 键盘快捷键 + * Remove CodeMirror keyboard shortcuts key map + * + * @returns {editormd} 返回editormd的实例对象 + */ + + removeKeyMap : function(map) { + this.cm.removeKeyMap(map); + + return this; + }, + + /** + * 跳转到指定的行 + * Goto CodeMirror line + * + * @param {String|Intiger} line line number or "first"|"last" + * @returns {editormd} 返回editormd的实例对象 + */ + + gotoLine : function (line) { + + var settings = this.settings; + + if (!settings.gotoLine) + { + return this; + } + + var cm = this.cm; + var editor = this.editor; + var count = cm.lineCount(); + var preview = this.preview; + + if (typeof line === "string") + { + if(line === "last") + { + line = count; + } + + if (line === "first") + { + line = 1; + } + } + + if (typeof line !== "number") + { + alert("Error: The line number must be an integer."); + return this; + } + + line = parseInt(line) - 1; + + if (line > count) + { + alert("Error: The line number range 1-" + count); + + return this; + } + + cm.setCursor( {line : line, ch : 0} ); + + var scrollInfo = cm.getScrollInfo(); + var clientHeight = scrollInfo.clientHeight; + var coords = cm.charCoords({line : line, ch : 0}, "local"); + + cm.scrollTo(null, (coords.top + coords.bottom - clientHeight) / 2); + + if (settings.watch) + { + var cmScroll = this.codeMirror.find(".CodeMirror-scroll")[0]; + var height = $(cmScroll).height(); + var scrollTop = cmScroll.scrollTop; + var percent = (scrollTop / cmScroll.scrollHeight); + + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= cmScroll.scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop(preview[0].scrollHeight * percent); + } + } + + cm.focus(); + + return this; + }, + + /** + * 扩展当前实例对象,可同时设置多个或者只设置一个 + * Extend editormd instance object, can mutil setting. + * + * @returns {editormd} this(editormd instance object.) + */ + + extend : function() { + if (typeof arguments[1] !== "undefined") + { + if (typeof arguments[1] === "function") + { + arguments[1] = $.proxy(arguments[1], this); + } + + this[arguments[0]] = arguments[1]; + } + + if (typeof arguments[0] === "object" && typeof arguments[0].length === "undefined") + { + $.extend(true, this, arguments[0]); + } + + return this; + }, + + /** + * 设置或扩展当前实例对象,单个设置 + * Extend editormd instance object, one by one + * + * @param {String|Object} key option key + * @param {String|Object} value option value + * @returns {editormd} this(editormd instance object.) + */ + + set : function (key, value) { + + if (typeof value !== "undefined" && typeof value === "function") + { + value = $.proxy(value, this); + } + + this[key] = value; + + return this; + }, + + /** + * 重新配置 + * Resetting editor options + * + * @param {String|Object} key option key + * @param {String|Object} value option value + * @returns {editormd} this(editormd instance object.) + */ + + config : function(key, value) { + var settings = this.settings; + + if (typeof key === "object") + { + settings = $.extend(true, settings, key); + } + + if (typeof key === "string") + { + settings[key] = value; + } + + this.settings = settings; + this.recreate(); + + return this; + }, + + /** + * 注册事件处理方法 + * Bind editor event handle + * + * @param {String} eventType event type + * @param {Function} callback 回调函数 + * @returns {editormd} this(editormd instance object.) + */ + + on : function(eventType, callback) { + var settings = this.settings; + + if (typeof settings["on" + eventType] !== "undefined") + { + settings["on" + eventType] = $.proxy(callback, this); + } + + return this; + }, + + /** + * 解除事件处理方法 + * Unbind editor event handle + * + * @param {String} eventType event type + * @returns {editormd} this(editormd instance object.) + */ + + off : function(eventType) { + var settings = this.settings; + + if (typeof settings["on" + eventType] !== "undefined") + { + settings["on" + eventType] = function(){}; + } + + return this; + }, + + /** + * 显示工具栏 + * Display toolbar + * + * @param {Function} [callback=function(){}] 回调函数 + * @returns {editormd} 返回editormd的实例对象 + */ + + showToolbar : function(callback) { + var settings = this.settings; + + if(settings.readOnly) { + return this; + } + + if (settings.toolbar && (this.toolbar.length < 1 || this.toolbar.find("." + this.classPrefix + "menu").html() === "") ) + { + this.setToolbar(); + } + + settings.toolbar = true; + + this.toolbar.show(); + this.resize(); + + $.proxy(callback || function(){}, this)(); + + return this; + }, + + /** + * 隐藏工具栏 + * Hide toolbar + * + * @param {Function} [callback=function(){}] 回调函数 + * @returns {editormd} this(editormd instance object.) + */ + + hideToolbar : function(callback) { + var settings = this.settings; + + settings.toolbar = false; + this.toolbar.hide(); + this.resize(); + + $.proxy(callback || function(){}, this)(); + + return this; + }, + + /** + * 页面滚动时工具栏的固定定位 + * Set toolbar in window scroll auto fixed position + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setToolbarAutoFixed : function(fixed) { + + var state = this.state; + var editor = this.editor; + var toolbar = this.toolbar; + var settings = this.settings; + + if (typeof fixed !== "undefined") + { + settings.toolbarAutoFixed = fixed; + } + + var autoFixedHandle = function(){ + var $window = $(window); + var top = $window.scrollTop(); + + if (!settings.toolbarAutoFixed) + { + return false; + } + + if (top - editor.offset().top > 10 && top < editor.height()) + { + toolbar.css({ + position : "fixed", + width : editor.width() + "px", + left : ($window.width() - editor.width()) / 2 + "px" + }); + } + else + { + toolbar.css({ + position : "absolute", + width : "100%", + left : 0 + }); + } + }; + + if (!state.fullscreen && !state.preview && settings.toolbar && settings.toolbarAutoFixed) + { + $(window).bind("scroll", autoFixedHandle); + } + + return this; + }, + + /** + * 配置和初始化工具栏 + * Set toolbar and Initialization + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setToolbar : function() { + var settings = this.settings; + + if(settings.readOnly) { + return this; + } + + var editor = this.editor; + var preview = this.preview; + var classPrefix = this.classPrefix; + + var toolbar = this.toolbar = editor.children("." + classPrefix + "toolbar"); + + if (settings.toolbar && toolbar.length < 1) + { + var toolbarHTML = "
                      "; + + editor.append(toolbarHTML); + toolbar = this.toolbar = editor.children("." + classPrefix + "toolbar"); + } + + if (!settings.toolbar) + { + toolbar.hide(); + + return this; + } + + toolbar.show(); + + var icons = (typeof settings.toolbarIcons === "function") ? settings.toolbarIcons() + : ((typeof settings.toolbarIcons === "string") ? editormd.toolbarModes[settings.toolbarIcons] : settings.toolbarIcons); + + var toolbarMenu = toolbar.find("." + this.classPrefix + "menu"), menu = ""; + var pullRight = false; + + for (var i = 0, len = icons.length; i < len; i++) + { + var name = icons[i]; + + if (name === "||") + { + pullRight = true; + } + else if (name === "|") + { + menu += "
                    • |
                    • "; + } + else + { + var isHeader = (/h(\d)/.test(name)); + var index = name; + + if (name === "watch" && !settings.watch) { + index = "unwatch"; + } + + var title = settings.lang.toolbar[index]; + var iconTexts = settings.toolbarIconTexts[index]; + var iconClass = settings.toolbarIconsClass[index]; + + title = (typeof title === "undefined") ? "" : title; + iconTexts = (typeof iconTexts === "undefined") ? "" : iconTexts; + iconClass = (typeof iconClass === "undefined") ? "" : iconClass; + + var menuItem = pullRight ? "
                    • " : "
                    • "; + + if (typeof settings.toolbarCustomIcons[name] !== "undefined" && typeof settings.toolbarCustomIcons[name] !== "function") + { + menuItem += settings.toolbarCustomIcons[name]; + } + else + { + menuItem += ""; + menuItem += ""+((isHeader) ? name.toUpperCase() : ( (iconClass === "") ? iconTexts : "") ) + ""; + menuItem += ""; + } + + menuItem += "
                    • "; + + menu = pullRight ? menuItem + menu : menu + menuItem; + } + } + + toolbarMenu.html(menu); + + toolbarMenu.find("[title=\"Lowercase\"]").attr("title", settings.lang.toolbar.lowercase); + toolbarMenu.find("[title=\"ucwords\"]").attr("title", settings.lang.toolbar.ucwords); + + this.setToolbarHandler(); + this.setToolbarAutoFixed(); + + return this; + }, + + /** + * 工具栏图标事件处理对象序列 + * Get toolbar icons event handlers + * + * @param {Object} cm CodeMirror的实例对象 + * @param {String} name 要获取的事件处理器名称 + * @returns {Object} 返回处理对象序列 + */ + + dialogLockScreen : function() { + $.proxy(editormd.dialogLockScreen, this)(); + + return this; + }, + + dialogShowMask : function(dialog) { + $.proxy(editormd.dialogShowMask, this)(dialog); + + return this; + }, + + getToolbarHandles : function(name) { + var toolbarHandlers = this.toolbarHandlers = editormd.toolbarHandlers; + + return (name && typeof toolbarIconHandlers[name] !== "undefined") ? toolbarHandlers[name] : toolbarHandlers; + }, + + /** + * 工具栏图标事件处理器 + * Bind toolbar icons event handle + * + * @returns {editormd} 返回editormd的实例对象 + */ + + setToolbarHandler : function() { + var _this = this; + var settings = this.settings; + + if (!settings.toolbar || settings.readOnly) { + return this; + } + + var toolbar = this.toolbar; + var cm = this.cm; + var classPrefix = this.classPrefix; + var toolbarIcons = this.toolbarIcons = toolbar.find("." + classPrefix + "menu > li > a"); + var toolbarIconHandlers = this.getToolbarHandles(); + + toolbarIcons.bind(editormd.mouseOrTouch("click", "touchend"), function(event) { + + var icon = $(this).children(".fa"); + var name = icon.attr("name"); + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (name === "") { + return ; + } + + _this.activeIcon = icon; + + if (typeof toolbarIconHandlers[name] !== "undefined") + { + $.proxy(toolbarIconHandlers[name], _this)(cm); + } + else + { + if (typeof settings.toolbarHandlers[name] !== "undefined") + { + $.proxy(settings.toolbarHandlers[name], _this)(cm, icon, cursor, selection); + } + } + + if (name !== "link" && name !== "reference-link" && name !== "image" && name !== "code-block" && + name !== "preformatted-text" && name !== "watch" && name !== "preview" && name !== "search" && name !== "fullscreen" && name !== "info") + { + cm.focus(); + } + + return false; + + }); + + return this; + }, + + /** + * 动态创建对话框 + * Creating custom dialogs + * + * @param {Object} options 配置项键值对 Key/Value + * @returns {dialog} 返回创建的dialog的jQuery实例对象 + */ + + createDialog : function(options) { + return $.proxy(editormd.createDialog, this)(options); + }, + + /** + * 创建关于Editor.md的对话框 + * Create about Editor.md dialog + * + * @returns {editormd} 返回editormd的实例对象 + */ + + createInfoDialog : function() { + var _this = this; + var editor = this.editor; + var classPrefix = this.classPrefix; + + var infoDialogHTML = [ + "
                      ", + "
                      ", + "

                      " + editormd.title + "v" + editormd.version + "

                      ", + "

                      " + this.lang.description + "

                      ", + "

                      " + editormd.homePage + "

                      ", + "

                      Copyright © 2015 Pandao, The MIT License.

                      ", + "
                      ", + "", + "
                      " + ].join("\n"); + + editor.append(infoDialogHTML); + + var infoDialog = this.infoDialog = editor.children("." + classPrefix + "dialog-info"); + + infoDialog.find("." + classPrefix + "dialog-close").bind(editormd.mouseOrTouch("click", "touchend"), function() { + _this.hideInfoDialog(); + }); + + infoDialog.css("border", (editormd.isIE8) ? "1px solid #ddd" : "").css("z-index", editormd.dialogZindex).show(); + + this.infoDialogPosition(); + + return this; + }, + + /** + * 关于Editor.md对话居中定位 + * Editor.md dialog position handle + * + * @returns {editormd} 返回editormd的实例对象 + */ + + infoDialogPosition : function() { + var infoDialog = this.infoDialog; + + var _infoDialogPosition = function() { + infoDialog.css({ + top : ($(window).height() - infoDialog.height()) / 2 + "px", + left : ($(window).width() - infoDialog.width()) / 2 + "px" + }); + }; + + _infoDialogPosition(); + + $(window).resize(_infoDialogPosition); + + return this; + }, + + /** + * 显示关于Editor.md + * Display about Editor.md dialog + * + * @returns {editormd} 返回editormd的实例对象 + */ + + showInfoDialog : function() { + + $("html,body").css("overflow-x", "hidden"); + + var _this = this; + var editor = this.editor; + var settings = this.settings; + var infoDialog = this.infoDialog = editor.children("." + this.classPrefix + "dialog-info"); + + if (infoDialog.length < 1) + { + this.createInfoDialog(); + } + + this.lockScreen(true); + + this.mask.css({ + opacity : settings.dialogMaskOpacity, + backgroundColor : settings.dialogMaskBgColor + }).show(); + + infoDialog.css("z-index", editormd.dialogZindex).show(); + + this.infoDialogPosition(); + + return this; + }, + + /** + * 隐藏关于Editor.md + * Hide about Editor.md dialog + * + * @returns {editormd} 返回editormd的实例对象 + */ + + hideInfoDialog : function() { + $("html,body").css("overflow-x", ""); + this.infoDialog.hide(); + this.mask.hide(); + this.lockScreen(false); + + return this; + }, + + /** + * 锁屏 + * lock screen + * + * @param {Boolean} lock Boolean 布尔值,是否锁屏 + * @returns {editormd} 返回editormd的实例对象 + */ + + lockScreen : function(lock) { + editormd.lockScreen(lock); + this.resize(); + + return this; + }, + + /** + * 编辑器界面重建,用于动态语言包或模块加载等 + * Recreate editor + * + * @returns {editormd} 返回editormd的实例对象 + */ + + recreate : function() { + var _this = this; + var editor = this.editor; + var settings = this.settings; + + this.codeMirror.remove(); + + this.setCodeMirror(); + + if (!settings.readOnly) + { + if (editor.find(".editormd-dialog").length > 0) { + editor.find(".editormd-dialog").remove(); + } + + if (settings.toolbar) + { + this.getToolbarHandles(); + this.setToolbar(); + } + } + + this.loadedDisplay(true); + + return this; + }, + + /** + * 高亮预览HTML的pre代码部分 + * highlight of preview codes + * + * @returns {editormd} 返回editormd的实例对象 + */ + + previewCodeHighlight : function() { + var settings = this.settings; + var previewContainer = this.previewContainer; + + if (settings.previewCodeHighlight) + { + previewContainer.find("pre").addClass("prettyprint linenums"); + + if (typeof prettyPrint !== "undefined") + { + prettyPrint(); + } + } + + return this; + }, + + /** + * 解析TeX(KaTeX)科学公式 + * TeX(KaTeX) Renderer + * + * @returns {editormd} 返回editormd的实例对象 + */ + + katexRender : function() { + + if (timer === null) + { + return this; + } + + this.previewContainer.find("." + editormd.classNames.tex).each(function(){ + var tex = $(this); + editormd.$katex.render(tex.text(), tex[0]); + + tex.find(".katex").css("font-size", "1.6em"); + }); + + return this; + }, + + /** + * 解析和渲染流程图及时序图 + * FlowChart and SequenceDiagram Renderer + * + * @returns {editormd} 返回editormd的实例对象 + */ + + flowChartAndSequenceDiagramRender : function() { + var $this = this; + var settings = this.settings; + var previewContainer = this.previewContainer; + + if (editormd.isIE8) { + return this; + } + + if (settings.flowChart) { + if (flowchartTimer === null) { + return this; + } + + previewContainer.find(".flowchart").flowChart(); + } + + if (settings.sequenceDiagram) { + previewContainer.find(".sequence-diagram").sequenceDiagram({theme: "simple"}); + } + + var preview = $this.preview; + var codeMirror = $this.codeMirror; + var codeView = codeMirror.find(".CodeMirror-scroll"); + + var height = codeView.height(); + var scrollTop = codeView.scrollTop(); + var percent = (scrollTop / codeView[0].scrollHeight); + var tocHeight = 0; + + preview.find(".markdown-toc-list").each(function(){ + tocHeight += $(this).height(); + }); + + var tocMenuHeight = preview.find(".editormd-toc-menu").height(); + tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; + + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= codeView[0].scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); + } + + return this; + }, + + /** + * 注册键盘快捷键处理 + * Register CodeMirror keyMaps (keyboard shortcuts). + * + * @param {Object} keyMap KeyMap key/value {"(Ctrl/Shift/Alt)-Key" : function(){}} + * @returns {editormd} return this + */ + + registerKeyMaps : function(keyMap) { + + var _this = this; + var cm = this.cm; + var settings = this.settings; + var toolbarHandlers = editormd.toolbarHandlers; + var disabledKeyMaps = settings.disabledKeyMaps; + + keyMap = keyMap || null; + + if (keyMap) + { + for (var i in keyMap) + { + if ($.inArray(i, disabledKeyMaps) < 0) + { + var map = {}; + map[i] = keyMap[i]; + + cm.addKeyMap(keyMap); + } + } + } + else + { + for (var k in editormd.keyMaps) + { + var _keyMap = editormd.keyMaps[k]; + var handle = (typeof _keyMap === "string") ? $.proxy(toolbarHandlers[_keyMap], _this) : $.proxy(_keyMap, _this); + + if ($.inArray(k, ["F9", "F10", "F11"]) < 0 && $.inArray(k, disabledKeyMaps) < 0) + { + var _map = {}; + _map[k] = handle; + + cm.addKeyMap(_map); + } + } + + $(window).keydown(function(event) { + + var keymaps = { + "120" : "F9", + "121" : "F10", + "122" : "F11" + }; + + if ( $.inArray(keymaps[event.keyCode], disabledKeyMaps) < 0 ) + { + switch (event.keyCode) + { + case 120: + $.proxy(toolbarHandlers["watch"], _this)(); + return false; + break; + + case 121: + $.proxy(toolbarHandlers["preview"], _this)(); + return false; + break; + + case 122: + $.proxy(toolbarHandlers["fullscreen"], _this)(); + return false; + break; + + default: + break; + } + } + }); + } + + return this; + }, + + /** + * 绑定同步滚动 + * + * @returns {editormd} return this + */ + + bindScrollEvent : function() { + + var _this = this; + var preview = this.preview; + var settings = this.settings; + var codeMirror = this.codeMirror; + var mouseOrTouch = editormd.mouseOrTouch; + + if (!settings.syncScrolling) { + return this; + } + + var cmBindScroll = function() { + codeMirror.find(".CodeMirror-scroll").bind(mouseOrTouch("scroll", "touchmove"), function(event) { + var height = $(this).height(); + var scrollTop = $(this).scrollTop(); + var percent = (scrollTop / $(this)[0].scrollHeight); + + var tocHeight = 0; + + preview.find(".markdown-toc-list").each(function(){ + tocHeight += $(this).height(); + }); + + var tocMenuHeight = preview.find(".editormd-toc-menu").height(); + tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight; + + if (scrollTop === 0) + { + preview.scrollTop(0); + } + else if (scrollTop + height >= $(this)[0].scrollHeight - 16) + { + preview.scrollTop(preview[0].scrollHeight); + } + else + { + preview.scrollTop((preview[0].scrollHeight + tocHeight + tocMenuHeight) * percent); + } + + $.proxy(settings.onscroll, _this)(event); + }); + }; + + var cmUnbindScroll = function() { + codeMirror.find(".CodeMirror-scroll").unbind(mouseOrTouch("scroll", "touchmove")); + }; + + var previewBindScroll = function() { + + preview.bind(mouseOrTouch("scroll", "touchmove"), function(event) { + var height = $(this).height(); + var scrollTop = $(this).scrollTop(); + var percent = (scrollTop / $(this)[0].scrollHeight); + var codeView = codeMirror.find(".CodeMirror-scroll"); + + if(scrollTop === 0) + { + codeView.scrollTop(0); + } + else if (scrollTop + height >= $(this)[0].scrollHeight) + { + codeView.scrollTop(codeView[0].scrollHeight); + } + else + { + codeView.scrollTop(codeView[0].scrollHeight * percent); + } + + $.proxy(settings.onpreviewscroll, _this)(event); + }); + + }; + + var previewUnbindScroll = function() { + preview.unbind(mouseOrTouch("scroll", "touchmove")); + }; + + codeMirror.bind({ + mouseover : cmBindScroll, + mouseout : cmUnbindScroll, + touchstart : cmBindScroll, + touchend : cmUnbindScroll + }); + + if (settings.syncScrolling === "single") { + return this; + } + + preview.bind({ + mouseover : previewBindScroll, + mouseout : previewUnbindScroll, + touchstart : previewBindScroll, + touchend : previewUnbindScroll + }); + + return this; + }, + + bindChangeEvent : function() { + + var _this = this; + var cm = this.cm; + var settings = this.settings; + + if (!settings.syncScrolling) { + return this; + } + + cm.on("change", function(_cm, changeObj) { + + if (settings.watch) + { + _this.previewContainer.css("padding", settings.autoHeight ? "20px 20px 50px 40px" : "20px"); + } + + timer = setTimeout(function() { + clearTimeout(timer); + _this.save(); + timer = null; + }, settings.delay); + }); + + return this; + }, + + /** + * 加载队列完成之后的显示处理 + * Display handle of the module queues loaded after. + * + * @param {Boolean} recreate 是否为重建编辑器 + * @returns {editormd} 返回editormd的实例对象 + */ + + loadedDisplay : function(recreate) { + + recreate = recreate || false; + + var _this = this; + var editor = this.editor; + var preview = this.preview; + var settings = this.settings; + + this.containerMask.hide(); + + this.save(); + + if (settings.watch) { + preview.show(); + } + + editor.data("oldWidth", editor.width()).data("oldHeight", editor.height()); // 为了兼容Zepto + + this.resize(); + this.registerKeyMaps(); + + $(window).resize(function(){ + _this.resize(); + }); + + this.bindScrollEvent().bindChangeEvent(); + + if (!recreate) + { + $.proxy(settings.onload, this)(); + } + + this.state.loaded = true; + + return this; + }, + + /** + * 设置编辑器的宽度 + * Set editor width + * + * @param {Number|String} width 编辑器宽度值 + * @returns {editormd} 返回editormd的实例对象 + */ + + width : function(width) { + + this.editor.css("width", (typeof width === "number") ? width + "px" : width); + this.resize(); + + return this; + }, + + /** + * 设置编辑器的高度 + * Set editor height + * + * @param {Number|String} height 编辑器高度值 + * @returns {editormd} 返回editormd的实例对象 + */ + + height : function(height) { + + this.editor.css("height", (typeof height === "number") ? height + "px" : height); + this.resize(); + + return this; + }, + + /** + * 调整编辑器的尺寸和布局 + * Resize editor layout + * + * @param {Number|String} [width=null] 编辑器宽度值 + * @param {Number|String} [height=null] 编辑器高度值 + * @returns {editormd} 返回editormd的实例对象 + */ + + resize : function(width, height) { + + width = width || null; + height = height || null; + + var state = this.state; + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var codeMirror = this.codeMirror; + + if (width) + { + editor.css("width", (typeof width === "number") ? width + "px" : width); + } + + if (settings.autoHeight && !state.fullscreen && !state.preview) + { + editor.css("height", "auto"); + codeMirror.css("height", "auto"); + } + else + { + if (height) + { + editor.css("height", (typeof height === "number") ? height + "px" : height); + } + + if (state.fullscreen) + { + editor.height($(window).height()); + } + + if (settings.toolbar && !settings.readOnly) + { + codeMirror.css("margin-top", toolbar.height() + 1).height(editor.height() - toolbar.height()); + } + else + { + codeMirror.css("margin-top", 0).height(editor.height()); + } + } + + if(settings.watch) + { + codeMirror.width(editor.width() / 2); + preview.width((!state.preview) ? editor.width() / 2 : editor.width()); + + this.previewContainer.css("padding", settings.autoHeight ? "20px 20px 50px 40px" : "20px"); + + if (settings.toolbar && !settings.readOnly) + { + preview.css("top", toolbar.height() + 1); + } + else + { + preview.css("top", 0); + } + + if (settings.autoHeight && !state.fullscreen && !state.preview) + { + preview.height(""); + } + else + { + var previewHeight = (settings.toolbar && !settings.readOnly) ? editor.height() - toolbar.height() : editor.height(); + + preview.height(previewHeight); + } + } + else + { + codeMirror.width(editor.width()); + preview.hide(); + } + + if (state.loaded) + { + $.proxy(settings.onresize, this)(); + } + + return this; + }, + + /** + * 解析和保存Markdown代码 + * Parse & Saving Markdown source code + * + * @returns {editormd} 返回editormd的实例对象 + */ + + save : function() { + + if (timer === null) + { + return this; + } + + var _this = this; + var state = this.state; + var settings = this.settings; + var cm = this.cm; + var cmValue = cm.getValue(); + var previewContainer = this.previewContainer; + + if (settings.mode !== "gfm" && settings.mode !== "markdown") + { + this.markdownTextarea.val(cmValue); + + return this; + } + + var marked = editormd.$marked; + var markdownToC = this.markdownToC = []; + var rendererOptions = this.markedRendererOptions = { + toc : settings.toc, + tocm : settings.tocm, + tocStartLevel : settings.tocStartLevel, + pageBreak : settings.pageBreak, + taskList : settings.taskList, + emoji : settings.emoji, + tex : settings.tex, + atLink : settings.atLink, // for @link + emailLink : settings.emailLink, // for mail address auto link + flowChart : settings.flowChart, + sequenceDiagram : settings.sequenceDiagram, + previewCodeHighlight : settings.previewCodeHighlight, + }; + + var markedOptions = this.markedOptions = { + renderer : editormd.markedRenderer(markdownToC, rendererOptions), + gfm : true, + tables : true, + breaks : true, + pedantic : false, + sanitize : (settings.htmlDecode) ? false : true, // 关闭忽略HTML标签,即开启识别HTML标签,默认为false + smartLists : true, + smartypants : true + }; + + marked.setOptions(markedOptions); + + var newMarkdownDoc = editormd.$marked(cmValue, markedOptions); + + //console.info("cmValue", cmValue, newMarkdownDoc); + + newMarkdownDoc = editormd.filterHTMLTags(newMarkdownDoc, settings.htmlDecode); + + //console.error("cmValue", cmValue, newMarkdownDoc); + + this.markdownTextarea.text(cmValue); + + cm.save(); + + if (settings.saveHTMLToTextarea) + { + this.htmlTextarea.text(newMarkdownDoc); + } + + if(settings.watch || (!settings.watch && state.preview)) + { + previewContainer.html(newMarkdownDoc); + + this.previewCodeHighlight(); + + if (settings.toc) + { + var tocContainer = (settings.tocContainer === "") ? previewContainer : $(settings.tocContainer); + var tocMenu = tocContainer.find("." + this.classPrefix + "toc-menu"); + + tocContainer.attr("previewContainer", (settings.tocContainer === "") ? "true" : "false"); + + if (settings.tocContainer !== "" && tocMenu.length > 0) + { + tocMenu.remove(); + } + + editormd.markdownToCRenderer(markdownToC, tocContainer, settings.tocDropdown, settings.tocStartLevel); + + if (settings.tocDropdown || tocContainer.find("." + this.classPrefix + "toc-menu").length > 0) + { + editormd.tocDropdownMenu(tocContainer, (settings.tocTitle !== "") ? settings.tocTitle : this.lang.tocTitle); + } + + if (settings.tocContainer !== "") + { + previewContainer.find(".markdown-toc").css("border", "none"); + } + } + + if (settings.tex) + { + if (!editormd.kaTeXLoaded && settings.autoLoadModules) + { + editormd.loadKaTeX(function() { + editormd.$katex = katex; + editormd.kaTeXLoaded = true; + _this.katexRender(); + }); + } + else + { + editormd.$katex = katex; + this.katexRender(); + } + } + + if (settings.flowChart || settings.sequenceDiagram) + { + flowchartTimer = setTimeout(function(){ + clearTimeout(flowchartTimer); + _this.flowChartAndSequenceDiagramRender(); + flowchartTimer = null; + }, 10); + } + + if (state.loaded) + { + $.proxy(settings.onchange, this)(); + } + } + + return this; + }, + + /** + * 聚焦光标位置 + * Focusing the cursor position + * + * @returns {editormd} 返回editormd的实例对象 + */ + + focus : function() { + this.cm.focus(); + + return this; + }, + + /** + * 设置光标的位置 + * Set cursor position + * + * @param {Object} cursor 要设置的光标位置键值对象,例:{line:1, ch:0} + * @returns {editormd} 返回editormd的实例对象 + */ + + setCursor : function(cursor) { + this.cm.setCursor(cursor); + + return this; + }, + + /** + * 获取当前光标的位置 + * Get the current position of the cursor + * + * @returns {Cursor} 返回一个光标Cursor对象 + */ + + getCursor : function() { + return this.cm.getCursor(); + }, + + /** + * 设置光标选中的范围 + * Set cursor selected ranges + * + * @param {Object} from 开始位置的光标键值对象,例:{line:1, ch:0} + * @param {Object} to 结束位置的光标键值对象,例:{line:1, ch:0} + * @returns {editormd} 返回editormd的实例对象 + */ + + setSelection : function(from, to) { + + this.cm.setSelection(from, to); + + return this; + }, + + /** + * 获取光标选中的文本 + * Get the texts from cursor selected + * + * @returns {String} 返回选中文本的字符串形式 + */ + + getSelection : function() { + return this.cm.getSelection(); + }, + + /** + * 设置光标选中的文本范围 + * Set the cursor selection ranges + * + * @param {Array} ranges cursor selection ranges array + * @returns {Array} return this + */ + + setSelections : function(ranges) { + this.cm.setSelections(ranges); + + return this; + }, + + /** + * 获取光标选中的文本范围 + * Get the cursor selection ranges + * + * @returns {Array} return selection ranges array + */ + + getSelections : function() { + return this.cm.getSelections(); + }, + + /** + * 替换当前光标选中的文本或在当前光标处插入新字符 + * Replace the text at the current cursor selected or insert a new character at the current cursor position + * + * @param {String} value 要插入的字符值 + * @returns {editormd} 返回editormd的实例对象 + */ + + replaceSelection : function(value) { + this.cm.replaceSelection(value); + + return this; + }, + + /** + * 在当前光标处插入新字符 + * Insert a new character at the current cursor position + * + * 同replaceSelection()方法 + * With the replaceSelection() method + * + * @param {String} value 要插入的字符值 + * @returns {editormd} 返回editormd的实例对象 + */ + + insertValue : function(value) { + this.replaceSelection(value); + + return this; + }, + + /** + * 追加markdown + * append Markdown to editor + * + * @param {String} md 要追加的markdown源文档 + * @returns {editormd} 返回editormd的实例对象 + */ + + appendMarkdown : function(md) { + var settings = this.settings; + var cm = this.cm; + + cm.setValue(cm.getValue() + md); + + return this; + }, + + /** + * 设置和传入编辑器的markdown源文档 + * Set Markdown source document + * + * @param {String} md 要传入的markdown源文档 + * @returns {editormd} 返回editormd的实例对象 + */ + + setMarkdown : function(md) { + this.cm.setValue(md || this.settings.markdown); + + return this; + }, + + /** + * 获取编辑器的markdown源文档 + * Set Editor.md markdown/CodeMirror value + * + * @returns {editormd} 返回editormd的实例对象 + */ + + getMarkdown : function() { + return this.cm.getValue(); + }, + + /** + * 获取编辑器的源文档 + * Get CodeMirror value + * + * @returns {editormd} 返回editormd的实例对象 + */ + + getValue : function() { + return this.cm.getValue(); + }, + + /** + * 设置编辑器的源文档 + * Set CodeMirror value + * + * @param {String} value set code/value/string/text + * @returns {editormd} 返回editormd的实例对象 + */ + + setValue : function(value) { + this.cm.setValue(value); + + return this; + }, + + /** + * 清空编辑器 + * Empty CodeMirror editor container + * + * @returns {editormd} 返回editormd的实例对象 + */ + + clear : function() { + this.cm.setValue(""); + + return this; + }, + + /** + * 获取解析后存放在Textarea的HTML源码 + * Get parsed html code from Textarea + * + * @returns {String} 返回HTML源码 + */ + + getHTML : function() { + if (!this.settings.saveHTMLToTextarea) + { + alert("Error: settings.saveHTMLToTextarea == false"); + + return false; + } + + return this.htmlTextarea.val(); + }, + + /** + * getHTML()的别名 + * getHTML (alias) + * + * @returns {String} Return html code 返回HTML源码 + */ + + getTextareaSavedHTML : function() { + return this.getHTML(); + }, + + /** + * 获取预览窗口的HTML源码 + * Get html from preview container + * + * @returns {editormd} 返回editormd的实例对象 + */ + + getPreviewedHTML : function() { + if (!this.settings.watch) + { + alert("Error: settings.watch == false"); + + return false; + } + + return this.previewContainer.html(); + }, + + /** + * 开启实时预览 + * Enable real-time watching + * + * @returns {editormd} 返回editormd的实例对象 + */ + + watch : function(callback) { + var settings = this.settings; + + if ($.inArray(settings.mode, ["gfm", "markdown"]) < 0) + { + return this; + } + + this.state.watching = settings.watch = true; + this.preview.show(); + + if (this.toolbar) + { + var watchIcon = settings.toolbarIconsClass.watch; + var unWatchIcon = settings.toolbarIconsClass.unwatch; + + var icon = this.toolbar.find(".fa[name=watch]"); + icon.parent().attr("title", settings.lang.toolbar.watch); + icon.removeClass(unWatchIcon).addClass(watchIcon); + } + + this.codeMirror.css("border-right", "1px solid #ddd").width(this.editor.width() / 2); + + timer = 0; + + this.save().resize(); + + if (!settings.onwatch) + { + settings.onwatch = callback || function() {}; + } + + $.proxy(settings.onwatch, this)(); + + return this; + }, + + /** + * 关闭实时预览 + * Disable real-time watching + * + * @returns {editormd} 返回editormd的实例对象 + */ + + unwatch : function(callback) { + var settings = this.settings; + this.state.watching = settings.watch = false; + this.preview.hide(); + + if (this.toolbar) + { + var watchIcon = settings.toolbarIconsClass.watch; + var unWatchIcon = settings.toolbarIconsClass.unwatch; + + var icon = this.toolbar.find(".fa[name=watch]"); + icon.parent().attr("title", settings.lang.toolbar.unwatch); + icon.removeClass(watchIcon).addClass(unWatchIcon); + } + + this.codeMirror.css("border-right", "none").width(this.editor.width()); + + this.resize(); + + if (!settings.onunwatch) + { + settings.onunwatch = callback || function() {}; + } + + $.proxy(settings.onunwatch, this)(); + + return this; + }, + + /** + * 显示编辑器 + * Show editor + * + * @param {Function} [callback=function()] 回调函数 + * @returns {editormd} 返回editormd的实例对象 + */ + + show : function(callback) { + callback = callback || function() {}; + + var _this = this; + this.editor.show(0, function() { + $.proxy(callback, _this)(); + }); + + return this; + }, + + /** + * 隐藏编辑器 + * Hide editor + * + * @param {Function} [callback=function()] 回调函数 + * @returns {editormd} 返回editormd的实例对象 + */ + + hide : function(callback) { + callback = callback || function() {}; + + var _this = this; + this.editor.hide(0, function() { + $.proxy(callback, _this)(); + }); + + return this; + }, + + /** + * 隐藏编辑器部分,只预览HTML + * Enter preview html state + * + * @returns {editormd} 返回editormd的实例对象 + */ + + previewing : function() { + + var _this = this; + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var codeMirror = this.codeMirror; + var previewContainer = this.previewContainer; + + if ($.inArray(settings.mode, ["gfm", "markdown"]) < 0) { + return this; + } + + if (settings.toolbar && toolbar) { + toolbar.toggle(); + toolbar.find(".fa[name=preview]").toggleClass("active"); + } + + codeMirror.toggle(); + + var escHandle = function(event) { + if (event.shiftKey && event.keyCode === 27) { + _this.previewed(); + } + }; + + if (codeMirror.css("display") === "none") // 为了兼容Zepto,而不使用codeMirror.is(":hidden") + { + this.state.preview = true; + + if (this.state.fullscreen) { + preview.css("background", "#fff"); + } + + editor.find("." + this.classPrefix + "preview-close-btn").show().bind(editormd.mouseOrTouch("click", "touchend"), function(){ + _this.previewed(); + }); + + if (!settings.watch) + { + this.save(); + } + else + { + previewContainer.css("padding", ""); + } + + previewContainer.addClass(this.classPrefix + "preview-active"); + + preview.show().css({ + position : "", + top : 0, + width : editor.width(), + height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() + }); + + if (this.state.loaded) + { + $.proxy(settings.onpreviewing, this)(); + } + + $(window).bind("keyup", escHandle); + } + else + { + $(window).unbind("keyup", escHandle); + this.previewed(); + } + }, + + /** + * 显示编辑器部分,退出只预览HTML + * Exit preview html state + * + * @returns {editormd} 返回editormd的实例对象 + */ + + previewed : function() { + + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var previewContainer = this.previewContainer; + var previewCloseBtn = editor.find("." + this.classPrefix + "preview-close-btn"); + + this.state.preview = false; + + this.codeMirror.show(); + + if (settings.toolbar) { + toolbar.show(); + } + + preview[(settings.watch) ? "show" : "hide"](); + + previewCloseBtn.hide().unbind(editormd.mouseOrTouch("click", "touchend")); + + previewContainer.removeClass(this.classPrefix + "preview-active"); + + if (settings.watch) + { + previewContainer.css("padding", "20px"); + } + + preview.css({ + background : null, + position : "absolute", + width : editor.width() / 2, + height : (settings.autoHeight && !this.state.fullscreen) ? "auto" : editor.height() - toolbar.height(), + top : (settings.toolbar) ? toolbar.height() : 0 + }); + + if (this.state.loaded) + { + $.proxy(settings.onpreviewed, this)(); + } + + return this; + }, + + /** + * 编辑器全屏显示 + * Fullscreen show + * + * @returns {editormd} 返回editormd的实例对象 + */ + + fullscreen : function() { + + var _this = this; + var state = this.state; + var editor = this.editor; + var preview = this.preview; + var toolbar = this.toolbar; + var settings = this.settings; + var fullscreenClass = this.classPrefix + "fullscreen"; + + if (toolbar) { + toolbar.find(".fa[name=fullscreen]").parent().toggleClass("active"); + } + + var escHandle = function(event) { + if (!event.shiftKey && event.keyCode === 27) + { + if (state.fullscreen) + { + _this.fullscreenExit(); + } + } + }; + + if (!editor.hasClass(fullscreenClass)) + { + state.fullscreen = true; + + $("html,body").css("overflow", "hidden"); + + editor.css({ + width : $(window).width(), + height : $(window).height() + }).addClass(fullscreenClass); + + this.resize(); + + $.proxy(settings.onfullscreen, this)(); + + $(window).bind("keyup", escHandle); + } + else + { + $(window).unbind("keyup", escHandle); + this.fullscreenExit(); + } + + return this; + }, + + /** + * 编辑器退出全屏显示 + * Exit fullscreen state + * + * @returns {editormd} 返回editormd的实例对象 + */ + + fullscreenExit : function() { + + var editor = this.editor; + var settings = this.settings; + var toolbar = this.toolbar; + var fullscreenClass = this.classPrefix + "fullscreen"; + + this.state.fullscreen = false; + + if (toolbar) { + toolbar.find(".fa[name=fullscreen]").parent().removeClass("active"); + } + + $("html,body").css("overflow", ""); + + editor.css({ + width : editor.data("oldWidth"), + height : editor.data("oldHeight") + }).removeClass(fullscreenClass); + + this.resize(); + + $.proxy(settings.onfullscreenExit, this)(); + + return this; + }, + + /** + * 加载并执行插件 + * Load and execute the plugin + * + * @param {String} name plugin name / function name + * @param {String} path plugin load path + * @returns {editormd} 返回editormd的实例对象 + */ + + executePlugin : function(name, path) { + + var _this = this; + var cm = this.cm; + var settings = this.settings; + + path = settings.pluginPath + path; + + if (typeof define === "function") + { + if (typeof this[name] === "undefined") + { + alert("Error: " + name + " plugin is not found, you are not load this plugin."); + + return this; + } + + this[name](cm); + + return this; + } + + if ($.inArray(path, editormd.loadFiles.plugin) < 0) + { + editormd.loadPlugin(path, function() { + editormd.loadPlugins[name] = _this[name]; + _this[name](cm); + }); + } + else + { + $.proxy(editormd.loadPlugins[name], this)(cm); + } + + return this; + }, + + /** + * 搜索替换 + * Search & replace + * + * @param {String} command CodeMirror serach commands, "find, fintNext, fintPrev, clearSearch, replace, replaceAll" + * @returns {editormd} return this + */ + + search : function(command) { + var settings = this.settings; + + if (!settings.searchReplace) + { + alert("Error: settings.searchReplace == false"); + return this; + } + + if (!settings.readOnly) + { + this.cm.execCommand(command || "find"); + } + + return this; + }, + + searchReplace : function() { + this.search("replace"); + + return this; + }, + + searchReplaceAll : function() { + this.search("replaceAll"); + + return this; + } + }; + + editormd.fn.init.prototype = editormd.fn; + + /** + * 锁屏 + * lock screen when dialog opening + * + * @returns {void} + */ + + editormd.dialogLockScreen = function() { + var settings = this.settings || {dialogLockScreen : true}; + + if (settings.dialogLockScreen) + { + $("html,body").css("overflow", "hidden"); + this.resize(); + } + }; + + /** + * 显示透明背景层 + * Display mask layer when dialog opening + * + * @param {Object} dialog dialog jQuery object + * @returns {void} + */ + + editormd.dialogShowMask = function(dialog) { + var editor = this.editor; + var settings = this.settings || {dialogShowMask : true}; + + dialog.css({ + top : ($(window).height() - dialog.height()) / 2 + "px", + left : ($(window).width() - dialog.width()) / 2 + "px" + }); + + if (settings.dialogShowMask) { + editor.children("." + this.classPrefix + "mask").css("z-index", parseInt(dialog.css("z-index")) - 1).show(); + } + }; + + editormd.toolbarHandlers = { + undo : function() { + this.cm.undo(); + }, + + redo : function() { + this.cm.redo(); + }, + + bold : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("**" + selection + "**"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 2); + } + }, + + del : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("~~" + selection + "~~"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 2); + } + }, + + italic : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("*" + selection + "*"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + + quote : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("> " + selection); + cm.setCursor(cursor.line, cursor.ch + 2); + } + else + { + cm.replaceSelection("> " + selection); + } + + //cm.replaceSelection("> " + selection); + //cm.setCursor(cursor.line, (selection === "") ? cursor.ch + 2 : cursor.ch + selection.length + 2); + }, + + ucfirst : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(editormd.firstUpperCase(selection)); + cm.setSelections(selections); + }, + + ucwords : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(editormd.wordsFirstUpperCase(selection)); + cm.setSelections(selections); + }, + + uppercase : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(selection.toUpperCase()); + cm.setSelections(selections); + }, + + lowercase : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + var selections = cm.listSelections(); + + cm.replaceSelection(selection.toLowerCase()); + cm.setSelections(selections); + }, + + h1 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("# " + selection); + cm.setCursor(cursor.line, cursor.ch + 2); + } + else + { + cm.replaceSelection("# " + selection); + } + }, + + h2 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("## " + selection); + cm.setCursor(cursor.line, cursor.ch + 3); + } + else + { + cm.replaceSelection("## " + selection); + } + }, + + h3 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("### " + selection); + cm.setCursor(cursor.line, cursor.ch + 4); + } + else + { + cm.replaceSelection("### " + selection); + } + }, + + h4 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("#### " + selection); + cm.setCursor(cursor.line, cursor.ch + 5); + } + else + { + cm.replaceSelection("#### " + selection); + } + }, + + h5 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("##### " + selection); + cm.setCursor(cursor.line, cursor.ch + 6); + } + else + { + cm.replaceSelection("##### " + selection); + } + }, + + h6 : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (cursor.ch !== 0) + { + cm.setCursor(cursor.line, 0); + cm.replaceSelection("###### " + selection); + cm.setCursor(cursor.line, cursor.ch + 7); + } + else + { + cm.replaceSelection("###### " + selection); + } + }, + + "list-ul" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (selection === "") + { + cm.replaceSelection("- " + selection); + } + else + { + var selectionText = selection.split("\n"); + + for (var i = 0, len = selectionText.length; i < len; i++) + { + selectionText[i] = (selectionText[i] === "") ? "" : "- " + selectionText[i]; + } + + cm.replaceSelection(selectionText.join("\n")); + } + }, + + "list-ol" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if(selection === "") + { + cm.replaceSelection("1. " + selection); + } + else + { + var selectionText = selection.split("\n"); + + for (var i = 0, len = selectionText.length; i < len; i++) + { + selectionText[i] = (selectionText[i] === "") ? "" : (i+1) + ". " + selectionText[i]; + } + + cm.replaceSelection(selectionText.join("\n")); + } + }, + + hr : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection(((cursor.ch !== 0) ? "\n\n" : "\n") + "------------\n\n"); + }, + + tex : function() { + if (!this.settings.tex) + { + alert("settings.tex === false"); + return this; + } + + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("$$" + selection + "$$"); + + if(selection === "") { + cm.setCursor(cursor.line, cursor.ch + 2); + } + }, + + link : function() { + this.executePlugin("linkDialog", "link-dialog/link-dialog"); + }, + + "reference-link" : function() { + this.executePlugin("referenceLinkDialog", "reference-link-dialog/reference-link-dialog"); + }, + + pagebreak : function() { + if (!this.settings.pageBreak) + { + alert("settings.pageBreak === false"); + return this; + } + + var cm = this.cm; + var selection = cm.getSelection(); + + cm.replaceSelection("\r\n[========]\r\n"); + }, + + image : function() { + this.executePlugin("imageDialog", "image-dialog/image-dialog"); + }, + + code : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection("`" + selection + "`"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + + "code-block" : function() { + this.executePlugin("codeBlockDialog", "code-block-dialog/code-block-dialog"); + }, + + "preformatted-text" : function() { + this.executePlugin("preformattedTextDialog", "preformatted-text-dialog/preformatted-text-dialog"); + }, + + table : function() { + this.executePlugin("tableDialog", "table-dialog/table-dialog"); + }, + + datetime : function() { + var cm = this.cm; + var selection = cm.getSelection(); + var date = new Date(); + var langName = this.settings.lang.name; + var datefmt = editormd.dateFormat() + " " + editormd.dateFormat((langName === "zh-cn" || langName === "zh-tw") ? "cn-week-day" : "week-day"); + + cm.replaceSelection(datefmt); + }, + + emoji : function() { + this.executePlugin("emojiDialog", "emoji-dialog/emoji-dialog"); + }, + + "html-entities" : function() { + this.executePlugin("htmlEntitiesDialog", "html-entities-dialog/html-entities-dialog"); + }, + + "goto-line" : function() { + this.executePlugin("gotoLineDialog", "goto-line-dialog/goto-line-dialog"); + }, + + watch : function() { + this[this.settings.watch ? "unwatch" : "watch"](); + }, + + preview : function() { + this.previewing(); + }, + + fullscreen : function() { + this.fullscreen(); + }, + + clear : function() { + this.clear(); + }, + + search : function() { + this.search(); + }, + + help : function() { + this.executePlugin("helpDialog", "help-dialog/help-dialog"); + }, + + info : function() { + this.showInfoDialog(); + } + }; + + var isMac = navigator.platform.toUpperCase().indexOf('MAC')>=0; + var key = isMac ? "Cmd" : "Ctrl"; + + editormd.keyMaps = { + [key + "-1"] : "h1", + [key + "-2"] : "h2", + [key + "-3"] : "h3", + [key + "-4"] : "h4", + [key + "-5"] : "h5", + [key + "-6"] : "h6", + [key + "-B"] : "bold", // if this is string == editormd.toolbarHandlers.xxxx + [key + "-D"] : "datetime", + + [key + "Ctrl-E"] : function() { // emoji + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (!this.settings.emoji) + { + alert("Error: settings.emoji == false"); + return ; + } + + cm.replaceSelection(":" + selection + ":"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + [key + "-Alt-G"] : "goto-line", + [key + "-H"] : "hr", + [key + "-I"] : "italic", + [key + "-K"] : "code", + + "Ctrl-L" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + var title = (selection === "") ? "" : " \""+selection+"\""; + + cm.replaceSelection("[" + selection + "]("+title+")"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + [key + "-U"] : "list-ul", + + "Shift-Ctrl-A" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + if (!this.settings.atLink) + { + alert("Error: settings.atLink == false"); + return ; + } + + cm.replaceSelection("@" + selection); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 1); + } + }, + + ["Shift" + key + "-C"] : "code", + ["Shift" + key + "Q"] : "quote", + ["Shift" + key + "S"] : "del", + ["Shift" + key + "K"] : "tex", // KaTeX + + "Shift-Alt-C" : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + cm.replaceSelection(["```", selection, "```"].join("\n")); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 3); + } + }, + + ["Shift-" + key + "-Alt-C"] : "code-block", + ["Shift-" + key + "-H"] : "html-entities", + "Shift-Alt-H" : "help", + ["Shift-" + key + "-E"] : "emoji", + ["Shift-" + key + "-U"] : "uppercase", + "Shift-Alt-U" : "ucwords", + ["Shift-" + key + "-Alt-U"] : "ucfirst", + "Shift-Alt-L" : "lowercase", + + ["Shift-" + key + "-I"] : function() { + var cm = this.cm; + var cursor = cm.getCursor(); + var selection = cm.getSelection(); + + var title = (selection === "") ? "" : " \""+selection+"\""; + + cm.replaceSelection("![" + selection + "]("+title+")"); + + if (selection === "") { + cm.setCursor(cursor.line, cursor.ch + 4); + } + }, + + ["Shift-" + key + "-Alt-I"] : "image", + ["Shift-" + key + "-L"] : "link", + ["Shift-" + key + "-O"] : "list-ol", + ["Shift-" + key + "-P"] : "preformatted-text", + ["Shift-" + key + "-T"] : "table", + "Shift-Alt-P" : "pagebreak", + "F9" : "watch", + "F10" : "preview", + "F11" : "fullscreen", + }; + + /** + * 清除字符串两边的空格 + * Clear the space of strings both sides. + * + * @param {String} str string + * @returns {String} trimed string + */ + + var trim = function(str) { + return (!String.prototype.trim) ? str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") : str.trim(); + }; + + editormd.trim = trim; + + /** + * 所有单词首字母大写 + * Words first to uppercase + * + * @param {String} str string + * @returns {String} string + */ + + var ucwords = function (str) { + return str.toLowerCase().replace(/\b(\w)|\s(\w)/g, function($1) { + return $1.toUpperCase(); + }); + }; + + editormd.ucwords = editormd.wordsFirstUpperCase = ucwords; + + /** + * 字符串首字母大写 + * Only string first char to uppercase + * + * @param {String} str string + * @returns {String} string + */ + + var firstUpperCase = function(str) { + return str.toLowerCase().replace(/\b(\w)/, function($1){ + return $1.toUpperCase(); + }); + }; + + var ucfirst = firstUpperCase; + + editormd.firstUpperCase = editormd.ucfirst = firstUpperCase; + + editormd.urls = { + atLinkBase : "https://github.com/" + }; + + editormd.regexs = { + atLink : /@(\w+)/g, + email : /(\w+)@(\w+)\.(\w+)\.?(\w+)?/g, + emailLink : /(mailto:)?([\w\.\_]+)@(\w+)\.(\w+)\.?(\w+)?/g, + emoji : /:([\w\+-]+):/g, + emojiDatetime : /(\d{1,2}:\d{1,2}:\d{1,2})/g, + twemoji : /:(tw-([\w]+)-?(\w+)?):/g, + fontAwesome : /:(fa-([\w]+)(-(\w+)){0,}):/g, + editormdLogo : /:(editormd-logo-?(\w+)?):/g, + pageBreak : /^\[[=]{8,}\]$/ + }; + + // Emoji graphics files url path + editormd.emoji = { + path : "http://www.emoji-cheat-sheet.com/graphics/emojis/", + ext : ".png" + }; + + // Twitter Emoji (Twemoji) graphics files url path + editormd.twemoji = { + path : "http://twemoji.maxcdn.com/36x36/", + ext : ".png" + }; + + /** + * 自定义marked的解析器 + * Custom Marked renderer rules + * + * @param {Array} markdownToC 传入用于接收TOC的数组 + * @returns {Renderer} markedRenderer 返回marked的Renderer自定义对象 + */ + + editormd.markedRenderer = function(markdownToC, options) { + var defaults = { + toc : true, // Table of contents + tocm : false, + tocStartLevel : 1, // Said from H1 to create ToC + pageBreak : true, + atLink : true, // for @link + emailLink : true, // for mail address auto link + taskList : false, // Enable Github Flavored Markdown task lists + emoji : false, // :emoji: , Support Twemoji, fontAwesome, Editor.md logo emojis. + tex : false, // TeX(LaTeX), based on KaTeX + flowChart : false, // flowChart.js only support IE9+ + sequenceDiagram : false, // sequenceDiagram.js only support IE9+ + }; + + var settings = $.extend(defaults, options || {}); + var marked = editormd.$marked; + var markedRenderer = new marked.Renderer(); + markdownToC = markdownToC || []; + + var regexs = editormd.regexs; + var atLinkReg = regexs.atLink; + var emojiReg = regexs.emoji; + var emailReg = regexs.email; + var emailLinkReg = regexs.emailLink; + var twemojiReg = regexs.twemoji; + var faIconReg = regexs.fontAwesome; + var editormdLogoReg = regexs.editormdLogo; + var pageBreakReg = regexs.pageBreak; + + markedRenderer.emoji = function(text) { + + text = text.replace(editormd.regexs.emojiDatetime, function($1) { + return $1.replace(/:/g, ":"); + }); + + var matchs = text.match(emojiReg); + + if (!matchs || !settings.emoji) { + return text; + } + + for (var i = 0, len = matchs.length; i < len; i++) + { + if (matchs[i] === ":+1:") { + matchs[i] = ":\\+1:"; + } + + text = text.replace(new RegExp(matchs[i]), function($1, $2){ + var faMatchs = $1.match(faIconReg); + var name = $1.replace(/:/g, ""); + + if (faMatchs) + { + for (var fa = 0, len1 = faMatchs.length; fa < len1; fa++) + { + var faName = faMatchs[fa].replace(/:/g, ""); + + return ""; + } + } + else + { + var emdlogoMathcs = $1.match(editormdLogoReg); + var twemojiMatchs = $1.match(twemojiReg); + + if (emdlogoMathcs) + { + for (var x = 0, len2 = emdlogoMathcs.length; x < len2; x++) + { + var logoName = emdlogoMathcs[x].replace(/:/g, ""); + return ""; + } + } + else if (twemojiMatchs) + { + for (var t = 0, len3 = twemojiMatchs.length; t < len3; t++) + { + var twe = twemojiMatchs[t].replace(/:/g, "").replace("tw-", ""); + return "\"twemoji-""; + } + } + else + { + var src = (name === "+1") ? "plus1" : name; + src = (src === "black_large_square") ? "black_square" : src; + src = (src === "moon") ? "waxing_gibbous_moon" : src; + + return "\":""; + } + } + }); + } + + return text; + }; + + markedRenderer.atLink = function(text) { + + if (atLinkReg.test(text)) + { + if (settings.atLink) + { + text = text.replace(emailReg, function($1, $2, $3, $4) { + return $1.replace(/@/g, "_#_@_#_"); + }); + + text = text.replace(atLinkReg, function($1, $2) { + return "" + $1 + ""; + }).replace(/_#_@_#_/g, "@"); + } + + if (settings.emailLink) + { + text = text.replace(emailLinkReg, function($1, $2, $3, $4, $5) { + return (!$2 && $.inArray($5, "jpg|jpeg|png|gif|webp|ico|icon|pdf".split("|")) < 0) ? ""+$1+"" : $1; + }); + } + + return text; + } + + return text; + }; + + markedRenderer.link = function (href, title, text) { + + if (this.options.sanitize) { + try { + var prot = decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase(); + } catch(e) { + return ""; + } + + if (prot.indexOf("javascript:") === 0) { + return ""; + } + } + + var out = "" + text.replace(/@/g, "@") + ""; + } + + if (title) { + out += " title=\"" + title + "\""; + } + + out += ">" + text + ""; + + return out; + }; + + markedRenderer.heading = function(text, level, raw) { + + var linkText = text; + var hasLinkReg = /\s*\]*)\>(.*)\<\/a\>\s*/; + var getLinkTextReg = /\s*\]+)\>([^\>]*)\<\/a\>\s*/g; + + if (hasLinkReg.test(text)) + { + var tempText = []; + text = text.split(/\]+)\>([^\>]*)\<\/a\>/); + + for (var i = 0, len = text.length; i < len; i++) + { + tempText.push(text[i].replace(/\s*href\=\"(.*)\"\s*/g, "")); + } + + text = tempText.join(" "); + } + + text = trim(text); + + var escapedText = text.toLowerCase().replace(/[^\w]+/g, "-"); + var toc = { + text : text, + level : level, + slug : escapedText + }; + + var isChinese = /^[\u4e00-\u9fa5]+$/.test(text); + var id = (isChinese) ? escape(text).replace(/\%/g, "") : text.toLowerCase().replace(/[^\w]+/g, "-"); + + markdownToC.push(toc); + + var headingHTML = ""; + + headingHTML += ""; + headingHTML += ""; + headingHTML += (hasLinkReg) ? this.atLink(this.emoji(linkText)) : this.atLink(this.emoji(text)); + headingHTML += ""; + + return headingHTML; + }; + + markedRenderer.pageBreak = function(text) { + if (pageBreakReg.test(text) && settings.pageBreak) + { + text = "
                      "; + } + + return text; + }; + + markedRenderer.paragraph = function(text) { + var isTeXInline = /\$\$(.*)\$\$/g.test(text); + var isTeXLine = /^\$\$(.*)\$\$$/.test(text); + var isTeXAddClass = (isTeXLine) ? " class=\"" + editormd.classNames.tex + "\"" : ""; + var isToC = (settings.tocm) ? /^(\[TOC\]|\[TOCM\])$/.test(text) : /^\[TOC\]$/.test(text); + var isToCMenu = /^\[TOCM\]$/.test(text); + + if (!isTeXLine && isTeXInline) + { + text = text.replace(/(\$\$([^\$]*)\$\$)+/g, function($1, $2) { + return "" + $2.replace(/\$/g, "") + ""; + }); + } + else + { + text = (isTeXLine) ? text.replace(/\$/g, "") : text; + } + + var tocHTML = "
                      " + text + "
                      "; + + return (isToC) ? ( (isToCMenu) ? "
                      " + tocHTML + "

                      " : tocHTML ) + : ( (pageBreakReg.test(text)) ? this.pageBreak(text) : "" + this.atLink(this.emoji(text)) + "

                      \n" ); + }; + + markedRenderer.code = function (code, lang, escaped) { + + if (lang === "seq" || lang === "sequence") + { + return "
                      " + code + "
                      "; + } + else if ( lang === "flow") + { + return "
                      " + code + "
                      "; + } + else if ( lang === "math" || lang === "latex" || lang === "katex") + { + return "

                      " + code + "

                      "; + } + else + { + + return marked.Renderer.prototype.code.apply(this, arguments); + } + }; + + markedRenderer.tablecell = function(content, flags) { + var type = (flags.header) ? "th" : "td"; + var tag = (flags.align) ? "<" + type +" style=\"text-align:" + flags.align + "\">" : "<" + type + ">"; + + return tag + this.atLink(this.emoji(content)) + "\n"; + }; + + markedRenderer.listitem = function(text) { + if (settings.taskList && /^\s*\[[x\s]\]\s*/.test(text)) + { + text = text.replace(/^\s*\[\s\]\s*/, " ") + .replace(/^\s*\[x\]\s*/, " "); + + return "
                    • " + this.atLink(this.emoji(text)) + "
                    • "; + } + else + { + return "
                    • " + this.atLink(this.emoji(text)) + "
                    • "; + } + }; + + return markedRenderer; + }; + + /** + * + * 生成TOC(Table of Contents) + * Creating ToC (Table of Contents) + * + * @param {Array} toc 从marked获取的TOC数组列表 + * @param {Element} container 插入TOC的容器元素 + * @param {Integer} startLevel Hx 起始层级 + * @returns {Object} tocContainer 返回ToC列表容器层的jQuery对象元素 + */ + + editormd.markdownToCRenderer = function(toc, container, tocDropdown, startLevel) { + + var html = ""; + var lastLevel = 0; + var classPrefix = this.classPrefix; + + startLevel = startLevel || 1; + + for (var i = 0, len = toc.length; i < len; i++) + { + var text = toc[i].text; + var level = toc[i].level; + + if (level < startLevel) { + continue; + } + + if (level > lastLevel) + { + html += ""; + } + else if (level < lastLevel) + { + html += (new Array(lastLevel - level + 2)).join("
                  • "); + } + else + { + html += ""; + } + + html += "
                  • " + text + "