opti: update TODO list

This commit is contained in:
Jocs 2017-12-13 14:13:06 +08:00
parent 05089ffbb9
commit 7b4becdce9
7 changed files with 110 additions and 13497 deletions

104
TODO.md
View File

@ -1,5 +1,77 @@
#### TODO LIST
**Bugs**
- [ ] 处理嵌套在 item 中的 codeblock 的方向键。
- [ ] codeblock 中光标在 begining 的时候,向上箭头失效。
- [ ] codeblock 中 language input 输入enter 后codeblock 没有自动获取焦点。
- [ ] 图片段落下面有新的段落,编辑跳动现象。
- [ ] 当 codeBlock 在 list item 中, item nextSibling 为 null但是 list 还有nextSibling。这个时候不应该创建行的 block。
- [ ] codeBlock 在 list item 中时list style 消失。
**菜单**
* File
- [x] New... cmd + N
- [x] Open (cmd + O)
- [ ] Open Recent
- [ ] Open With Finder
- [ ] Close
- [x] Save
- [ ] Duplicate
- [ ] Rename
- [ ] Move To
- [ ] Export(PDF | HTML with style | HTML)
* Edit
- [ ] Undo
- [ ] Redo
- [ ] Cut
- [ ] Copy
- [ ] Paste
- [ ] Copy As Markdown
- [ ] Copy As HTML
- [ ] Paste As Plain Text
- [ ] Find | Find And Replace
* Paragraph
- [ ] Heading 1~6
- [ ] Paragraph
- [ ] Increase Heading Level
- [ ] Decrease Heading Level
- [ ] Table
- [ ] Code Fences
- [ ] Quote Block
- [ ] Order List
- [ ] Unorder List
- [ ] Task List
- [ ] List Indentation (up | down)
- [ ] Horizontal Line
* Format
- [ ] Strong
- [ ] Emphasis
- [ ] Code
- [ ] Strike
- [ ] Link
- [ ] Image
- [ ] Clear Format
* View
- [ ] Customize Touch Bar
* Theme
- [ ] GitHub | ...
* Window
- [ ] Minimize
- [ ] Zoom
- [ ] Current Window
* Help
- [ ] Website
**Website**
// TODO
**Title Bar**
* 字数统计Words | Paragraphes | Characters | Characters With Space
**语法实现**
- [x] 段落和换行,两个或两个以上的空格再敲回车,或插入一个\<br/\>
@ -34,39 +106,7 @@ _ 底线
- [ ] 表格支持。
**输出**
- [x] 输出 markdown
- [ ] 输出 pdf
- [ ] 输出 html
**顶部菜单**
// 复制、黏贴、快捷键
**右键菜单**
// TODO
**打开、编辑、保存文件**
- [ ] Markdown to render html
- [ ] redo、ondo
- [ ] 终端打开
Bugs:
* [ ] 处理嵌套在 item 中的 codeblock 的方向键。
* [ ] codeblock 中光标在 begining 的时候,向上箭头失效。
* [ ] codeblock 中 language input 输入enter 后codeblock 没有自动获取焦点。
* [ ] 图片段落下面有新的段落,编辑跳动现象。
* [ ] 当 codeBlock 在 list item 中, item nextSibling 为 null但是 list 还有nextSibling。这个时候不应该创建行的 block。
* [ ] codeBlock 在 list item 中时list style 消失。

13435
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -57,7 +57,6 @@
},
"dependencies": {
"axios": "^0.16.1",
"chokidar": "^1.7.0",
"codemirror": "^5.31.0",
"electron-window-state": "^4.1.1",
"markdown-it": "^8.4.0",
@ -70,13 +69,16 @@
},
"devDependencies": {
"babel-core": "^6.25.0",
"babel-eslint": "^7.2.3",
"babel-loader": "^7.1.1",
"babel-plugin-istanbul": "^4.1.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.24.1",
"babili-webpack-plugin": "^0.1.2",
"cfonts": "^1.1.3",
"chai": "^4.0.0",
"chalk": "^2.1.0",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^5.0.5",
@ -84,15 +86,14 @@
"del": "^3.0.0",
"devtron": "^1.4.0",
"electron": "^1.7.5",
"electron-builder": "^19.49.0",
"electron-debug": "^1.4.0",
"electron-devtools-installer": "^2.2.0",
"electron-builder": "^19.19.1",
"babel-eslint": "^7.2.3",
"eslint": "^4.4.1",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-html": "^3.1.1",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.1.1",
"eslint-plugin-promise": "^3.5.0",
@ -109,14 +110,11 @@
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "^0.0.31",
"karma-webpack": "^2.0.1",
"webpack-merge": "^4.1.0",
"require-dir": "^0.3.0",
"spectron": "^3.7.1",
"babel-plugin-istanbul": "^4.1.1",
"chai": "^4.0.0",
"mocha": "^3.0.2",
"multispinner": "^0.2.1",
"node-loader": "^0.6.0",
"require-dir": "^0.3.0",
"spectron": "^3.7.1",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9",
"vue-html-loader": "^1.2.4",
@ -125,6 +123,7 @@
"vue-template-compiler": "^2.4.2",
"webpack": "^3.5.2",
"webpack-dev-server": "^2.7.1",
"webpack-hot-middleware": "^2.18.2"
"webpack-hot-middleware": "^2.18.2",
"webpack-merge": "^4.1.0"
}
}

View File

@ -197,6 +197,11 @@ pre.ag-active .ag-language-input {
background: azure;
}
.ag-image-marked-text ~ img {
display: block;
margin: 0 auto;
}
.ag-image-marked-text::before {
content: '';
width: 1.1em;

View File

@ -43,7 +43,7 @@ class StateRender {
/**
* [render]: 2 steps:
* render vdom
* return set cursor method
* return set cursor
*/
render (blocks, cursor, activeBlockKey) {
const selector = `${LOWERCASE_TAGS.div}#${CLASS_OR_ID['AG_EDITOR_ID']}`
@ -250,7 +250,7 @@ class StateRender {
if (isLengthEven(token.backlash.first) && isLengthEven(token.backlash.second)) {
const id = getIdWithoutSet()
const src = /$http(s)?:/.test(token.src) || !window.__dirname
const src = (/^http(s)?:/.test(token.src) || !window.__dirname)
? token.src + encodeURI(token.backlash.second)
: 'file://' + path.resolve(window.__dirname, token.src + encodeURI(token.backlash.second))
loadImage(src)

View File

@ -1,27 +1,27 @@
'use strict'
import fs from 'fs'
import chokidar from 'chokidar'
// import chokidar from 'chokidar'
import path from 'path'
import { dialog, ipcMain, BrowserWindow } from 'electron'
import createWindow from './createWindow'
import { EXTENSIONS } from './config'
const watchAndReload = (pathname, win) => {
const watcher = chokidar.watch(pathname, {
persistent: true
})
const filename = path.basename(pathname)
watcher.on('change', path => {
fs.readFile(pathname, 'utf-8', (err, file) => {
if (err) return console.log(err)
win.webContents.send('AGANI::file-change', {
file,
filename,
pathname
})
})
})
const watchAndReload = (pathname, win) => { // when i build, and failed.
// const watcher = chokidar.watch(pathname, {
// persistent: true
// })
// const filename = path.basename(pathname)
// watcher.on('change', path => {
// fs.readFile(pathname, 'utf-8', (err, file) => {
// if (err) return console.log(err)
// win.webContents.send('AGANI::file-change', {
// file,
// filename,
// pathname
// })
// })
// })
}
ipcMain.on('AGANI:response-file-save', (e, { markdown, pathname }) => {
@ -48,7 +48,7 @@ ipcMain.on('AGANI:response-file-save', (e, { markdown, pathname }) => {
export const open = win => {
const filename = dialog.showOpenDialog(win, {
properties: ['openFile'],
properties: [ 'openFile' ],
filters: [{
name: 'text',
extensions: EXTENSIONS

View File

@ -1,5 +1,5 @@
<template>
<div ref="editor">
<div ref="editor" class="editor-component">
</div>
</template>
@ -47,4 +47,8 @@
<style scoped>
@import '../../editor/themes/github.css';
@import '../../editor/index.css';
.editor-component {
height: calc(100vh - 22px);
overflow: auto;
}
</style>