@ -1,10 +0,0 @@
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@ -1,135 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
process.env.NODE_ENV = 'production'
|
||||
|
||||
const { say } = require('cfonts')
|
||||
const path = require('path')
|
||||
const chalk = require('chalk')
|
||||
const del = require('del')
|
||||
const fs = require('fs-extra')
|
||||
const webpack = require('webpack')
|
||||
const Listr = require('listr')
|
||||
|
||||
|
||||
const mainConfig = require('./webpack.main.config')
|
||||
const rendererConfig = require('./webpack.renderer.config')
|
||||
|
||||
const doneLog = chalk.bgGreen.white(' DONE ') + ' '
|
||||
const errorLog = chalk.bgRed.white(' ERROR ') + ' '
|
||||
const okayLog = chalk.bgBlue.white(' OKAY ') + ' '
|
||||
const isCI = process.env.CI || false
|
||||
|
||||
if (process.env.BUILD_TARGET === 'clean') clean()
|
||||
else if (process.env.BUILD_TARGET === 'web') web()
|
||||
else build()
|
||||
|
||||
function clean () {
|
||||
del.sync(['build/*', '!build/icons', '!build/icons/icon.*'])
|
||||
console.log(`\n${doneLog}\n`)
|
||||
process.exit()
|
||||
}
|
||||
|
||||
async function build () {
|
||||
greeting()
|
||||
|
||||
del.sync(['dist/electron/*', '!.gitkeep'])
|
||||
del.sync(['static/themes/*'])
|
||||
|
||||
const from = path.resolve(__dirname, '../src/muya/themes')
|
||||
const to = path.resolve(__dirname, '../static/themes')
|
||||
await fs.copy(from, to)
|
||||
|
||||
let results = ''
|
||||
|
||||
const tasks = new Listr(
|
||||
[
|
||||
{
|
||||
title: 'building main process',
|
||||
task: async () => {
|
||||
await pack(mainConfig)
|
||||
.then(result => {
|
||||
results += result + '\n\n'
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(`\n ${errorLog}failed to build main process`)
|
||||
console.error(`\n${err}\n`)
|
||||
process.exit(1)
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'building renderer process',
|
||||
task: async () => {
|
||||
await pack(rendererConfig)
|
||||
.then(result => {
|
||||
results += result + '\n\n'
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(`\n ${errorLog}failed to build renderer process`)
|
||||
console.error(`\n${err}\n`)
|
||||
process.exit(1)
|
||||
})
|
||||
}
|
||||
}
|
||||
],
|
||||
{ concurrent: 2 }
|
||||
)
|
||||
|
||||
await tasks
|
||||
.run()
|
||||
.then(() => {
|
||||
process.stdout.write('\x1B[2J\x1B[0f')
|
||||
console.log(`\n\n${results}`)
|
||||
console.log(`${okayLog}take it away ${chalk.yellow('`electron-builder`')}\n`)
|
||||
process.exit()
|
||||
})
|
||||
.catch(err => {
|
||||
process.exit(1)
|
||||
})
|
||||
}
|
||||
|
||||
function pack (config) {
|
||||
return new Promise((resolve, reject) => {
|
||||
webpack(config, (err, stats) => {
|
||||
if (err) reject(err.stack || err)
|
||||
else if (stats.hasErrors()) {
|
||||
let err = ''
|
||||
|
||||
stats.toString({
|
||||
chunks: false,
|
||||
colors: true
|
||||
})
|
||||
.split(/\r?\n/)
|
||||
.forEach(line => {
|
||||
err += ` ${line}\n`
|
||||
})
|
||||
|
||||
reject(err)
|
||||
} else {
|
||||
resolve(stats.toString({
|
||||
chunks: false,
|
||||
colors: true
|
||||
}))
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function greeting () {
|
||||
const cols = process.stdout.columns
|
||||
let text = ''
|
||||
|
||||
if (cols > 155) text = 'building marktext'
|
||||
else if (cols > 76) text = 'building|marktext'
|
||||
else text = false
|
||||
|
||||
if (text && !isCI) {
|
||||
say(text, {
|
||||
colors: ['yellow'],
|
||||
font: 'simple3d',
|
||||
space: false
|
||||
})
|
||||
} else {
|
||||
console.log(chalk.yellow.bold('\n building marktext'))
|
||||
}
|
||||
}
|
||||
@ -1,40 +0,0 @@
|
||||
const hotClient = require('webpack-hot-middleware/client?reload=true')
|
||||
|
||||
hotClient.subscribe(event => {
|
||||
/**
|
||||
* Reload browser when HTMLWebpackPlugin emits a new index.html
|
||||
*
|
||||
* Currently disabled until jantimon/html-webpack-plugin#680 is resolved.
|
||||
* https://github.com/SimulatedGREG/electron-vue/issues/437
|
||||
* https://github.com/jantimon/html-webpack-plugin/issues/680
|
||||
*/
|
||||
// if (event.action === 'reload') {
|
||||
// window.location.reload()
|
||||
// }
|
||||
|
||||
/**
|
||||
* Notify `mainWindow` when `main` process is compiling,
|
||||
* giving notice for an expected reload of the `electron` process
|
||||
*/
|
||||
if (event.action === 'compiling') {
|
||||
document.body.innerHTML += `
|
||||
<style>
|
||||
#dev-client {
|
||||
background: #4fc08d;
|
||||
border-radius: 4px;
|
||||
bottom: 20px;
|
||||
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
|
||||
color: #fff;
|
||||
font-family: 'Source Sans Pro', sans-serif;
|
||||
left: 20px;
|
||||
padding: 8px 12px;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="dev-client">
|
||||
Compiling Main Process...
|
||||
</div>
|
||||
`
|
||||
}
|
||||
})
|
||||
@ -1,197 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
const chalk = require('chalk')
|
||||
const electron = require('electron')
|
||||
const path = require('path')
|
||||
const { say } = require('cfonts')
|
||||
const { spawn } = require('child_process')
|
||||
const webpack = require('webpack')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const WebpackDevServer = require('webpack-dev-server')
|
||||
const webpackHotMiddleware = require('webpack-hot-middleware')
|
||||
|
||||
const mainConfig = require('./webpack.main.config')
|
||||
const rendererConfig = require('./webpack.renderer.config')
|
||||
|
||||
let electronProcess = null
|
||||
let manualRestart = false
|
||||
let hotMiddleware
|
||||
|
||||
function logStats (proc, data) {
|
||||
let log = ''
|
||||
|
||||
log += chalk.yellow.bold(`┏ ${proc} Process ${new Array((19 - proc.length) + 1).join('-')}`)
|
||||
log += '\n\n'
|
||||
|
||||
if (typeof data === 'object') {
|
||||
data.toString({
|
||||
colors: true,
|
||||
chunks: false
|
||||
}).split(/\r?\n/).forEach(line => {
|
||||
log += ' ' + line + '\n'
|
||||
})
|
||||
} else {
|
||||
log += ` ${data}\n`
|
||||
}
|
||||
|
||||
log += '\n' + chalk.yellow.bold(`┗ ${new Array(28 + 1).join('-')}`) + '\n'
|
||||
|
||||
console.log(log)
|
||||
}
|
||||
|
||||
function startRenderer () {
|
||||
return new Promise((resolve, reject) => {
|
||||
rendererConfig.entry.renderer = [path.join(__dirname, 'dev-client')].concat(rendererConfig.entry.renderer)
|
||||
|
||||
const compiler = webpack(rendererConfig)
|
||||
hotMiddleware = webpackHotMiddleware(compiler, {
|
||||
log: false,
|
||||
heartbeat: 2500
|
||||
})
|
||||
|
||||
compiler.hooks.compilation.tap('HtmlWebpackPluginAfterEmit', compilation => {
|
||||
HtmlWebpackPlugin.getHooks(compilation).afterEmit.tapAsync(
|
||||
'AfterPlugin',
|
||||
(data, cb) => {
|
||||
hotMiddleware.publish({ action: 'reload' })
|
||||
// Tell webpack to move on
|
||||
cb(null, data)
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
compiler.hooks.done.tap('AfterCompiler', stats => {
|
||||
logStats('Renderer', stats)
|
||||
})
|
||||
|
||||
const server = new WebpackDevServer({
|
||||
host: '127.0.0.1',
|
||||
port: 9091,
|
||||
hot: true,
|
||||
liveReload: true,
|
||||
compress: true,
|
||||
static: [
|
||||
{
|
||||
directory: path.join(__dirname, '../node_modules/codemirror/mode'),
|
||||
publicPath: '/codemirror/mode',
|
||||
watch: false
|
||||
}
|
||||
],
|
||||
onBeforeSetupMiddleware ({ app, middleware }) {
|
||||
app.use(hotMiddleware)
|
||||
middleware.waitUntilValid(() => {
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
}, compiler)
|
||||
|
||||
server.start()
|
||||
})
|
||||
}
|
||||
|
||||
function startMain () {
|
||||
return new Promise((resolve, reject) => {
|
||||
mainConfig.entry.main = [path.join(__dirname, '../src/main/index.dev.js')].concat(mainConfig.entry.main)
|
||||
|
||||
const compiler = webpack(mainConfig)
|
||||
|
||||
compiler.hooks.watchRun.tapAsync('Compiling', (_, done) => {
|
||||
logStats('Main', chalk.white.bold('compiling...'))
|
||||
hotMiddleware.publish({ action: 'compiling' })
|
||||
done()
|
||||
})
|
||||
|
||||
compiler.watch({}, (err, stats) => {
|
||||
if (err) {
|
||||
console.log(err)
|
||||
return
|
||||
}
|
||||
|
||||
logStats('Main', stats)
|
||||
|
||||
if (electronProcess && electronProcess.kill) {
|
||||
manualRestart = true
|
||||
process.kill(electronProcess.pid)
|
||||
electronProcess = null
|
||||
startElectron()
|
||||
|
||||
setTimeout(() => {
|
||||
manualRestart = false
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function startElectron () {
|
||||
electronProcess = spawn(electron, [
|
||||
'--inspect=5858',
|
||||
'--remote-debugging-port=8315',
|
||||
'--nolazy',
|
||||
path.join(__dirname, '../dist/electron/main.js')
|
||||
])
|
||||
|
||||
electronProcess.stdout.on('data', data => {
|
||||
electronLog(data, 'blue')
|
||||
})
|
||||
electronProcess.stderr.on('data', data => {
|
||||
electronLog(data, 'red')
|
||||
})
|
||||
|
||||
electronProcess.on('close', () => {
|
||||
if (!manualRestart) process.exit()
|
||||
})
|
||||
}
|
||||
|
||||
function electronLog (data, color) {
|
||||
let log = ''
|
||||
data = data.toString().split(/\r?\n/)
|
||||
data.forEach(line => {
|
||||
log += ` ${line}\n`
|
||||
})
|
||||
if (/[0-9A-z]+/.test(log)) {
|
||||
console.log(
|
||||
chalk[color].bold('┏ Electron -------------------') +
|
||||
'\n\n' +
|
||||
log +
|
||||
chalk[color].bold('┗ ----------------------------') +
|
||||
'\n'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function greeting () {
|
||||
const cols = process.stdout.columns
|
||||
let text = ''
|
||||
|
||||
if (cols > 155) text = 'building marktext'
|
||||
else if (cols > 76) text = 'building|marktext'
|
||||
else text = false
|
||||
|
||||
if (text) {
|
||||
say(text, {
|
||||
colors: ['yellow'],
|
||||
font: 'simple3d',
|
||||
space: false
|
||||
})
|
||||
} else {
|
||||
console.log(chalk.yellow.bold('\n building marktext'))
|
||||
}
|
||||
console.log(chalk.blue(' getting ready...') + '\n')
|
||||
}
|
||||
|
||||
function init () {
|
||||
greeting()
|
||||
|
||||
Promise.all([startRenderer(), startMain()])
|
||||
.then(() => {
|
||||
startElectron()
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err)
|
||||
})
|
||||
}
|
||||
|
||||
init()
|
||||
@ -1,38 +0,0 @@
|
||||
const { GitRevisionPlugin } = require('git-revision-webpack-plugin')
|
||||
const { version } = require('../package.json')
|
||||
|
||||
const getEnvironmentDefinitions = function () {
|
||||
let shortHash = 'N/A'
|
||||
let fullHash = 'N/A'
|
||||
try {
|
||||
const gitRevisionPlugin = new GitRevisionPlugin()
|
||||
shortHash = gitRevisionPlugin.version()
|
||||
fullHash = gitRevisionPlugin.commithash()
|
||||
} catch(_) {
|
||||
// Ignore error if we build without git.
|
||||
}
|
||||
|
||||
const isStableRelease = !!process.env.MARKTEXT_IS_STABLE
|
||||
const versionSuffix = isStableRelease ? '' : ` (${shortHash})`
|
||||
return {
|
||||
'global.MARKTEXT_GIT_SHORT_HASH': JSON.stringify(shortHash),
|
||||
'global.MARKTEXT_GIT_HASH': JSON.stringify(fullHash),
|
||||
|
||||
'global.MARKTEXT_VERSION': JSON.stringify(version),
|
||||
'global.MARKTEXT_VERSION_STRING': JSON.stringify(`v${version}${versionSuffix}`),
|
||||
'global.MARKTEXT_IS_STABLE': JSON.stringify(isStableRelease)
|
||||
}
|
||||
}
|
||||
|
||||
const getRendererEnvironmentDefinitions = function () {
|
||||
const env = getEnvironmentDefinitions()
|
||||
return {
|
||||
'process.versions.MARKTEXT_VERSION': env['global.MARKTEXT_VERSION'],
|
||||
'process.versions.MARKTEXT_VERSION_STRING': env['global.MARKTEXT_VERSION_STRING'],
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getEnvironmentDefinitions: getEnvironmentDefinitions,
|
||||
getRendererEnvironmentDefinitions: getRendererEnvironmentDefinitions
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
'use strict'
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
// WORKAROUND: Fix slow startup time on Windows due to blocking powershell call(s) in windows-release.
|
||||
// Replace the problematic file with our "fixed" version.
|
||||
const windowsReleasePath = path.resolve(__dirname, '../node_modules/windows-release')
|
||||
if (fs.existsSync(windowsReleasePath)) {
|
||||
const windowsReleaseJson = path.join(windowsReleasePath, 'package.json')
|
||||
const packageJson = JSON.parse(fs.readFileSync(windowsReleaseJson, { encoding : 'utf-8' }))
|
||||
|
||||
const windowsReleaseMajor = Number(packageJson.version.match(/^(\d+)\./)[1])
|
||||
if (windowsReleaseMajor >= 5) {
|
||||
console.error('[ERROR] "windows-release" workaround failed because version is >=5.\n')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const srcPath = path.resolve(__dirname, '../resources/build/windows-release.js')
|
||||
const destPath = path.join(windowsReleasePath, 'index.js')
|
||||
fs.copyFileSync(srcPath, destPath)
|
||||
}
|
||||
|
||||
// WORKAROUND: electron-builder downloads the wrong prebuilt architecture on macOS and the reason is unknown.
|
||||
// For now, we rebuild all native libraries from source.
|
||||
const keytarPath = path.resolve(__dirname, '../node_modules/keytar')
|
||||
if (process.platform === 'darwin' && fs.existsSync(keytarPath)) {
|
||||
const keytarPackageJsonPath = path.join(keytarPath, 'package.json')
|
||||
let packageText = fs.readFileSync(keytarPackageJsonPath, { encoding : 'utf-8' })
|
||||
|
||||
packageText = packageText.replace(/"install": "prebuild-install \|\| npm run build",/i, '"install": "npm run build",')
|
||||
fs.writeFileSync(keytarPackageJsonPath, packageText, { encoding : 'utf-8' })
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
const nodeMajor = Number(process.versions.node.match(/^(\d+)\./)[1])
|
||||
if (nodeMajor < 14) {
|
||||
console.error('[ERROR] Node.js v14 or above is required.\n')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
if (!/yarn\.js$/.test(process.env.npm_execpath)) {
|
||||
console.error('[ERROR] Please use yarn to install dependencies.\n')
|
||||
process.exit(1)
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
const checker = require('license-checker')
|
||||
|
||||
const getLicenses = (rootDir, callback) => {
|
||||
checker.init({
|
||||
start: rootDir,
|
||||
production: true,
|
||||
development: false,
|
||||
direct: true,
|
||||
excludePackages: 'file-icons@2.1.47', // file-icons is under MIT License, but license-checker shows no license.
|
||||
json: true,
|
||||
onlyAllow: 'Unlicense;WTFPL;ISC;MIT;BSD;ISC;Apache-2.0;MIT*;Apache;Apache*;BSD*;CC0-1.0;CC-BY-4.0;CC-BY-3.0',
|
||||
customPath: {
|
||||
licenses: '',
|
||||
licenseText: 'none'
|
||||
}
|
||||
}, function (err, packages) {
|
||||
callback(err, packages, checker)
|
||||
})
|
||||
}
|
||||
|
||||
// Check that all production dependencies are allowed.
|
||||
const validateLicenses = rootDir => {
|
||||
getLicenses(rootDir, (err, packages, checker) => {
|
||||
if (err) {
|
||||
console.log(`[ERROR] ${err}`)
|
||||
process.exit(1)
|
||||
}
|
||||
console.log(checker.asSummary(packages))
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getLicenses: getLicenses,
|
||||
validateLicenses: validateLicenses
|
||||
}
|
||||
@ -1,112 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
process.env.BABEL_ENV = 'main'
|
||||
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const ESLintPlugin = require('eslint-webpack-plugin')
|
||||
|
||||
const { getEnvironmentDefinitions } = require('./marktextEnvironment')
|
||||
const { dependencies } = require('../package.json')
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
|
||||
/** @type {import('webpack').Configuration} */
|
||||
const mainConfig = {
|
||||
mode: 'development',
|
||||
devtool: 'eval-cheap-module-source-map',
|
||||
optimization: {
|
||||
emitOnErrors: false
|
||||
},
|
||||
entry: {
|
||||
main: path.join(__dirname, '../src/main/index.js')
|
||||
},
|
||||
externals: [
|
||||
...Object.keys(dependencies || {})
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
use: 'babel-loader',
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /\.node$/,
|
||||
loader: 'node-loader',
|
||||
options: {
|
||||
name: '[name].[ext]'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
node: {
|
||||
__dirname: !isProduction,
|
||||
__filename: !isProduction
|
||||
},
|
||||
cache: false,
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
libraryTarget: 'commonjs2',
|
||||
path: path.join(__dirname, '../dist/electron')
|
||||
},
|
||||
plugins: [
|
||||
new ESLintPlugin({
|
||||
extensions: ['js'],
|
||||
files: [
|
||||
'src',
|
||||
'test'
|
||||
],
|
||||
exclude: [
|
||||
'node_modules'
|
||||
],
|
||||
emitError: true,
|
||||
failOnError: true,
|
||||
// NB: Threads must be disabled, otherwise no errors are emitted.
|
||||
threads: false,
|
||||
formatter: require('eslint-friendly-formatter'),
|
||||
context: path.resolve(__dirname, '../'),
|
||||
overrideConfigFile: '.eslintrc.js'
|
||||
}),
|
||||
// Add global environment definitions.
|
||||
new webpack.DefinePlugin(getEnvironmentDefinitions())
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'common': path.join(__dirname, '../src/common')
|
||||
},
|
||||
extensions: ['.js', '.json', '.node']
|
||||
},
|
||||
target: 'electron-main'
|
||||
}
|
||||
|
||||
// Fix debugger breakpoints
|
||||
if (!isProduction && process.env.MARKTEXT_BUILD_VSCODE_DEBUG) {
|
||||
mainConfig.devtool = 'inline-source-map'
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust mainConfig for development settings
|
||||
*/
|
||||
if (!isProduction) {
|
||||
mainConfig.cache = {
|
||||
name: 'main-dev',
|
||||
type: 'filesystem'
|
||||
}
|
||||
mainConfig.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
'__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust mainConfig for production settings
|
||||
*/
|
||||
if (isProduction) {
|
||||
mainConfig.devtool = 'nosources-source-map'
|
||||
mainConfig.mode = 'production'
|
||||
mainConfig.optimization.minimize = true
|
||||
}
|
||||
|
||||
module.exports = mainConfig
|
||||
@ -1,285 +0,0 @@
|
||||
'use strict'
|
||||
|
||||
process.env.BABEL_ENV = 'renderer'
|
||||
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const VueLoaderPlugin = require('vue-loader/lib/plugin')
|
||||
const SpritePlugin = require('svg-sprite-loader/plugin')
|
||||
const postcssPresetEnv = require('postcss-preset-env')
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
|
||||
const ESLintPlugin = require('eslint-webpack-plugin')
|
||||
|
||||
const { getRendererEnvironmentDefinitions } = require('./marktextEnvironment')
|
||||
const { dependencies } = require('../package.json')
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
/**
|
||||
* List of node_modules to include in webpack bundle
|
||||
* Required for specific packages like Vue UI libraries
|
||||
* that provide pure *.vue files that need compiling
|
||||
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/webpack-configurations.html#white-listing-externals
|
||||
*/
|
||||
const whiteListedModules = ['vue']
|
||||
|
||||
/** @type {import('webpack').Configuration} */
|
||||
const rendererConfig = {
|
||||
mode: 'development',
|
||||
devtool: 'eval-cheap-module-source-map',
|
||||
optimization: {
|
||||
emitOnErrors: false
|
||||
},
|
||||
infrastructureLogging: {
|
||||
level: 'warn',
|
||||
},
|
||||
entry: {
|
||||
renderer: path.join(__dirname, '../src/renderer/main.js')
|
||||
},
|
||||
externals: [
|
||||
...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d))
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: require.resolve(path.join(__dirname, '../src/muya/lib/assets/libs/snap.svg-min.js')),
|
||||
use: 'imports-loader?this=>window,fix=>module.exports=0'
|
||||
},
|
||||
{
|
||||
test: /\.vue$/,
|
||||
use: {
|
||||
loader: 'vue-loader',
|
||||
options: {
|
||||
sourceMap: true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /(theme\-chalk(?:\/|\\)index|exportStyle|katex|github\-markdown|prism[\-a-z]*|\.theme|headerFooterStyle)\.css$/,
|
||||
use: [
|
||||
'to-string-loader',
|
||||
'css-loader'
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
exclude: /(theme\-chalk(?:\/|\\)index|exportStyle|katex|github\-markdown|prism[\-a-z]*|\.theme|headerFooterStyle)\.css$/,
|
||||
use: [
|
||||
isProduction ? MiniCssExtractPlugin.loader : 'style-loader',
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: { importLoaders: 1 }
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
postcssOptions: {
|
||||
plugins: [
|
||||
postcssPresetEnv({ stage: 0 })
|
||||
],
|
||||
},
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.html$/,
|
||||
use: 'vue-html-loader'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
cacheDirectory: true
|
||||
}
|
||||
}
|
||||
],
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /\.node$/,
|
||||
loader: 'node-loader',
|
||||
options: {
|
||||
name: '[name].[ext]'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.svg$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'svg-sprite-loader',
|
||||
options: {
|
||||
extract: true,
|
||||
publicPath: './static/'
|
||||
}
|
||||
},
|
||||
'svgo-loader'
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif)(\?.*)?$/,
|
||||
type: 'asset',
|
||||
generator: {
|
||||
filename: 'images/[name].[contenthash:8][ext]'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
|
||||
type: 'asset/resource',
|
||||
generator: {
|
||||
filename: 'media/[name].[contenthash:8][ext]'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
||||
type: 'asset/resource',
|
||||
generator: {
|
||||
filename: 'fonts/[name].[contenthash:8][ext]'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.md$/,
|
||||
type: 'asset/source'
|
||||
}
|
||||
]
|
||||
},
|
||||
node: {
|
||||
__dirname: !isProduction,
|
||||
__filename: !isProduction
|
||||
},
|
||||
plugins: [
|
||||
new ESLintPlugin({
|
||||
cache: !isProduction,
|
||||
extensions: ['js', 'vue'],
|
||||
files: [
|
||||
'src',
|
||||
'test'
|
||||
],
|
||||
exclude: [
|
||||
'node_modules'
|
||||
],
|
||||
emitError: true,
|
||||
failOnError: true,
|
||||
// NB: Threads must be disabled, otherwise no errors are emitted.
|
||||
threads: false,
|
||||
formatter: require('eslint-friendly-formatter'),
|
||||
context: path.resolve(__dirname, '../'),
|
||||
overrideConfigFile: '.eslintrc.js'
|
||||
}),
|
||||
new SpritePlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: path.resolve(__dirname, '../src/index.ejs'),
|
||||
minify: {
|
||||
collapseWhitespace: true,
|
||||
removeAttributeQuotes: true,
|
||||
removeComments: true,
|
||||
minifyJS: true,
|
||||
minifyCSS: true
|
||||
},
|
||||
isBrowser: false,
|
||||
isDevelopment: !isProduction,
|
||||
nodeModules: !isProduction
|
||||
? path.resolve(__dirname, '../node_modules')
|
||||
: false
|
||||
}),
|
||||
new webpack.DefinePlugin(getRendererEnvironmentDefinitions()),
|
||||
// Use node http request instead axios's XHR adapter.
|
||||
new webpack.NormalModuleReplacementPlugin(
|
||||
/.+[\/\\]node_modules[\/\\]axios[\/\\]lib[\/\\]adapters[\/\\]xhr\.js$/,
|
||||
'http.js'
|
||||
),
|
||||
new VueLoaderPlugin()
|
||||
],
|
||||
cache: false,
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
libraryTarget: 'commonjs2',
|
||||
path: path.join(__dirname, '../dist/electron'),
|
||||
assetModuleFilename: 'assets/[name].[contenthash:8][ext]',
|
||||
asyncChunks: true
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'main': path.join(__dirname, '../src/main'),
|
||||
'@': path.join(__dirname, '../src/renderer'),
|
||||
'common': path.join(__dirname, '../src/common'),
|
||||
'muya': path.join(__dirname, '../src/muya'),
|
||||
snapsvg: path.join(__dirname, '../src/muya/lib/assets/libs/snap.svg-min.js'),
|
||||
'vue$': 'vue/dist/vue.esm.js'
|
||||
},
|
||||
extensions: ['.js', '.vue', '.json', '.css', '.node']
|
||||
},
|
||||
target: 'electron-renderer'
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust rendererConfig for development settings
|
||||
*/
|
||||
if (!isProduction) {
|
||||
rendererConfig.cache = { type: 'memory' }
|
||||
// NOTE: Caching between builds is currently not possible because all SVGs are invalid on second build due to svgo-loader.
|
||||
// rendererConfig.cache = {
|
||||
// name: 'renderer-dev',
|
||||
// type: 'filesystem'
|
||||
// }
|
||||
rendererConfig.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
'__static': `"${path.join(__dirname, '../static').replace(/\\/g, '\\\\')}"`
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test' &&
|
||||
!process.env.MARKTEXT_DEV_HIDE_BROWSER_ANALYZER) {
|
||||
rendererConfig.plugins.push(
|
||||
new BundleAnalyzerPlugin()
|
||||
)
|
||||
}
|
||||
|
||||
// Fix debugger breakpoints
|
||||
if (!isProduction && process.env.MARKTEXT_BUILD_VSCODE_DEBUG) {
|
||||
rendererConfig.devtool = 'inline-source-map'
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust rendererConfig for production settings
|
||||
*/
|
||||
if (isProduction) {
|
||||
rendererConfig.devtool = 'nosources-source-map'
|
||||
rendererConfig.mode = 'production'
|
||||
rendererConfig.optimization.minimize = true
|
||||
|
||||
rendererConfig.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.UNSPLASH_ACCESS_KEY': JSON.stringify(process.env.UNSPLASH_ACCESS_KEY)
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
// Options similar to the same options in webpackOptions.output
|
||||
// both options are optional
|
||||
filename: '[name].[contenthash].css',
|
||||
chunkFilename: '[id].[contenthash].css'
|
||||
}),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: path.join(__dirname, '../static'),
|
||||
to: path.join(__dirname, '../dist/electron/static'),
|
||||
globOptions: {
|
||||
ignore: ['.*']
|
||||
}
|
||||
},
|
||||
{
|
||||
from: path.resolve(__dirname, '../node_modules/codemirror/mode/*/*').replace(/\\/g, '/'),
|
||||
to: path.join(__dirname, '../dist/electron/codemirror/mode/[name]/[name][ext]')
|
||||
}
|
||||
]
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = rendererConfig
|
||||
@ -1,5 +0,0 @@
|
||||
test/unit/coverage/**
|
||||
test/unit/*.js
|
||||
test/e2e/*.js
|
||||
src/renderer/assets/symbolIcon/index.js
|
||||
src/muya/lib/assets/libs/*.js
|
||||
@ -1,64 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser',
|
||||
ecmaVersion: 11,
|
||||
ecmaFeatures: {
|
||||
impliedStrict: true
|
||||
},
|
||||
sourceType: 'module'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
es6: true,
|
||||
node: true
|
||||
},
|
||||
extends: [
|
||||
'standard',
|
||||
'eslint:recommended',
|
||||
'plugin:vue/base',
|
||||
'plugin:import/errors',
|
||||
'plugin:import/warnings'
|
||||
],
|
||||
globals: {
|
||||
__static: true
|
||||
},
|
||||
plugins: ['html', 'vue'],
|
||||
rules: {
|
||||
// Two spaces but disallow semicolons
|
||||
indent: ['error', 2, { 'SwitchCase': 1, 'ignoreComments': true }],
|
||||
semi: [2, 'never'],
|
||||
'no-return-await': 'error',
|
||||
'no-return-assign': 'error',
|
||||
'no-new': 'error',
|
||||
// allow paren-less arrow functions
|
||||
'arrow-parens': 'off',
|
||||
// allow console
|
||||
'no-console': 'off',
|
||||
// allow debugger during development
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'require-atomic-updates': 'off',
|
||||
// TODO: fix these errors someday
|
||||
'prefer-const': 'off',
|
||||
'no-mixed-operators': 'off',
|
||||
'no-prototype-builtins': 'off'
|
||||
},
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
alias: {
|
||||
map: [
|
||||
['common', './src/common'],
|
||||
// Normally only valid for renderer/
|
||||
['@', './src/renderer'],
|
||||
['muya', './src/muya']
|
||||
],
|
||||
extensions: ['.js', '.vue', '.json', '.css', '.node']
|
||||
}
|
||||
}
|
||||
},
|
||||
ignorePatterns: [
|
||||
'node_modules',
|
||||
'src/muya/dist/**/*',
|
||||
'src/muya/webpack.config.js'
|
||||
]
|
||||
}
|
||||
@ -1,74 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
education, socio-economic status, nationality, personal appearance, race,
|
||||
religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at ransixi@gmail.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
patreon: ranluo
|
||||
open_collective: marktext
|
||||
custom: https://paypal.me/ranluo?locale.x=zh_XC
|
||||
@ -1,40 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Create a bug report to help us improve
|
||||
---
|
||||
|
||||
<!--
|
||||
- Please search for issues that matches the one you want to file and use the thumbs up emoji.
|
||||
- Please make sure your application version is up to date.
|
||||
-->
|
||||
|
||||
### Description
|
||||
|
||||
<!-- Description of the bug -->
|
||||
|
||||
- [ ] Can you reproduce the issue? <!-- no: `[ ]` or yes: `[x]` -->
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
<!-- Steps how the issue occurred. -->
|
||||
|
||||
1. [First step]
|
||||
2. [Second step]
|
||||
3. [and so on...]
|
||||
|
||||
**Expected behavior:**
|
||||
|
||||
<!-- What you expected to happen -->
|
||||
|
||||
**Actual behavior:**
|
||||
|
||||
<!-- What actually happened -->
|
||||
|
||||
**Link to an example: [optional]**
|
||||
|
||||
<!-- If you're reporting a bug that's not reproducible, or it's hard to description, please paste a screenshot of reproducing this issue - gif format is appropriate -->
|
||||
|
||||
### Versions
|
||||
|
||||
- MarkText version:
|
||||
- Operating system:
|
||||
@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for MarkText
|
||||
---
|
||||
|
||||
<!--
|
||||
- Please search for issues that matches the one you want to file and use the thumbs up emoji.
|
||||
-->
|
||||
|
||||
### Describe your feature request
|
||||
|
||||
<!-- Describe your feature you would like -->
|
||||
|
||||
### What problem does this feature solve? [optional]
|
||||
|
||||
<!-- Describe what problem does this feature solve -->
|
||||
|
||||
### Additional context [optional]
|
||||
|
||||
<!-- Any other context or screenshots about the feature request -->
|
||||
@ -1,8 +0,0 @@
|
||||
---
|
||||
name: Question
|
||||
about: Ask a question about MarkText
|
||||
---
|
||||
|
||||
### Question description
|
||||
|
||||
<!-- Ask your question here -->
|
||||
@ -1,16 +0,0 @@
|
||||
<!-- Please change the Answers in the table below
|
||||
to reflect the contents of your pull request. -->
|
||||
|
||||
| Q | A
|
||||
| ----------------- | ---
|
||||
| Bug fix? | yes/no
|
||||
| New feature? | yes/no
|
||||
| Breaking changes? | yes/no
|
||||
| Deprecations? | yes/no
|
||||
| New tests added? | yes/not needed
|
||||
| Fixed tickets | Fixes #ticket number (set to none if no tickets are fixed, repeat template for each ticket fixed)
|
||||
| License | MIT
|
||||
|
||||
### Description
|
||||
|
||||
[Description of the bug or feature]
|
||||
@ -1,151 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master, develop ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches: [ main, master, develop ]
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
|
||||
jobs:
|
||||
unix:
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: false
|
||||
timeout-minutes: 45
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-11, ubuntu-latest]
|
||||
|
||||
env:
|
||||
DISPLAY: ":99.0"
|
||||
# MARKTEXT_IS_STABLE: 1
|
||||
MARKTEXT_EXIT_ON_ERROR: 1
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: yarn.lock
|
||||
|
||||
- name: Install build dependencies
|
||||
if: runner.os == 'Linux'
|
||||
# electron-builder | keyboard-layout | keytar | fontmanager
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
sudo apt-get install -y icnsutils graphicsmagick xz-utils libx11-dev libxkbfile-dev gnome-keyring libsecret-1-dev libfontconfig-dev
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2
|
||||
id: cacheNodeModules
|
||||
with:
|
||||
path: ${{ github.workspace }}/node_modules
|
||||
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node_modules-cache-v1-
|
||||
|
||||
- name: Cache Electron
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.HOME }}/.cache/electron
|
||||
key: ${{ runner.os }}-electron-cache-v1-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
||||
|
||||
- name: Cache Electron-Builder
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.HOME }}/.cache//electron-builder
|
||||
key: ${{ runner.os }}-electron-builder-cache-v1-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: yarn install --check-files --frozen-lockfile
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
yarn run lint
|
||||
yarn run validate-licenses
|
||||
|
||||
- name: Run unit and E2E tests
|
||||
uses: GabrielBB/xvfb-action@v1
|
||||
with:
|
||||
run: yarn run test
|
||||
|
||||
- name: Build
|
||||
run: yarn build:bin
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
continue-on-error: false
|
||||
timeout-minutes: 45
|
||||
|
||||
env:
|
||||
# MARKTEXT_IS_STABLE: 1
|
||||
MARKTEXT_EXIT_ON_ERROR: 1
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: yarn.lock
|
||||
|
||||
# Workaround: Fix native build failure due to outdated node-gyp version.
|
||||
- name: Fix node-gyp
|
||||
run: |
|
||||
npm install --global node-gyp@latest
|
||||
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
|
||||
node-gyp install
|
||||
shell: pwsh
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2
|
||||
id: cacheNodeModules
|
||||
with:
|
||||
path: ${{ github.workspace }}\node_modules
|
||||
key: ${{ runner.os }}-node_modules-cache-v2-${{ hashFiles(format('{0}{1}', github.workspace, '\yarn.lock')) }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node_modules-cache-v2-
|
||||
|
||||
- name: Cache Electron
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.LOCALAPPDATA }}\electron\Cache
|
||||
key: ${{ runner.os }}-electron-cache-v2-${{ hashFiles(format('{0}{1}', github.workspace, '\yarn.lock')) }}
|
||||
|
||||
- name: Cache Electron-Builder
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.LOCALAPPDATA }}\electron-builder\cache
|
||||
key: ${{ runner.os }}-electron-builder-cache-v2-${{ hashFiles(format('{0}{1}', github.workspace, '\yarn.lock')) }}
|
||||
|
||||
- name: Install dependencies
|
||||
# Windows worker fail sometimes because a module cannot be found.
|
||||
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: yarn install --check-files --frozen-lockfile
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
yarn run lint
|
||||
yarn run validate-licenses
|
||||
|
||||
- name: Run unit and E2E tests
|
||||
run: yarn run test
|
||||
|
||||
- name: Build
|
||||
run: yarn build:bin
|
||||
@ -1,177 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'release-v*'
|
||||
|
||||
jobs:
|
||||
unix:
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: false
|
||||
timeout-minutes: 45
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-11, ubuntu-latest]
|
||||
|
||||
env:
|
||||
DISPLAY: ":99.0"
|
||||
MARKTEXT_IS_STABLE: 1
|
||||
MARKTEXT_EXIT_ON_ERROR: 1
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: yarn.lock
|
||||
|
||||
- name: Install build dependencies
|
||||
if: runner.os == 'Linux'
|
||||
# electron-builder | keyboard-layout | keytar | fontmanager | RPM on Ubuntu
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
sudo apt-get install -y icnsutils graphicsmagick xz-utils libx11-dev libxkbfile-dev gnome-keyring libsecret-1-dev libfontconfig-dev rpm
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ github.workspace }}/node_modules
|
||||
key: ${{ runner.os }}-node_modules-cache-v2-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node_modules-cache-v2-
|
||||
|
||||
- name: Cache Electron
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.HOME }}/.cache/electron
|
||||
key: ${{ runner.os }}-electron-cache-v2-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
||||
|
||||
- name: Cache Electron-Builder
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.HOME }}/.cache//electron-builder
|
||||
key: ${{ runner.os }}-electron-builder-cache-v2-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --check-files --frozen-lockfile
|
||||
|
||||
- name: Strip ripgrep on Linux
|
||||
if: runner.os == 'Linux'
|
||||
run: strip node_modules/vscode-ripgrep/bin/rg
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
yarn run lint
|
||||
yarn run validate-licenses
|
||||
|
||||
- name: Run unit and E2E tests
|
||||
uses: GabrielBB/xvfb-action@v1
|
||||
with:
|
||||
run: yarn run test
|
||||
|
||||
- name: Build and release
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "Linux" ]; then
|
||||
yarn run release:linux --publish always
|
||||
elif [ "$RUNNER_OS" == "macOS" ]; then
|
||||
yarn run release:mac --publish always
|
||||
else
|
||||
echo "$RUNNER_OS not supported"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Calculate checksums
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sha256sum build/marktext-x64.tar.gz
|
||||
sha256sum build/marktext-x86_64.AppImage
|
||||
sha256sum build/marktext-*.deb
|
||||
sha256sum build/marktext-*.rpm
|
||||
shell: bash
|
||||
|
||||
- name: Calculate checksums
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
shasum -a 256 build/marktext-arm64-mac.zip
|
||||
shasum -a 256 build/marktext-x64-mac.zip
|
||||
shasum -a 256 build/marktext-arm64.dmg
|
||||
shasum -a 256 build/marktext-x64.dmg
|
||||
shell: bash
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
continue-on-error: false
|
||||
timeout-minutes: 45
|
||||
|
||||
env:
|
||||
MARKTEXT_IS_STABLE: 1
|
||||
MARKTEXT_EXIT_ON_ERROR: 1
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: yarn.lock
|
||||
|
||||
# Workaround: Fix native build failure due to outdated node-gyp version.
|
||||
- name: Fix node-gyp
|
||||
run: |
|
||||
npm install --global node-gyp@latest
|
||||
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
|
||||
node-gyp install
|
||||
shell: pwsh
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ github.workspace }}\node_modules
|
||||
key: ${{ runner.os }}-node_modules-cache-v2-${{ hashFiles(format('{0}{1}', github.workspace, '\yarn.lock')) }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node_modules-cache-v2-
|
||||
|
||||
- name: Cache Electron
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.LOCALAPPDATA }}\electron\Cache
|
||||
key: ${{ runner.os }}-electron-cache-v2-${{ hashFiles(format('{0}{1}', github.workspace, '\yarn.lock')) }}
|
||||
|
||||
- name: Cache Electron-Builder
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.LOCALAPPDATA }}\electron-builder\cache
|
||||
key: ${{ runner.os }}-electron-builder-cache-v2-${{ hashFiles(format('{0}{1}', github.workspace, '\yarn.lock')) }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --check-files --frozen-lockfile
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
yarn run lint
|
||||
yarn run validate-licenses
|
||||
|
||||
- name: Run unit and E2E tests
|
||||
run: yarn run test
|
||||
|
||||
- name: Build and release
|
||||
run: yarn run release:win --publish always
|
||||
|
||||
- name: Calculate checksums
|
||||
run: |
|
||||
get-filehash -Algorithm SHA256 "build\marktext-setup.exe"
|
||||
get-filehash -Algorithm SHA256 "build\marktext-*-win.zip"
|
||||
shell: pwsh
|
||||
@ -1,17 +0,0 @@
|
||||
.DS_Store
|
||||
dist/
|
||||
*/dist/*
|
||||
build/*
|
||||
static/themes/*
|
||||
src/muya/node_modules/
|
||||
coverage
|
||||
.vscode
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
npm-debug.log.*
|
||||
yarn-error.log
|
||||
thumbs.db
|
||||
!.gitkeep
|
||||
.idea
|
||||
.env
|
||||
.eslintcache
|
||||
@ -1,92 +0,0 @@
|
||||
# MarkText Contributing Guide
|
||||
|
||||
We are really excited that you are interested in contributing to MarkText :tada:. Before submitting your contribution, please make sure to take a moment and read through the following guidelines.
|
||||
|
||||
- [Code of Conduct](.github/CODE_OF_CONDUCT.md)
|
||||
- [Philosophy](#philosophy)
|
||||
- [Issue reporting guidelines](#issue-reporting-guidelines)
|
||||
- [Pull request guidelines](#pull-request-guidelines)
|
||||
- [Where should I start?](#where-should-i-start)
|
||||
- [Quick start](#quick-start)
|
||||
- [Build instructions](#build-instructions)
|
||||
- [Style guide](#style-guide)
|
||||
- [Developer documentation](#developer-documentation)
|
||||
|
||||
## Philosophy
|
||||
|
||||
🔑 Our philosophy is to keep things clean, simple and minimal.
|
||||
MarkText is constantly changing and we want these improvements to align with our philosophy. For example, look at the side bar and tabs; these two panels provide awesome functionality *and* aren't distracting to the user. We'll continue adding more features (like plugins) that can be activated via 'settings' to improve MarkText. This will allow everyone to customize MarkText for their needs and provide a minimal default interface.
|
||||
|
||||
## Issue Reporting Guidelines
|
||||
|
||||
Please search for similar issues before opening an issue and always follow the [issue template](.github/ISSUE_TEMPLATE/). Please review the following Pull Request guidelines before making your own PR.
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
**In *all* Pull Requests:** provide a detailed description of the problem, as well as a demonstration with screen recordings and/or screenshots.
|
||||
|
||||
Please make sure the following is done before submitting a PR:
|
||||
|
||||
- Submit PRs directly to the `develop` branch.
|
||||
- Reference the related issue in the PR comment.
|
||||
- Utilize [JSDoc](https://github.com/jsdoc/jsdoc) for better code documentation.
|
||||
- Ensure all tests pass.
|
||||
- Please lint (`yarn run lint`) your PR.
|
||||
- All PRs need to pass the **CI** before merged. If it fails, please try to solve the issue(s) and feel free to ask for any help.
|
||||
|
||||
If you add new feature:
|
||||
|
||||
- Open a suggestion issue first.
|
||||
- Provide your reasoning on why you want to add this feature.
|
||||
- Submit your PR.
|
||||
|
||||
If you fix a bug:
|
||||
|
||||
- If you are resolving a special issue, please add `fix: #<issue number> <short message>` in your PR title (e.g.`fix: #3899 update entities encoding/decoding`).
|
||||
- Provide a detailed description of the bug in your PR and/or link to the issue.
|
||||
|
||||
### Where should I start?
|
||||
|
||||
A good way to start is to find an [issue](https://github.com/marktext/marktext/issues) labeled as `bug`, `help wanted` or `feature request`. The `good first issue` issues are good for newcomers. Please discuss the solution for larger issues first and after the final solution is approved by the MarkText members, you can submit/work on the PR. For small changes you can directly open a PR.
|
||||
|
||||
Other ways to help:
|
||||
|
||||
- Documentation
|
||||
- Translation (currently unavailable)
|
||||
- Design icons and logos
|
||||
- Improve the UI
|
||||
- Write tests for MarkText
|
||||
- Share your thoughts! We want to hear about features you think are missing, any bugs you find, and why you :heart: MarkText.
|
||||
|
||||
## Quick start
|
||||
|
||||
1. Fork the repository.
|
||||
2. Clone your fork: `git clone git@github.com:<username>/marktext.git`
|
||||
3. Create a feature branch: `git checkout -b feature`
|
||||
4. Make your changes and push your branch.
|
||||
5. Create a PR against `develop` and describe your changes.
|
||||
|
||||
**Rebase your PR:**
|
||||
|
||||
If there are conflicts or you want to update your local branch, please do the following:
|
||||
|
||||
1. `git fetch upstream`
|
||||
2. `git rebase upstream/develop`
|
||||
3. Please [resolve](https://help.github.com/articles/resolving-merge-conflicts-after-a-git-rebase/) all conflicts and force push your feature branch: `git push -f`
|
||||
|
||||
### Build Instructions
|
||||
|
||||
🔗 [Build Instructions](docs/dev/BUILD.md)
|
||||
|
||||
### Style Guide
|
||||
|
||||
You can run ESLint (`yarn run lint`) to help you to follow the style guide.
|
||||
|
||||
- ES6 and "best practices"
|
||||
- 2 space indent
|
||||
- no semicolons
|
||||
- documentation: [JSDoc](https://github.com/jsdoc/jsdoc)
|
||||
|
||||
## Developer Documentation
|
||||
|
||||
Please [click here](docs/dev/README.md) for more details.
|
||||
@ -1,22 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-present Luo Ran
|
||||
Copyright (c) 2018-present MarkText Contributors
|
||||
|
||||
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.
|
||||
@ -1,269 +0,0 @@
|
||||
<p align="center"><img src="static/logo-small.png" alt="MarkText" width="100" height="100"></p>
|
||||
|
||||
<h1 align="center">MarkText</h1>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://twitter.com/intent/tweet?via=marktextme&url=https://github.com/marktext/marktext/&text=What%20do%20you%20want%20to%20say%20to%20app?&hashtags=happyMarkText">
|
||||
<img src="https://img.shields.io/twitter/url/https/github.com/marktext/marktext.svg?style=for-the-badge" alt="twitter">
|
||||
</a>
|
||||
</div>
|
||||
<div align="center">
|
||||
<strong>:high_brightness: Next generation markdown editor :crescent_moon:</strong><br>
|
||||
A simple and elegant open-source markdown editor that focused on speed and usability.<br>
|
||||
<sub>Available for Linux, macOS and Windows.</sub>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div align="center">
|
||||
<!-- License -->
|
||||
<a href="LICENSE">
|
||||
<img src="https://img.shields.io/github/license/marktext/marktext.svg" alt="LICENSE">
|
||||
</a>
|
||||
<!-- Build Status -->
|
||||
<a href="https://travis-ci.org/marktext/marktext/">
|
||||
<img src="https://travis-ci.org/marktext/marktext.svg?branch=master" alt="build">
|
||||
</a>
|
||||
<a href="https://ci.appveyor.com/project/marktext/marktext/branch/master">
|
||||
<img src="https://ci.appveyor.com/api/projects/status/l4gxgydj0i95hmxg/branch/master?svg=true" alt="build">
|
||||
</a>
|
||||
<!-- Downloads total -->
|
||||
<a href="https://github.com/marktext/marktext/releases">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/total.svg" alt="total download">
|
||||
</a>
|
||||
<!-- Downloads latest release -->
|
||||
<a href="https://github.com/marktext/marktext/releases/latest">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/v0.17.1/total.svg" alt="latest download">
|
||||
</a>
|
||||
<!-- sponsors -->
|
||||
<a href="https://opencollective.com/marktext">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors/badge.svg?label=SilverSponsors&color=brightgreen" alt="sponsors">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<h3>
|
||||
<a href="https://github.com/marktext/marktext">
|
||||
Website
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#features">
|
||||
Features
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#download-and-installation">
|
||||
Downloads
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#development">
|
||||
Development
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#contribution">
|
||||
Contribution
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>Translations:</sub>
|
||||
<a href="docs/i18n/zh_cn.md#readme">
|
||||
<span>:cn:</span>
|
||||
</a>
|
||||
<a href="docs/i18n/zh_tw.md#readme">
|
||||
<span>:taiwan:</span>
|
||||
</a>
|
||||
<a href="docs/i18n/pl.md#readme">
|
||||
<span>:poland:</span>
|
||||
</a>
|
||||
<a href="docs/i18n/ja.md#readme">
|
||||
<span>:jp:</span>
|
||||
</a>
|
||||
<a href="docs/i18n/french.md#readme">
|
||||
<span>:fr:</span>
|
||||
</a>
|
||||
<a href="docs/i18n/tr.md#readme">
|
||||
<span>:tr:</span>
|
||||
</a>
|
||||
<a href="docs/i18n/spanish.md#readme">
|
||||
<span>:es:</span>
|
||||
</a>
|
||||
<a href="docs/i18n/pt.md#readme">
|
||||
<span>:portugal:</span>
|
||||
</a>
|
||||
<a href="docs/i18n/ko.md#readme">
|
||||
<span>:kr:</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>This Markdown editor that could. Built with ❤︎ by
|
||||
<a href="https://github.com/Jocs">Jocs</a> and
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors">
|
||||
contributors
|
||||
</a>
|
||||
.
|
||||
</sub>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<h2 align="center">Supporting MarkText</h2>
|
||||
|
||||
MarkText is an MIT licensed open source project, and the latest version will always be downloadable for free from the GitHub release page. MarkText is still in development, and its development is inseparable from all sponsors. I hope you join them:
|
||||
|
||||
- [Become a backer or sponsor on Patreon](https://www.patreon.com/ranluo) or [One time donation](https://github.com/Jocs/sponsor.me)
|
||||
- [Become a backer or sponsor on Open Collective](https://opencollective.com/marktext)
|
||||
|
||||
##### What's the difference between Patreon and Open Collective?
|
||||
|
||||
Patreon: Funds will be directly sponsored to Luo Ran (@jocs) who created MarkText and continues to maintain it.
|
||||
Open Collective: All expenses are transparent. The funds will be used for the development and maintenance of MarkText, funding online and offline activities, and acquiring other necessary resources.
|
||||
Names and company logos of all sponsors (from both Patreon and Open Collective) will appear on the official website for MarkText and in its README.md file.
|
||||
|
||||
**Looking for MarkText-like editing with cloud storage? try Inkio**
|
||||
|
||||
<a href="https://inkio.me/" target="_blank">
|
||||
<img src="https://inkio.me/static/media/logo.35f605dc31b1a0615087.png" width="100">
|
||||
</a>
|
||||
|
||||
**Platinum Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/platinum-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Gold Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/gold-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Silver Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Bronze Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/bronze-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Backers**
|
||||
|
||||
<a href="https://opencollective.com/marktext#backers">
|
||||
<img src="https://opencollective.com/marktext/tiers/backer.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
## Screenshot
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- Realtime preview (WYSIWYG) and a clean and simple interface to get a distraction-free writing experience.
|
||||
- Support [CommonMark Spec](https://spec.commonmark.org/0.29/), [GitHub Flavored Markdown Spec](https://github.github.com/gfm/) and selective support [Pandoc markdown](https://pandoc.org/MANUAL.html#pandocs-markdown).
|
||||
- Markdown extensions such as math expressions (KaTeX), front matter and emojis.
|
||||
- Support paragraphs and inline style shortcuts to improve your writing efficiency.
|
||||
- Output **HTML** and **PDF** files.
|
||||
- Various themes: **Cadmium Light**, **Material Dark** etc.
|
||||
- Various editing modes: **Source Code mode**, **Typewriter mode**, **Focus mode**.
|
||||
- Paste images directly from clipboard.
|
||||
|
||||
<h4 align="center">:crescent_moon:themes:high_brightness:</h4>
|
||||
|
||||
| Cadmium Light | Dark |
|
||||
|:-------------------------------------------------:|:-----------------------------------------------:|
|
||||
|  |  |
|
||||
| Graphite Light | Material Dark |
|
||||
|  |  |
|
||||
| Ulysses Light | One Dark |
|
||||
|  |  |
|
||||
|
||||
<h4 align="center">:smile_cat:Edit modes:dog:</h4>
|
||||
|
||||
| Source Code | Typewriter | Focus |
|
||||
|:--------------------:|:------------------------:|:-------------------:|
|
||||
|  |  |  |
|
||||
|
||||
## Why make another editor?
|
||||
|
||||
1. I love writing. I have used a lot of markdown editors, yet there is still not an editor that can fully meet my needs. I don't like to be disturbed when I write by some unbearable bug. **MarkText** uses virtual DOM to render pages which has the added benefits of being highly efficient and being open source. That way anyone who loves markdown and writing can use MarkText.
|
||||
2. As mentioned above, **MarkText** is completely free and open source and will be open source forever. We hope that all markdown lovers will contribute their own code and help develop **MarkText** into a popular markdown editor.
|
||||
3. There are many markdown editors and all have their own merits, some have features which others don't. It's difficult to satisfy each markdown users' needs but we hope **MarkText** will be able to satisfy each markdown user as much as possible. Although the latest **MarkText** is still not perfect, we will try to make it as best as we possibly can.
|
||||
|
||||
## Download and Installation
|
||||
|
||||

|
||||
|
||||
|  |  |  |
|
||||
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
| [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x64.dmg) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-setup.exe) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x86_64.AppImage) |
|
||||
|
||||
Want to see new features of the latest version? Please refer to [CHANGELOG](.github/CHANGELOG.md).
|
||||
|
||||
#### macOS
|
||||
|
||||
You can either download the latest `marktext-%version%.dmg` from the [release page](https://github.com/marktext/marktext/releases/latest) or install MarkText using [**homebrew cask**](https://github.com/caskroom/homebrew-cask). To use Homebrew-Cask you just need to have [Homebrew](https://brew.sh/) installed.
|
||||
|
||||
```bash
|
||||
brew install --cask mark-text
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
Simply download and install MarkText via setup wizard (`marktext-setup-%version%.exe`) and choose whether to install per-user or machine wide. Alternatively, install MarkText using a package manager such as [Chocolatey](https://chocolatey.org/) or [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/).
|
||||
|
||||
To use Chocolatey, you need to have [Chocolatey](https://chocolatey.org/install) installed:
|
||||
|
||||
```bash
|
||||
choco install marktext
|
||||
```
|
||||
|
||||
To use Winget, you need to have [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/#install-winget) installed:
|
||||
|
||||
```bash
|
||||
winget install marktext
|
||||
```
|
||||
|
||||
#### Linux
|
||||
|
||||
Please follow the [Linux installation instructions](docs/LINUX.md).
|
||||
|
||||
#### Other
|
||||
|
||||
All binaries for Linux, macOS and Windows can be downloaded from the [release page](https://github.com/marktext/marktext/releases/latest). If a version is unavailable for your system, then please open an [issue](https://github.com/marktext/marktext/issues).
|
||||
|
||||
## Development
|
||||
|
||||
If you wish to build MarkText yourself, please check out our [build instructions](docs/dev/BUILD.md).
|
||||
|
||||
- [User documentation](docs/README.md)
|
||||
- [Developer documentation](docs/dev/README.md)
|
||||
|
||||
If you have any questions regarding MarkText, you are welcome to write an issue. When doing so please use the default format found when opening an issue. Of course, if you submit a PR directly, it will be greatly appreciated.
|
||||
|
||||
## Integrations
|
||||
|
||||
- [Alfred Workflow](http://www.packal.org/workflow/mark-text): A Workflow for the macOS app Alfred: Use "mt" to open files/folder with MarkText.
|
||||
|
||||
## Contribution
|
||||
|
||||
MarkText is in development, please make sure to read the [Contributing Guide](CONTRIBUTING.md) before making a pull request. Want to add some features to MarkText? Refer to our [roadmap](https://github.com/marktext/marktext/projects?type=classic) and open issues.
|
||||
|
||||
|
||||
## Contributors
|
||||
|
||||
Thank you to all the people who have already contributed to MarkText[[contributors](https://github.com/marktext/marktext/graphs/contributors)].
|
||||
|
||||
Special thanks to @[Yasujizr](https://github.com/Yasujizr) who designed the MarkText logo.
|
||||
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors"><img src="https://opencollective.com/marktext/contributors.svg?width=890" /></a>
|
||||
|
||||
## License
|
||||
|
||||
[**MIT**](LICENSE).
|
||||
|
||||
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fmarktext%2Fmarktext?ref=badge_large)
|
||||
@ -1,56 +0,0 @@
|
||||
const proposalClassProperties = require('@babel/plugin-proposal-class-properties')
|
||||
const syntaxClassProperties = require('@babel/plugin-syntax-class-properties')
|
||||
const transformRuntime = require('@babel/plugin-transform-runtime')
|
||||
const syntaxDynamicImport = require('@babel/plugin-syntax-dynamic-import')
|
||||
const functionBind = require('@babel/plugin-proposal-function-bind')
|
||||
const exportDefault = require('@babel/plugin-proposal-export-default-from')
|
||||
const isTanbul = require('babel-plugin-istanbul')
|
||||
const component = require('babel-plugin-component')
|
||||
const presetEnv = require('@babel/preset-env')
|
||||
|
||||
const presetsHash = {
|
||||
test: [
|
||||
[presetEnv,
|
||||
{
|
||||
targets: { 'node': 16 }
|
||||
}]
|
||||
],
|
||||
main: [
|
||||
[presetEnv,
|
||||
{
|
||||
targets: { 'node': 16 }
|
||||
}]
|
||||
],
|
||||
renderer: [
|
||||
[presetEnv,
|
||||
{
|
||||
useBuiltIns: false,
|
||||
targets: {
|
||||
electron: require('electron/package.json').version,
|
||||
node: 16
|
||||
}
|
||||
}]
|
||||
]
|
||||
}
|
||||
|
||||
module.exports = function (api) {
|
||||
const plugins = [ proposalClassProperties, syntaxClassProperties, transformRuntime, syntaxDynamicImport, functionBind, exportDefault ]
|
||||
const env = api.env()
|
||||
const presets = presetsHash[env]
|
||||
|
||||
if (env === 'test') {
|
||||
plugins.push(isTanbul)
|
||||
} else if (env === 'renderer') {
|
||||
plugins.push(
|
||||
[component, {
|
||||
style: false,
|
||||
libraryName: 'element-ui'
|
||||
}
|
||||
])
|
||||
}
|
||||
|
||||
return {
|
||||
presets,
|
||||
plugins
|
||||
}
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
# Application Data Directory
|
||||
|
||||
The per-user application data directory is located in the following directory:
|
||||
|
||||
- `%APPDATA%\marktext` on Windows
|
||||
- `$XDG_CONFIG_HOME/marktext` or `~/.config/marktext` on Linux
|
||||
- `~/Library/Application Support/marktext` on macOS
|
||||
|
||||
When [portable mode](PORTABLE.md) is enabled, the directory location is either the `--user-data-dir` parameter or `marktext-user-data` directory.
|
||||
@ -1,67 +0,0 @@
|
||||
# Basics
|
||||
|
||||
## Getting started
|
||||
|
||||
MarkText is a realtime preview editor for markdown with various markdown extensions. You can simply write and edit text and MarkText hides all unnecessary syntax elements. When you first start MarkText an empty editor window is shown. You can see [key bindings](KEYBINDINGS.md) or command palette (<kbd>CmdOrCtrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>) for all available commands or just type `@` to get an overlay with available text elements. MarkText provides a minimal and simple interface and in the next sections you can learn more about the interface and features.
|
||||
|
||||

|
||||
|
||||
### Interface
|
||||
|
||||
#### Toggle sidebar
|
||||
|
||||
The sidebar consists of three panels and you can toggle the sidebar by pressing <kbd>CmdOrCtrl</kbd>+<kbd>J</kbd>:
|
||||
|
||||
- Filesystem explorer (tree view) of the opened root directory
|
||||
- Find in files
|
||||
- Table of contents of the selected tab
|
||||
|
||||
#### Toggle tabs
|
||||
|
||||
MarkText can be used as a single editor but opens all files in a separate tab. Tabs can be toggled via <kbd>CmdOrCtrl</kbd>+<kbd>Alt</kbd>+<kbd>B</kbd> and reordered by drag and drop.
|
||||
|
||||
**Want to use tabs without showing them?**
|
||||
|
||||
You can hide tabs and use key bindings such as <kbd>CmdOrCtrl</kbd>+<kbd>Tab</kbd> to cycle through tabs or the sidebar *opened files* panel.
|
||||
|
||||

|
||||
|
||||
#### Switch between editor modes
|
||||
|
||||
You can use <kbd>CmdOrCtrl</kbd>+<kbd>Alt</kbd>+<kbd>S</kbd> to switch between the preview and source-code editor. The realtime preview editor is the default editor with many features. A detailed overview of all features can be found [here](EDITING.md).
|
||||
|
||||
#### Typewriter and focus mode
|
||||
|
||||
Use <kbd>CmdOrCtrl</kbd>+<kbd>Shift</kbd>+<kbd>F</kbd> to enter distraction free focus mode or <kbd>CmdOrCtrl</kbd>+<kbd>Alt</kbd>+<kbd>T</kbd> for typewriter.
|
||||
|
||||
## Open and modify markdown files
|
||||
|
||||
### Open your first file
|
||||
|
||||
You can use the menu `File -> Open File` or press <kbd>CmdOrCtrl</kbd>+<kbd>O</kbd> to open a file dialog to choose a markdown file. Another way to is to launch MarkText with directories or files via command line.
|
||||
|
||||
### Save your edited file
|
||||
|
||||
After some modifications you can save your file via <kbd>CmdOrCtrl</kbd>+<kbd>S</kbd> or use *save as* to use a different file name.
|
||||
|
||||
### Open a directory
|
||||
|
||||
MarkText also has support to open a directory via <kbd>CmdOrCtrl</kbd>+<kbd>Shift</kbd>+<kbd>O</kbd> or the sidebar button *Open Folder*. After opening a directory all files and directories are shown in the sidebar tree view. The tree view allows you to open further files, browse and modify files or directories inside the opened root directory. Above the tree view are all opened files located. You can also use quick open (<kbd>CmdOrCtrl</kbd>+<kbd>P</kbd>) to quickly open a file from the opened root directory or editor and navigate via arrow keys or select a file via mouse. To view another sidebar panel like find in files click on the left sidebar icons.
|
||||
|
||||

|
||||
|
||||
## Themes
|
||||
|
||||
You can change the application theme by clicking on an entry under the themes application menu.
|
||||
|
||||
## Preferences
|
||||
|
||||
You can control and modify all preferences in the settings window or edit `preferences.json` in the [application data directory](APPLICATION_DATA_DIRECTORY.md). Detailed information about the preference file can be found [here](PREFERENCES.md).
|
||||
|
||||
- General application settings
|
||||
- Settings that control the editor appearance
|
||||
- Markdown related settings
|
||||
- The application theme
|
||||
- Options how images are handled
|
||||
|
||||

|
||||
@ -1,22 +0,0 @@
|
||||
# Command Line Interface
|
||||
|
||||
```
|
||||
Usage: marktext [commands] [path ...]
|
||||
|
||||
Available commands:
|
||||
|
||||
--debug Enable debug mode
|
||||
--safe Disable plugins and other user configuration
|
||||
-n, --new-window Open a new window on second-instance
|
||||
--user-data-dir Change the user data directory
|
||||
--disable-gpu Disable GPU hardware acceleration
|
||||
-v, --verbose Be verbose
|
||||
--version Print version information
|
||||
-h, --help Print this help message
|
||||
```
|
||||
|
||||
`marktext` should point to your installation of MarkText. The exact location will vary from platform to platform. On macOS, you can create a convenient alias like:
|
||||
|
||||
```sh
|
||||
alias marktext="/Applications/Mark\ Text.app/Contents/MacOS/Mark\ Text"
|
||||
```
|
||||
@ -1,119 +0,0 @@
|
||||
# Editing in Depth
|
||||
|
||||
Let us take a look at the realtime editor and editing features.
|
||||
|
||||
## Text manipulation
|
||||
|
||||
MarkText shows you formatted text in realtime while you can simply write and edit text but also use markdown syntax. To improve your writing efficiency there are a lot of key bindings for better text manipulation. In the preferences you can control the editor settings such as font settings, autocompletion and line width.
|
||||
|
||||
## Selections
|
||||
|
||||
You can select text with your mouse cursor, double click on a word or use the keyboard <kbd>Shift</kbd>+<kbd>Arrow Keys</kbd>.
|
||||
|
||||
**Format overlay:**
|
||||
|
||||
The format overlay is a pop up that automatically appears when you're selecting text. You can easily transform text and inline markdown but also remove formatting.
|
||||
|
||||

|
||||
|
||||
- Bold
|
||||
- Italics
|
||||
- Underline
|
||||
- Strikethrough
|
||||
- Inline code
|
||||
- Inline math formulas
|
||||
- Create link
|
||||
- Create image
|
||||
- Remove formatting
|
||||
|
||||
Further overlays are available for emojis, links, images and tables.
|
||||
|
||||
## Deleting
|
||||
|
||||
Do you want to delete headings, lists or tables? Just select the area and press backspace.
|
||||
|
||||
## Brackets and quotes autocompletion
|
||||
|
||||
You can configure MarkText to autocomplete markdown syntax, brackets and quotes. By default `()`, `[]`, `{}`, `**`, `__`, `$$`, `""` and `''` are completed when the first character is typed.
|
||||
|
||||
## Links
|
||||
|
||||
Links are shown by default as normal text but if you click on a link the link is shown as markdown link with title and URL like below:
|
||||
|
||||

|
||||
|
||||
## Formatting
|
||||
|
||||
MarkText will automatically format your markdown document according CommonMark and GitHub Flavored Markdown specification. You can control few settings via preferences such as list indentation.
|
||||
|
||||
## Editing features
|
||||
|
||||
#### Quick insert
|
||||
|
||||
When you start a new line, just type `@` to show a pop up with all available markdown features. Now you can select an entry and the line is transformed into the selected one.
|
||||
|
||||

|
||||
|
||||
#### Line transformer
|
||||
|
||||
You can transform a line into another type by clicking on the highlighted icon in the image below and select `Turn Into`. Furthermore, you can duplicate the selected line, create a paragraph above the selected line or delete the line.
|
||||
|
||||

|
||||
|
||||
#### Table tools
|
||||
|
||||
It's sometimes hard to write and manage tables in markdown. In MarkText you can press <kbd>CmdOrCtrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> to get a table dialog and create a table with variable row and column count. Both row and column count can be changed via the table tools (first icon above the table) later if necessary. You can use all inline styles in a table cell and align the text via table tools at the top of the table.
|
||||
|
||||
**Insert and delete rows and columns:**
|
||||
|
||||
You can insert or delete a new row or column by clicking on an existing cell and click on the menu on the right side for rows or bottom for columns.
|
||||
|
||||

|
||||
|
||||
**Move table cells:**
|
||||
|
||||
You can simply move a row or column by clicking on the cell menu (like above) and dragging it by holding your mouse left-button like this:
|
||||
|
||||

|
||||
|
||||
#### Image tools
|
||||
|
||||

|
||||
|
||||
MarkText provides an image viewer and a pop up to select and label images. You can resize any image by your mouse cursor and changes are applied in realtime. By clicking on an image or writing `![]()` a pop up is automatically shown that allows you to select an image from disk or paste a path or URL. Images can be automatically uploaded to cloud, moved to a relative or absolute path on disk. Even pasting images that are not located on disk is supported and these images are stored in the background. In addition, you can control the image alignment whether inline, left, centered or right.
|
||||
|
||||

|
||||
|
||||
#### Emoji picker
|
||||
|
||||
Instantly add emojis to your markdown document without long searches. During typing, we automatically refresh the list of available emojis.
|
||||
|
||||

|
||||
|
||||
#### Focus mode
|
||||
|
||||

|
||||
|
||||
The focus mode will help you to focus on the currently line only by fading out other lines. To activate the focus mode, simply press <kbd>CmdOrCtrl</kbd>+<kbd>Shift</kbd>+<kbd>F</kbd>.
|
||||
|
||||
#### Typewriter mode
|
||||
|
||||
In typewriter mode, the cursor is always keep in the middle of the editor.
|
||||
|
||||
## File encoding
|
||||
|
||||
MarkText tries to automatically detect the used file encoding and byte-order mark (BOM) when opening a file. The default encoding is UTF-8 that should support all needed characters but can be changed in settings. You can disable automatically encoding detection but then we assume that all files are UTF-8 encoded. The current used encoding can be shown via command palette and also changed there.
|
||||
|
||||
## Line endings
|
||||
|
||||
MarkText automatically analyzes each file and detects the used line ending and can be changed via command palette too.
|
||||
|
||||
## Find and replace
|
||||
|
||||
**Inside the editor:**
|
||||
|
||||
To quickly find a keyword in your document press <kbd>CmdOrCtrl</kbd>+<kbd>F</kbd> to open the search pop up. Now you can search for text or replace the given keyword.
|
||||
|
||||
**Search in opened folder:**
|
||||
|
||||
MarkText provides a build-in filesystem explorer (tree view) with a fast file searcher. Type a keyword in the search bar and select the needed options like regex or case-insensitive search. That's all, now MarkText will search all markdown files in the opened root directory.
|
||||
@ -1,29 +0,0 @@
|
||||
# Export a Document
|
||||
|
||||
MarkText allows you to export a markdown document as PDF and HTML file or to print the document.
|
||||
|
||||
## Options
|
||||
|
||||
### Page options
|
||||
|
||||
You can set the page size, orientation and margin before exporting a document.
|
||||
|
||||
### Style
|
||||
|
||||
Adjust the page style without modify the page theme:
|
||||
|
||||
- Overwrite font family, size and line height.
|
||||
- Auto numbering headings.
|
||||
- Option to show the front matter on the exported document.
|
||||
|
||||
### Theme
|
||||
|
||||
MarkText allows you to select a page theme before exporting. You can learn more about page themes [here](EXPORT_THEMES.md).
|
||||
|
||||
### Header and footer
|
||||
|
||||
You can include a header and/or footer in the exported document if you choose PDF or printing and also adjust the header/footer style. You can select between no, a single or a three cell header in export options. The header and/or footer appear on each page when defined and the header can be multiline but the footer only single line. Unfortunately, page numbering is currently not supported. An example can be seen below.
|
||||
|
||||

|
||||
|
||||

|
||||
@ -1,23 +0,0 @@
|
||||
# Themes (Export)
|
||||
|
||||
MarkText allows you to modify the appearance of the document that you want to export. By default we provide three themes: Academic, GitHub and Liber (writing theme).
|
||||
|
||||
## Install a theme
|
||||
|
||||
You can install a theme by copying the `.css` file to `themes/export/` directory inside the [application data directory](APPLICATION_DATA_DIRECTORY.md) location but you may need to restart MarkText to detect the theme.
|
||||
|
||||
## Create a theme
|
||||
|
||||
MarkText use the GitHub theme as basic style that is always available. A custom theme can add additional styles but have to overwrite the GitHub style to make changes such as font family or the underling for heading. You can see all predefined styles [here](https://github.com/sindresorhus/github-markdown-css/blob/gh-pages/github-markdown.css). An example for custom themes can be found [here](https://github.com/marktext/marktext/blob/develop/src/renderer/assets/themes/export/academic.theme.css) and [here](https://github.com/marktext/marktext/blob/develop/src/renderer/assets/themes/export/liber.theme.css).
|
||||
|
||||
### Theme settings
|
||||
|
||||
A theme currently only have a name (`A-z0-9 -`) that is defined by a CSS comment at the first line like:
|
||||
|
||||
```css
|
||||
/** Liber **/
|
||||
|
||||
.markdown-body {
|
||||
/* ... */
|
||||
}
|
||||
```
|
||||
@ -1,43 +0,0 @@
|
||||
# Frequently Asked Questions (FAQ)
|
||||
|
||||
### What are the supported platforms?
|
||||
|
||||
MarkText is a desktop application and available for:
|
||||
|
||||
- Linux x64 (tested on Debian and Red Hat based distros)
|
||||
- macOS 10.10 x64 or later
|
||||
- Windows 7-10 x86 and x64
|
||||
|
||||
### Is MarkText open-source and free?
|
||||
|
||||
Yes, MarkText is licensed under the [MIT](https://github.com/marktext/marktext/blob/develop/LICENSE) license and completely free for everyone. The source-code is available on [GitHub](https://github.com/marktext/marktext).
|
||||
|
||||
### Can I use MarkText as note management/taking app?
|
||||
|
||||
MarkText is a pure markdown editor without feature such as knowledge management and tags but yes, you can do this via the integrated filesystem explorer and task lists.
|
||||
|
||||
### Where can I find documentation?
|
||||
|
||||
Documentation is currently under development.
|
||||
|
||||
- [End-user documentation](https://github.com/marktext/marktext/blob/develop/docs/README.md)
|
||||
|
||||
- [Developer documentation](https://github.com/marktext/marktext/blob/develop/docs/dev/README.md)
|
||||
|
||||
### Can I run a portable version of MarkText?
|
||||
|
||||
Yes, please see [here](PORTABLE.md) for further information.
|
||||
|
||||
### How can I report bugs and problems
|
||||
|
||||
You can report bugs and problems via our [GitHub issue tracker](https://github.com/marktext/marktext/issues). Please provide a detailed description of the problem to better solve the issue.
|
||||
|
||||
### I cannot launch MarkText on Linux (SUID sandbox)
|
||||
|
||||
> *The SUID sandbox helper binary was found, but is not configured correctly.*
|
||||
|
||||
Normally, you should never get this error but if you disabled user namespaces, this error message may appears in the command output when launching MarkText. To solve the issue, that Chromium cannot start the sandbox (process), you can choose one of the following steps:
|
||||
|
||||
- Enable Linux kernel user namespaces to use the preferred sandbox: `sudo sysctl kernel.unprivileged_userns_clone=1`.
|
||||
- Set correct SUID sandbox helper binary permissions: `sudo chown root <path_to_marktext_dir>/chrome-sandbox && sudo chmod 4755 <path_to_marktext_dir>/chrome-sandbox`. This is preferred if you don't want to enable user namespaces.
|
||||
- Launch MarkText with `--no-sandbox` argument.
|
||||
@ -1,29 +0,0 @@
|
||||
# Image support
|
||||
|
||||
MarkText can automatically copy your images into a specified directory or handle images from clipboard.
|
||||
|
||||
### Upload to cloud using selected uploader
|
||||
|
||||
Please see [here](IMAGE_UPLOADER_CONFIGRATION.md) for more information.
|
||||
|
||||
### Move to designated local folder
|
||||
|
||||
All images are automatically copied into the specified local directory that may be relative.
|
||||
|
||||
**Prefer relative assets folder:**
|
||||
|
||||
When this option is enabled, all images are copied relative to the opened file. The root directory is used when a project is opened and no variables are used. You can specify the path via the *relative image folder name* text box and include variables like `${filename}` to add the file name to the relative directory. The local resource directory is used if the file is not saved.
|
||||
|
||||
Note: The assets directory name must be a valid path name and MarkText need write access to the directory.
|
||||
|
||||
Examples for relative paths:
|
||||
|
||||
- `assets`
|
||||
- `../assets`
|
||||
- `.`: current file directory
|
||||
- `assets/123`
|
||||
- `assets_${filename}` (add the document file name)
|
||||
|
||||
### Keep original location
|
||||
|
||||
MarkText only saves images from clipboard into the specified local directory.
|
||||
@ -1,25 +0,0 @@
|
||||
#### Image Uploader Configration
|
||||
|
||||
##### PicGo
|
||||
|
||||
PicGo is a CLI tool to upload images to various cloud providers. Please see [here](https://picgo.github.io/PicGo-Doc/en/guide/) of more information.
|
||||
|
||||
##### GitHub
|
||||
|
||||
> NOTE: This uploader is deprecated and will be replaced by PicGo in version 0.18.
|
||||
|
||||
1. Step 1, Create a GitHub [repo](https://github.com/new).
|
||||
|
||||

|
||||
|
||||
2. Step 2, Create a GitHub token in [Settings/Developer settings.](https://github.com/settings/tokens)
|
||||
|
||||

|
||||
|
||||
3. Config in MarkText Preferences window. click `CmdOrCtrl + ,` to open MarkText Preferences window.
|
||||
|
||||

|
||||
|
||||
4. Input you `token`, `owner name` and `repo name` whick you just created. Click `Save` and `Set As default Uploader`.
|
||||
|
||||
5. Paste an image into MarkText and open you created repo to see the uploaded image.
|
||||
@ -1,36 +0,0 @@
|
||||
# Key Bindings
|
||||
|
||||
All key bindings can be overwritten with the `keybindings.json` file. The file is located in the [application data directory](APPLICATION_DATA_DIRECTORY.md). Each entry consists of a `id`/`accelerator` pair in JSON format.
|
||||
|
||||
Here is an example:
|
||||
|
||||
```json
|
||||
{
|
||||
"file.save": "CmdOrCtrl+Shift+S",
|
||||
"file.save-as": "CmdOrCtrl+S"
|
||||
}
|
||||
```
|
||||
|
||||
## Available modifiers
|
||||
|
||||
- `Cmd` on macOS
|
||||
- `Option` on macOS
|
||||
- `Ctrl`
|
||||
- `Shift`
|
||||
- `Alt` (equal to `Option` on macOS)
|
||||
|
||||
Please don't bind `AltGr`, use `Cltr+Alt` instead.
|
||||
|
||||
## Available keys
|
||||
|
||||
- `0-9`, `A-Z`, `F1-F24` and punctuations like `/` or `#`
|
||||
- `Plus`, `Space`, `Tab`, `Backspace`, `Delete`, `Insert`, `Return/Enter`, `Esc`, `Home`, `End` and `PrintScreen`
|
||||
- `Up`, `Down`, `Left` and `Right`
|
||||
- `PageUp` and `PageDown`
|
||||
- Empty string `""` to unset a accelerator
|
||||
|
||||
## Available key bindings
|
||||
|
||||
- [Key bindings for macOS](KEYBINDINGS_OSX.md)
|
||||
- [Key bindings for Linux](KEYBINDINGS_LINUX.md)
|
||||
- [Key bindings for Windows](KEYBINDINGS_WINDOWS.md)
|
||||
@ -1,139 +0,0 @@
|
||||
# Key Bindings for Linux
|
||||
|
||||
MarkText key bindings for Linux. Please see [general key bindings](KEYBINDINGS.md) for information how to use custom key bindings.
|
||||
|
||||
## Available menu key bindings
|
||||
|
||||
#### File menu
|
||||
|
||||
| Id | Default | Description |
|
||||
|:------------------- | --------------------------------------------- | ------------------------------------- |
|
||||
| `file.new-window` | <kbd>Ctrl</kbd>+<kbd>N</kbd> | New window |
|
||||
| `file.new-tab` | <kbd>Ctrl</kbd>+<kbd>T</kbd> | New tab |
|
||||
| `file.open-file` | <kbd>Ctrl</kbd>+<kbd>O</kbd> | Open markdown file |
|
||||
| `file.open-folder` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>O</kbd> | Open folder |
|
||||
| `file.save` | <kbd>Ctrl</kbd>+<kbd>S</kbd> | Save |
|
||||
| `file.save-as` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> | Save as... |
|
||||
| `file.move-file` | - | Move current file to another location |
|
||||
| `file.rename-file` | - | Rename current file |
|
||||
| `file.print` | - | Print current tab |
|
||||
| `file.preferences` | <kbd>Ctrl</kbd>+<kbd>,</kbd> | Open settings window |
|
||||
| `file.close-tab` | <kbd>Ctrl</kbd>+<kbd>W</kbd> | Close tab |
|
||||
| `file.close-window` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>W</kbd> | Close window |
|
||||
| `file.quit` | <kbd>Ctrl</kbd>+<kbd>Q</kbd> | Quit MarkText |
|
||||
|
||||
#### Edit menu
|
||||
|
||||
| Id | Default | Description |
|
||||
|:------------------------- | --------------------------------------------- | ----------------------------------------------- |
|
||||
| `edit.undo` | <kbd>Ctrl</kbd>+<kbd>Z</kbd> | Undo last operation |
|
||||
| `edit.redo` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd> | Redo last operation |
|
||||
| `edit.cut` | <kbd>Ctrl</kbd>+<kbd>X</kbd> | Cut selected text |
|
||||
| `edit.copy` | <kbd>Ctrl</kbd>+<kbd>C</kbd> | Copy selected text |
|
||||
| `edit.paste` | <kbd>Ctrl</kbd>+<kbd>V</kbd> | Paste text |
|
||||
| `edit.copy-as-markdown` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>C</kbd> | Copy selected text as markdown |
|
||||
| `edit.copy-as-html` | - | Copy selected text as html |
|
||||
| `edit.paste-as-plaintext` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> | Copy selected text as plaintext |
|
||||
| `edit.select-all` | <kbd>Ctrl</kbd>+<kbd>A</kbd> | Select all text of the document |
|
||||
| `edit.duplicate` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>E</kbd> | Duplicate the current paragraph |
|
||||
| `edit.create-paragraph` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>N</kbd> | Create a new paragraph after the current one |
|
||||
| `edit.delete-paragraph` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd> | Delete current paragraph |
|
||||
| `edit.find` | <kbd>Ctrl</kbd>+<kbd>F</kbd> | Find information in the document |
|
||||
| `edit.find-next` | <kbd>F3</kbd> | Continue the search and find the next match |
|
||||
| `edit.find-previous` | <kbd>Shift</kbd>+<kbd>F3</kbd> | Continue the search and find the previous match |
|
||||
| `edit.replace` | <kbd>Ctrl</kbd>+<kbd>R</kbd> | Replace the information with a replacement |
|
||||
| `edit.find-in-folder` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>F</kbd> | Find files contain the keyword in opend folder |
|
||||
|
||||
#### Paragraph menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| --------------------------- | --------------------------------------------- | ---------------------------------------- |
|
||||
| `paragraph.heading-1` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>1</kbd> | Set line as heading 1 |
|
||||
| `paragraph.heading-2` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>2</kbd> | Set line as heading 2 |
|
||||
| `paragraph.heading-3` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>3</kbd> | Set line as heading 3 |
|
||||
| `paragraph.heading-4` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>4</kbd> | Set line as heading 4 |
|
||||
| `paragraph.heading-5` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>5</kbd> | Set line as heading 5 |
|
||||
| `paragraph.heading-6` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>6</kbd> | Set line as heading 6 |
|
||||
| `paragraph.upgrade-heading` | <kbd>Ctrl</kbd>+<kbd>Plus</kbd> | Upgrade a heading |
|
||||
| `paragraph.degrade-heading` | <kbd>Ctrl</kbd>+<kbd>-</kbd> | Degrade a heading |
|
||||
| `paragraph.table` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> | Insert a table |
|
||||
| `paragraph.code-fence` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>K</kbd> | Insert a code block |
|
||||
| `paragraph.quote-block` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Q</kbd> | Insert a quote block |
|
||||
| `paragraph.math-formula` | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>M</kbd> | Insert a math block |
|
||||
| `paragraph.html-block` | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>H</kbd> | Insert a HTML block |
|
||||
| `paragraph.order-list` | <kbd>Ctrl</kbd>+<kbd>G</kbd> | Insert a ordered list |
|
||||
| `paragraph.bullet-list` | <kbd>Ctrl</kbd>+<kbd>H</kbd> | Insert a unordered list |
|
||||
| `paragraph.task-list` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>X</kbd> | Insert a task list |
|
||||
| `paragraph.loose-list-item` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>L</kbd> | Convert a list item to a loose list item |
|
||||
| `paragraph.paragraph` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>0</kbd> | Convert a heading to a paragraph |
|
||||
| `paragraph.horizontal-line` | <kbd>Ctrl</kbd>+<kbd>\_</kbd> | Add a horizontal line |
|
||||
| `paragraph.front-matter` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Y</kbd> | Insert a YAML frontmatter block |
|
||||
|
||||
#### Format menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| --------------------- | --------------------------------------------- | ----------------------------------------------- |
|
||||
| `format.strong` | <kbd>Ctrl</kbd>+<kbd>B</kbd> | Set the font of the selected text to bold |
|
||||
| `format.emphasis` | <kbd>Ctrl</kbd>+<kbd>I</kbd> | Set the font of the selected text to italic |
|
||||
| `format.underline` | <kbd>Ctrl</kbd>+<kbd>U</kbd> | Change the selected text to underline |
|
||||
| `format.superscript` | - | Change the selected text to underline |
|
||||
| `format.subscript` | - | Change the selected text to underline |
|
||||
| `format.highlight` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>H</kbd> | Highlight the selected text by <mark>tag</mark> |
|
||||
| `format.inline-code` | <kbd>Ctrl</kbd>+<kbd>Y</kbd> | Change the selected text to inline code |
|
||||
| `format.inline-math` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd> | Change the selected text to inline math |
|
||||
| `format.strike` | <kbd>Ctrl</kbd>+<kbd>D</kbd> | Strike through the selected text |
|
||||
| `format.hyperlink` | <kbd>Ctrl</kbd>+<kbd>L</kbd> | Insert a hyperlink |
|
||||
| `format.image` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> | Insert a image |
|
||||
| `format.clear-format` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd> | Clear the formatting of the selected text |
|
||||
|
||||
#### Window menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| ----------------------------- | ---------------------------- | ------------------------- |
|
||||
| `window.minimize` | <kbd>Ctrl</kbd>+<kbd>M</kbd> | Minimize the window |
|
||||
| `window.toggle-always-on-top` | - | Toogle always on top mode |
|
||||
| `window.zoom-in` | - | Zoom in |
|
||||
| `window.zoom-out` | - | Zoom out |
|
||||
| `window.toggle-full-screen` | <kbd>F11</kbd> | Toggle fullscreen mode |
|
||||
|
||||
#### View menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| ----------------------- | --------------------------------------------- | ---------------------------------------- |
|
||||
| `view.command-palette` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> | Toggle command palette |
|
||||
| `view.source-code-mode` | <kbd>Ctrl</kbd>+<kbd>E</kbd> | Switch to source code mode |
|
||||
| `view.typewriter-mode` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>G</kbd> | Enable typewriter mode |
|
||||
| `view.focus-mode` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>J</kbd> | Enable focus mode |
|
||||
| `view.toggle-sidebar` | <kbd>Ctrl</kbd>+<kbd>J</kbd> | Toggle sidebar |
|
||||
| `view.toggle-tabbar` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd> | Toggle tabbar |
|
||||
| `view.toggle-toc` . | <kbd>Ctrl</kbd>+<kbd>K</kbd> | Toggle table of contents |
|
||||
| `view.toggle-dev-tools` | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>I</kbd> | Toggle developer tools (debug mode only) |
|
||||
| `view.dev-reload` | <kbd>Ctrl</kbd>+<kbd>F5</kbd> | Reload window (debug mode only) |
|
||||
| `view.reload-images` | <kbd>F5</kbd> | Reload images |
|
||||
|
||||
## Available key bindings
|
||||
|
||||
#### Tabs
|
||||
|
||||
| Id | Default | Description |
|
||||
| ------------------------ | ----------------------------------------------- | ---------------------------- |
|
||||
| `tabs.cycle-forward` | <kbd>Ctrl</kbd>+<kbd>Tab</kbd> | Cycle through tabs |
|
||||
| `tabs.cycle-backward` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> | Cycle backwards through tabs |
|
||||
| `tabs.switch-to-left` | <kbd>Ctrl</kbd>+<kbd>PageUp</kbd> | Switch tab to the left |
|
||||
| `tabs.switch-to-right` | <kbd>Ctrl</kbd>+<kbd>PageDown</kbd> | Switch tab to the right |
|
||||
| `tabs.switch-to-first` | <kbd>Ctrl</kbd>+<kbd>1</kbd> | Switch tab to the 1st |
|
||||
| `tabs.switch-to-second` | <kbd>Ctrl</kbd>+<kbd>2</kbd> | Switch tab to the 2nd |
|
||||
| `tabs.switch-to-third` | <kbd>Ctrl</kbd>+<kbd>3</kbd> | Switch tab to the 3rd |
|
||||
| `tabs.switch-to-fourth` | <kbd>Ctrl</kbd>+<kbd>4</kbd> | Switch tab to the 4th |
|
||||
| `tabs.switch-to-fifth` | <kbd>Ctrl</kbd>+<kbd>5</kbd> | Switch tab to the 5th |
|
||||
| `tabs.switch-to-sixth` | <kbd>Ctrl</kbd>+<kbd>6</kbd> | Switch tab to the 6th |
|
||||
| `tabs.switch-to-seventh` | <kbd>Ctrl</kbd>+<kbd>7</kbd> | Switch tab to the 7th |
|
||||
| `tabs.switch-to-eighth` | <kbd>Ctrl</kbd>+<kbd>8</kbd> | Switch tab to the 8th |
|
||||
| `tabs.switch-to-ninth` | <kbd>Ctrl</kbd>+<kbd>9</kbd> | Switch tab to the 9th |
|
||||
| `tabs.switch-to-tenth` | <kbd>Ctrl</kbd>+<kbd>0</kbd> | Switch tab to the 10th |
|
||||
|
||||
#### Misc
|
||||
|
||||
| Id | Default | Description |
|
||||
| ----------------- | ---------------------------- | ---------------------- |
|
||||
| `file.quick-open` | <kbd>Ctrl</kbd>+<kbd>P</kbd> | Show quick open dialog |
|
||||
@ -1,147 +0,0 @@
|
||||
# Key Bindings for macOS
|
||||
|
||||
MarkText key bindings for macOS. Please see [general key bindings](KEYBINDINGS.md) for information how to use custom key bindings.
|
||||
|
||||
## Available menu key bindings
|
||||
|
||||
#### MarkText menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| ------------------ | ------------------------------------------------- | -------------------------------------- |
|
||||
| `mt.hide` | <kbd>Command</kbd>+<kbd>H</kbd> | Hide MarkText |
|
||||
| `mt.hide-others` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>H</kbd> | Hide all other windows except MarkText |
|
||||
| `file.preferences` | <kbd>Command</kbd>+<kbd>,</kbd> | Open settings window |
|
||||
| `file.quit` | <kbd>Command</kbd>+<kbd>Q</kbd> | Quit MarkText |
|
||||
|
||||
#### File menu
|
||||
|
||||
| Id | Default | Description |
|
||||
|:------------------- | ------------------------------------------------ | ------------------------------------- |
|
||||
| `file.new-window` | <kbd>Command</kbd>+<kbd>N</kbd> | New window |
|
||||
| `file.new-tab` | <kbd>Command</kbd>+<kbd>T</kbd> | New tab |
|
||||
| `file.open-file` | <kbd>Command</kbd>+<kbd>O</kbd> | Open markdown file |
|
||||
| `file.open-folder` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>O</kbd> | Open folder |
|
||||
| `file.save` | <kbd>Command</kbd>+<kbd>S</kbd> | Save |
|
||||
| `file.save-as` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> | Save as... |
|
||||
| `file.move-file` | - | Move current file to another location |
|
||||
| `file.rename-file` | - | Rename current file |
|
||||
| `file.print` | - | Print current tab |
|
||||
| `file.close-tab` | <kbd>Command</kbd>+<kbd>W</kbd> | Close tab |
|
||||
| `file.close-window` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>W</kbd> | Close window |
|
||||
|
||||
#### Edit menu
|
||||
|
||||
| Id | Default | Description |
|
||||
|:------------------------- | ------------------------------------------------- | ----------------------------------------------- |
|
||||
| `edit.undo` | <kbd>Command</kbd>+<kbd>Z</kbd> | Undo last operation |
|
||||
| `edit.redo` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd> | Redo last operation |
|
||||
| `edit.cut` | <kbd>Command</kbd>+<kbd>X</kbd> | Cut selected text |
|
||||
| `edit.copy` | <kbd>Command</kbd>+<kbd>C</kbd> | Copy selected text |
|
||||
| `edit.paste` | <kbd>Command</kbd>+<kbd>V</kbd> | Paste text |
|
||||
| `edit.copy-as-markdown` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>C</kbd> | Copy selected text as markdown |
|
||||
| `edit.copy-as-html` | - | Copy selected text as html |
|
||||
| `edit.paste-as-plaintext` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> | Copy selected text as plaintext |
|
||||
| `edit.select-all` | <kbd>Command</kbd>+<kbd>A</kbd> | Select all text of the document |
|
||||
| `edit.duplicate` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>P</kbd> | Duplicate the current paragraph |
|
||||
| `edit.create-paragraph` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>N</kbd> | Create a new paragraph after the current one |
|
||||
| `edit.delete-paragraph` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd> | Delete current paragraph |
|
||||
| `edit.find` | <kbd>Command</kbd>+<kbd>F</kbd> | Find information in the document |
|
||||
| `edit.find-next` | <kbd>Cmd</kbd>+<kbd>G</kbd> | Continue the search and find the next match |
|
||||
| `edit.find-previous` | <kbd>Shift</kbd>+<kbd>Cmd</kbd>+<kbd>G</kbd> | Continue the search and find the previous match |
|
||||
| `edit.replace` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>F</kbd> | Replace the information with a replacement |
|
||||
| `edit.find-in-folder` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>F</kbd> | Find files contain the keyword in opend folder |
|
||||
| `edit.screenshot` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>A</kbd> | Get the screenshot |
|
||||
|
||||
#### Paragraph menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| --------------------------- | ------------------------------------------------- | ---------------------------------------- |
|
||||
| `paragraph.heading-1` | <kbd>Command</kbd>+<kbd>1</kbd> | Set line as heading 1 |
|
||||
| `paragraph.heading-2` | <kbd>Command</kbd>+<kbd>2</kbd> | Set line as heading 2 |
|
||||
| `paragraph.heading-3` | <kbd>Command</kbd>+<kbd>3</kbd> | Set line as heading 3 |
|
||||
| `paragraph.heading-4` | <kbd>Command</kbd>+<kbd>4</kbd> | Set line as heading 4 |
|
||||
| `paragraph.heading-5` | <kbd>Command</kbd>+<kbd>5</kbd> | Set line as heading 5 |
|
||||
| `paragraph.heading-6` | <kbd>Command</kbd>+<kbd>6</kbd> | Set line as heading 6 |
|
||||
| `paragraph.upgrade-heading` | <kbd>Command</kbd>+<kbd>Plus</kbd> | Upgrade a heading |
|
||||
| `paragraph.degrade-heading` | <kbd>Command</kbd>+<kbd>-</kbd> | Degrade a heading |
|
||||
| `paragraph.table` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> | Insert a table |
|
||||
| `paragraph.code-fence` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>C</kbd> | Insert a code block |
|
||||
| `paragraph.quote-block` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>Q</kbd> | Insert a quote block |
|
||||
| `paragraph.math-formula` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>M</kbd> | Insert a math block |
|
||||
| `paragraph.html-block` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>J</kbd> | Insert a HTML block |
|
||||
| `paragraph.order-list` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>O</kbd> | Insert a ordered list |
|
||||
| `paragraph.bullet-list` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>U</kbd> | Insert a unordered list |
|
||||
| `paragraph.task-list` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>X</kbd> | Insert a task list |
|
||||
| `paragraph.loose-list-item` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>L</kbd> | Convert a list item to a loose list item |
|
||||
| `paragraph.paragraph` | <kbd>Command</kbd>+<kbd>0</kbd> | Convert a heading to a paragraph |
|
||||
| `paragraph.horizontal-line` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>-</kbd> | Add a horizontal line |
|
||||
| `paragraph.front-matter` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>Y</kbd> | Insert a YAML frontmatter block |
|
||||
|
||||
#### Format menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| --------------------- | ------------------------------------------------ | ----------------------------------------------- |
|
||||
| `format.strong` | <kbd>Command</kbd>+<kbd>B</kbd> | Set the font of the selected text to bold |
|
||||
| `format.emphasis` | <kbd>Command</kbd>+<kbd>I</kbd> | Set the font of the selected text to italic |
|
||||
| `format.underline` | <kbd>Command</kbd>+<kbd>U</kbd> | Change the selected text to underline |
|
||||
| `format.superscript` | - | Change the selected text to underline |
|
||||
| `format.subscript` | - | Change the selected text to underline |
|
||||
| `format.highlight` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>H</kbd> | Highlight the selected text by <mark>tag</mark> |
|
||||
| `format.inline-code` | <kbd>Command</kbd>+<kbd>`</kbd> | Change the selected text to inline code |
|
||||
| `format.inline-math` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd> | Change the selected text to inline math |
|
||||
| `format.strike` | <kbd>Command</kbd>+<kbd>D</kbd> | Strike through the selected text |
|
||||
| `format.hyperlink` | <kbd>Command</kbd>+<kbd>L</kbd> | Insert a hyperlink |
|
||||
| `format.image` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> | Insert a image |
|
||||
| `format.clear-format` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd> | Clear the formatting of the selected text |
|
||||
|
||||
#### Window menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| ----------------------------- | ----------------------------------------------- | ------------------------- |
|
||||
| `window.minimize` | <kbd>Command</kbd>+<kbd>M</kbd> | Minimize the window |
|
||||
| `window.toggle-always-on-top` | - | Toogle always on top mode |
|
||||
| `window.zoom-in` | - | Zoom in |
|
||||
| `window.zoom-out` | - | Zoom out |
|
||||
| `window.toggle-full-screen` | <kbd>Ctrl</kbd>+<kbd>Command</kbd>+<kbd>F</kbd> | Toggle fullscreen mode |
|
||||
|
||||
#### View menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| ----------------------- | ------------------------------------------------- | ---------------------------------------- |
|
||||
| `view.command-palette` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> | Toggle command palette |
|
||||
| `view.source-code-mode` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>S</kbd> | Switch to source code mode |
|
||||
| `view.typewriter-mode` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>T</kbd> | Enable typewriter mode |
|
||||
| `view.focus-mode` | <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>J</kbd> | Enable focus mode |
|
||||
| `view.toggle-sidebar` | <kbd>Command</kbd>+<kbd>J</kbd> | Toggle sidebar |
|
||||
| `view.toggle-tabbar` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>B</kbd> | Toggle tabbar |
|
||||
| `view.toggle-toc` . | <kbd>Command</kbd>+<kbd>K</kbd> | Toggle table of contents |
|
||||
| `view.toggle-dev-tools` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>I</kbd> | Toggle developer tools (debug mode only) |
|
||||
| `view.dev-reload` | <kbd>Command</kbd>+<kbd>Option</kbd>+<kbd>R</kbd> | Reload window (debug mode only) |
|
||||
| `view.reload-images` | <kbd>Command</kbd>+<kbd>R</kbd> | Reload images |
|
||||
|
||||
## Available key bindings
|
||||
|
||||
#### Tabs
|
||||
|
||||
| Id | Default | Description |
|
||||
| ------------------------ | ----------------------------------------------- | ---------------------------- |
|
||||
| `tabs.cycle-forward` | <kbd>Ctrl</kbd>+<kbd>Tab</kbd> | Cycle through tabs |
|
||||
| `tabs.cycle-backward` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> | Cycle backwards through tabs |
|
||||
| `tabs.switch-to-left` | <kbd>Command</kbd>+<kbd>PageUp</kbd> | Switch tab to the left |
|
||||
| `tabs.switch-to-right` | <kbd>Command</kbd>+<kbd>PageDown</kbd> | Switch tab to the right |
|
||||
| `tabs.switch-to-first` | <kbd>Ctrl</kbd>+<kbd>1</kbd> | Switch tab to the 1st |
|
||||
| `tabs.switch-to-second` | <kbd>Ctrl</kbd>+<kbd>2</kbd> | Switch tab to the 2nd |
|
||||
| `tabs.switch-to-third` | <kbd>Ctrl</kbd>+<kbd>3</kbd> | Switch tab to the 3rd |
|
||||
| `tabs.switch-to-fourth` | <kbd>Ctrl</kbd>+<kbd>4</kbd> | Switch tab to the 4th |
|
||||
| `tabs.switch-to-fifth` | <kbd>Ctrl</kbd>+<kbd>5</kbd> | Switch tab to the 5th |
|
||||
| `tabs.switch-to-sixth` | <kbd>Ctrl</kbd>+<kbd>6</kbd> | Switch tab to the 6th |
|
||||
| `tabs.switch-to-seventh` | <kbd>Ctrl</kbd>+<kbd>7</kbd> | Switch tab to the 7th |
|
||||
| `tabs.switch-to-eighth` | <kbd>Ctrl</kbd>+<kbd>8</kbd> | Switch tab to the 8th |
|
||||
| `tabs.switch-to-ninth` | <kbd>Ctrl</kbd>+<kbd>9</kbd> | Switch tab to the 9th |
|
||||
| `tabs.switch-to-tenth` | <kbd>Ctrl</kbd>+<kbd>0</kbd> | Switch tab to the 10th |
|
||||
|
||||
#### Misc
|
||||
|
||||
| Id | Default | Description |
|
||||
| ----------------- | ------------------------------- | ---------------------- |
|
||||
| `file.quick-open` | <kbd>Command</kbd>+<kbd>P</kbd> | Open quick open dialog |
|
||||
@ -1,139 +0,0 @@
|
||||
ew.source-code-m# Key Bindings for Windows
|
||||
|
||||
MarkText key bindings for Windows. Please see [general key bindings](KEYBINDINGS.md) for information how to use custom key bindings.
|
||||
|
||||
## Available menu key bindings
|
||||
|
||||
#### File menu
|
||||
|
||||
| Id | Default | Description |
|
||||
|:------------------- | --------------------------------------------- | ------------------------------------- |
|
||||
| `file.new-window` | <kbd>Ctrl</kbd>+<kbd>N</kbd> | New window |
|
||||
| `file.new-tab` | <kbd>Ctrl</kbd>+<kbd>T</kbd> | New tab |
|
||||
| `file.open-file` | <kbd>Ctrl</kbd>+<kbd>O</kbd> | Open markdown file |
|
||||
| `file.open-folder` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>O</kbd> | Open folder |
|
||||
| `file.save` | <kbd>Ctrl</kbd>+<kbd>S</kbd> | Save |
|
||||
| `file.save-as` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> | Save as... |
|
||||
| `file.move-file` | - | Move current file to another location |
|
||||
| `file.rename-file` | - | Rename current file |
|
||||
| `file.print` | - | Print current tab |
|
||||
| `file.preferences` | <kbd>Ctrl</kbd>+<kbd>,</kbd> | Open settings window |
|
||||
| `file.close-tab` | <kbd>Ctrl</kbd>+<kbd>W</kbd> | Close tab |
|
||||
| `file.close-window` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>W</kbd> | Close window |
|
||||
| `file.quit` | <kbd>Ctrl</kbd>+<kbd>Q</kbd> | Quit MarkText |
|
||||
|
||||
#### Edit menu
|
||||
|
||||
| Id | Default | Description |
|
||||
|:------------------------ | --------------------------------------------- | ----------------------------------------------- |
|
||||
| `edit.undo` | <kbd>Ctrl</kbd>+<kbd>Z</kbd> | Undo last operation |
|
||||
| `edit.redo` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd> | Redo last operation |
|
||||
| `edit.cut` | <kbd>Ctrl</kbd>+<kbd>X</kbd> | Cut selected text |
|
||||
| `edit.copy` | <kbd>Ctrl</kbd>+<kbd>C</kbd> | Copy selected text |
|
||||
| `edit.paste` | <kbd>Ctrl</kbd>+<kbd>V</kbd> | Paste text |
|
||||
| `edit.copy-as-markdown` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>C</kbd> | Copy selected text as markdown |
|
||||
| `edit.copy-as-html` | - | Copy selected text as html |
|
||||
| `edit.paste-as-plaintext` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> | Copy selected text as plaintext |
|
||||
| `edit.select-all` | <kbd>Ctrl</kbd>+<kbd>A</kbd> | Select all text of the document |
|
||||
| `edit.duplicate` | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>P</kbd> | Duplicate the current paragraph |
|
||||
| `edit.create-paragraph` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>N</kbd> | Create a new paragraph after the current one |
|
||||
| `edit.delete-paragraph` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd> | Delete current paragraph |
|
||||
| `edit.find` | <kbd>Ctrl</kbd>+<kbd>F</kbd> | Find information in the document |
|
||||
| `edit.find-next` | <kbd>F3</kbd> | Continue the search and find the next match |
|
||||
| `edit.find-previous` | <kbd>Shift</kbd>+<kbd>F3</kbd> | Continue the search and find the previous match |
|
||||
| `edit.replace` | <kbd>Ctrl</kbd>+<kbd>R</kbd> | Replace the information with a replacement |
|
||||
| `edit.find-in-folder` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>F</kbd> | Find files contain the keyword in opend folder |
|
||||
|
||||
#### Paragraph menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| --------------------------- | --------------------------------------------- | ---------------------------------------- |
|
||||
| `paragraph.heading-1` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>1</kbd> | Set line as heading 1 |
|
||||
| `paragraph.heading-2` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>2</kbd> | Set line as heading 2 |
|
||||
| `paragraph.heading-3` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>3</kbd> | Set line as heading 3 |
|
||||
| `paragraph.heading-4` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>4</kbd> | Set line as heading 4 |
|
||||
| `paragraph.heading-5` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>5</kbd> | Set line as heading 5 |
|
||||
| `paragraph.heading-6` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>6</kbd> | Set line as heading 6 |
|
||||
| `paragraph.upgrade-heading` | <kbd>Ctrl</kbd>+<kbd>Plus</kbd> | Upgrade a heading |
|
||||
| `paragraph.degrade-heading` | <kbd>Ctrl</kbd>+<kbd>-</kbd> | Degrade a heading |
|
||||
| `paragraph.table` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> | Insert a table |
|
||||
| `paragraph.code-fence` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>K</kbd> | Insert a code block |
|
||||
| `paragraph.quote-block` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Q</kbd> | Insert a quote block |
|
||||
| `paragraph.math-formula` | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>N</kbd> | Insert a math block |
|
||||
| `paragraph.html-block` | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>H</kbd> | Insert a HTML block |
|
||||
| `paragraph.order-list` | <kbd>Ctrl</kbd>+<kbd>G</kbd> | Insert a ordered list |
|
||||
| `paragraph.bullet-list` | <kbd>Ctrl</kbd>+<kbd>H</kbd> | Insert a unordered list |
|
||||
| `paragraph.task-list` | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>X</kbd> | Insert a task list |
|
||||
| `paragraph.loose-list-item` | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>L</kbd> | Convert a list item to a loose list item |
|
||||
| `paragraph.paragraph` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>0</kbd> | Convert a heading to a paragraph |
|
||||
| `paragraph.horizontal-line` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>U</kbd> | Add a horizontal line |
|
||||
| `paragraph.front-matter` | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Y</kbd> | Insert a YAML frontmatter block |
|
||||
|
||||
#### Format menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| --------------------- | --------------------------------------------- | ----------------------------------------------- |
|
||||
| `format.strong` | <kbd>Ctrl</kbd>+<kbd>B</kbd> | Set the font of the selected text to bold |
|
||||
| `format.emphasis` | <kbd>Ctrl</kbd>+<kbd>I</kbd> | Set the font of the selected text to italic |
|
||||
| `format.underline` | <kbd>Ctrl</kbd>+<kbd>U</kbd> | Change the selected text to underline |
|
||||
| `format.superscript` | - | Change the selected text to underline |
|
||||
| `format.subscript` | - | Change the selected text to underline |
|
||||
| `format.highlight` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>H</kbd> | Highlight the selected text by <mark>tag</mark> |
|
||||
| `format.inline-code` | <kbd>Ctrl</kbd>+<kbd>`</kbd> | Change the selected text to inline code |
|
||||
| `format.inline-math` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd> | Change the selected text to inline math |
|
||||
| `format.strike` | <kbd>Ctrl</kbd>+<kbd>D</kbd> | Strike through the selected text |
|
||||
| `format.hyperlink` | <kbd>Ctrl</kbd>+<kbd>L</kbd> | Insert a hyperlink |
|
||||
| `format.image` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> | Insert a image |
|
||||
| `format.clear-format` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd> | Clear the formatting of the selected text |
|
||||
|
||||
#### Window menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| ----------------------------- | ---------------------------- | ------------------------- |
|
||||
| `window.minimize` | <kbd>Ctrl</kbd>+<kbd>M</kbd> | Minimize the window |
|
||||
| `window.toggle-always-on-top` | - | Toogle always on top mode |
|
||||
| `window.zoom-in` | - | Zoom in |
|
||||
| `window.zoom-out` | - | Zoom out |
|
||||
| `window.toggle-full-screen` | <kbd>F11</kbd> | Toggle fullscreen mode |
|
||||
|
||||
#### View menu
|
||||
|
||||
| Id | Default | Description |
|
||||
| ----------------------- | --------------------------------------------- | ---------------------------------------- |
|
||||
| `view.command-palette` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> | Toggle command palette |
|
||||
| `view.source-code-mode` | <kbd>Ctrl</kbd>+<kbd>E</kbd> | Switch to source code mode |
|
||||
| `view.typewriter-mode` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>G</kbd> | Enable typewriter mode |
|
||||
| `view.focus-mode` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>J</kbd> | Enable focus mode |
|
||||
| `view.toggle-sidebar` | <kbd>Ctrl</kbd>+<kbd>J</kbd> | Toggle sidebar |
|
||||
| `view.toggle-tabbar` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd> | Toggle tabbar |
|
||||
| `view.toggle-toc` . | <kbd>Ctrl</kbd>+<kbd>K</kbd> | Toggle table of contents |
|
||||
| `view.toggle-dev-tools` | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>I</kbd> | Toggle developer tools (debug mode only) |
|
||||
| `view.dev-reload` | <kbd>Ctrl</kbd>+<kbd>F5</kbd> | Reload window (debug mode only) |
|
||||
| `view.reload-images` | <kbd>F5</kbd> | Reload images |
|
||||
|
||||
## Available key bindings
|
||||
|
||||
#### Tabs
|
||||
|
||||
| Id | Default | Description |
|
||||
| ------------------------ | ----------------------------------------------- | ---------------------------- |
|
||||
| `tabs.cycle-forward` | <kbd>Ctrl</kbd>+<kbd>Tab</kbd> | Cycle through tabs |
|
||||
| `tabs.cycle-backward` | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> | Cycle backwards through tabs |
|
||||
| `tabs.switch-to-left` | <kbd>Ctrl</kbd>+<kbd>PageUp</kbd> | Switch tab to the left |
|
||||
| `tabs.switch-to-right` | <kbd>Ctrl</kbd>+<kbd>PageDown</kbd> | Switch tab to the right |
|
||||
| `tabs.switch-to-first` | <kbd>Ctrl</kbd>+<kbd>1</kbd> | Switch tab to the 1st |
|
||||
| `tabs.switch-to-second` | <kbd>Ctrl</kbd>+<kbd>2</kbd> | Switch tab to the 2nd |
|
||||
| `tabs.switch-to-third` | <kbd>Ctrl</kbd>+<kbd>3</kbd> | Switch tab to the 3rd |
|
||||
| `tabs.switch-to-fourth` | <kbd>Ctrl</kbd>+<kbd>4</kbd> | Switch tab to the 4th |
|
||||
| `tabs.switch-to-fifth` | <kbd>Ctrl</kbd>+<kbd>5</kbd> | Switch tab to the 5th |
|
||||
| `tabs.switch-to-sixth` | <kbd>Ctrl</kbd>+<kbd>6</kbd> | Switch tab to the 6th |
|
||||
| `tabs.switch-to-seventh` | <kbd>Ctrl</kbd>+<kbd>7</kbd> | Switch tab to the 7th |
|
||||
| `tabs.switch-to-eighth` | <kbd>Ctrl</kbd>+<kbd>8</kbd> | Switch tab to the 8th |
|
||||
| `tabs.switch-to-ninth` | <kbd>Ctrl</kbd>+<kbd>9</kbd> | Switch tab to the 9th |
|
||||
| `tabs.switch-to-tenth` | <kbd>Ctrl</kbd>+<kbd>0</kbd> | Switch tab to the 10th |
|
||||
|
||||
#### Misc
|
||||
|
||||
| Id | Default | Description |
|
||||
| ----------------- | ---------------------------- | ---------------------- |
|
||||
| `file.quick-open` | <kbd>Ctrl</kbd>+<kbd>P</kbd> | Open quick open dialog |
|
||||
@ -1,99 +0,0 @@
|
||||
# Linux Installation Instructions
|
||||
|
||||
## AppImage
|
||||
|
||||
[Download the AppImage](https://github.com/marktext/marktext/releases/latest) and type the following:
|
||||
|
||||
1. `chmod +x marktext-%version%-x86_64.AppImage`
|
||||
2. `./marktext-%version%-x86_64.AppImage`
|
||||
3. Now you can execute MarkText.
|
||||
|
||||
### Installation
|
||||
|
||||
You cannot really install an AppImage. It's a file which can run directly after getting executable permission. To integrate it into desktop environment, you can either create desktop entry manually **or** use [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher).
|
||||
|
||||
#### Desktop file creation
|
||||
|
||||
See [example desktop file](https://github.com/marktext/marktext/blob/develop/resources/linux/marktext.desktop).
|
||||
|
||||
```bash
|
||||
$ curl -L https://raw.githubusercontent.com/marktext/marktext/develop/resources/linux/marktext.desktop -o $HOME/.local/share/applications/marktext.desktop
|
||||
|
||||
# Update the Exec in desktop file to your real marktext command. Specify Path if necessary.
|
||||
$ vim $HOME/.local/share/applications/marktext.desktop
|
||||
|
||||
$ update-desktop-database $HOME/.local/share/applications/
|
||||
```
|
||||
|
||||
#### AppImageLauncher integration
|
||||
|
||||
You can integrate the AppImage into the system via [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher). It will handle the desktop entry automatically.
|
||||
|
||||
### Uninstallation
|
||||
|
||||
1. Delete AppImage file.
|
||||
2. Delete your desktop file if exists.
|
||||
3. Delete your user settings: `~/.config/marktext`
|
||||
|
||||
### Custom launch script
|
||||
|
||||
1. Save AppImage somewhere. Let's say `~/bin/marktext.AppImage`
|
||||
2. `chmod +x ~/bin/marktext.AppImage`
|
||||
3. Create a launch script:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
DESKTOPINTEGRATION=0 ~/bin/marktext.AppImage
|
||||
```
|
||||
|
||||
### Known issues
|
||||
|
||||
- MarkText is always integrated into desktop environment after updating
|
||||
|
||||
## Binary
|
||||
|
||||
You can download the latest `marktext-%version%.tar.gz` package from the [release page](https://github.com/marktext/marktext/releases/latest). You may need to install electron dependencies.
|
||||
|
||||
## Flatpak
|
||||
|
||||
### Installation
|
||||
|
||||
**Prerequisites:**
|
||||
|
||||
You need to install the `flatpak` package for your distribution. Please see the [official flatpak tutorial](https://flatpak.org/setup/) for more information and note that you have to add the flathub repository (`flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`) as described in the Quick Setup.
|
||||
|
||||
**Install from Flathub:**
|
||||
|
||||
After you install flatpak and flathub repository, you can install [MarkText](https://flathub.org/apps/details/com.github.marktext.marktext) with just one command (note that you may be asked to enter your password):
|
||||
|
||||
```
|
||||
flatpak install flathub com.github.marktext.marktext
|
||||
```
|
||||
|
||||
or `flatpak install --user flathub com.github.marktext.marktext` to install for the current user only.
|
||||
|
||||
To run MarkText just execute `flatpak run com.github.marktext.marktext` or click on the MarkText icon in your application launcher.
|
||||
|
||||
### Update
|
||||
|
||||
To update MarkText run the following command:
|
||||
|
||||
```
|
||||
flatpak update com.github.marktext.marktext
|
||||
```
|
||||
|
||||
or `flatpak update` to update all installed flatpaks.
|
||||
|
||||
## Arch User Repository
|
||||
|
||||
The Arch User Repository also contains the packages:
|
||||
|
||||
`marktext`, `marktext-bin`, `marktext-git` and `marktext-appimage`.
|
||||
|
||||
Install it via an AUR helper like `yay -S marktext` or with
|
||||
|
||||
```
|
||||
git clone https://aur.archlinux.org/marktext.git
|
||||
cd marktext
|
||||
makepkg -si
|
||||
```
|
||||
@ -1,896 +0,0 @@
|
||||
# Markdown Syntax
|
||||
|
||||
Markdown is a easy-to-use markup language for writing and this document contains all supported markdown features.
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [Markdown Syntax](#markdown-syntax)
|
||||
* [Headings](#headings)
|
||||
* [Paragraphs](#paragraphs)
|
||||
* [Breaks](#breaks)
|
||||
* [Horizontal Rule](#horizontal-rule)
|
||||
* [Emphasis](#emphasis)
|
||||
+ [Bold](#bold)
|
||||
+ [Italics](#italics)
|
||||
+ [Strikethrough](#strikethrough)
|
||||
* [Links](#links)
|
||||
+ [Autolinks](#autolinks)
|
||||
+ [Inline links](#inline-links)
|
||||
+ [Link titles](#link-titles)
|
||||
+ [Named Anchors](#named-anchors)
|
||||
* [Images](#images)
|
||||
* [Blockquotes](#blockquotes)
|
||||
* [Lists](#lists)
|
||||
+ [Unordered](#unordered)
|
||||
+ [Ordered](#ordered)
|
||||
+ [Time-saving Tip](#time-saving-tip)
|
||||
* [Todo List](#todo-list)
|
||||
* [Tables](#tables)
|
||||
+ [Aligning cells](#aligning-cells)
|
||||
* [Code](#code)
|
||||
+ [Inline code](#inline-code)
|
||||
+ ["Fenced" code block](#fenced-code-block)
|
||||
+ [Indented code](#indented-code)
|
||||
+ [Syntax highlighting](#syntax-highlighting)
|
||||
* [Keyboard Keys](#keyboard-keys)
|
||||
* [Emojis](#emojis)
|
||||
* [Front Matter](#front-matter)
|
||||
* [Math Formulas](#math-formulas)
|
||||
+ [Inline Math Formulas](#inline-math-formulas)
|
||||
+ [Block Math Formulas](#block-math-formulas)
|
||||
* [Diagrams](#diagrams)
|
||||
* [Raw HTML](#raw-html)
|
||||
* [Escaping with backslashes](#escaping-with-backslashes)
|
||||
* [Credits](#credits)
|
||||
|
||||
<br>
|
||||
|
||||
## Headings
|
||||
|
||||
Headings from `h1` through `h6` are constructed with a `#` for each level:
|
||||
|
||||
```markdown
|
||||
# H1
|
||||
## H2
|
||||
### H3
|
||||
#### H4
|
||||
##### H5
|
||||
###### H6
|
||||
|
||||
Alternatively you can use ATX headings:
|
||||
|
||||
H1
|
||||
======
|
||||
|
||||
H2
|
||||
------
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
# h1 Heading
|
||||
## h2 Heading
|
||||
### h3 Heading
|
||||
#### h4 Heading
|
||||
##### h5 Heading
|
||||
###### h6 Heading
|
||||
|
||||
Alternatively you can use underlines:
|
||||
|
||||
H1
|
||||
======
|
||||
|
||||
H2
|
||||
------
|
||||
|
||||
<br>
|
||||
|
||||
## Paragraphs
|
||||
|
||||
Just write normal text:
|
||||
|
||||
```markdown
|
||||
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Breaks
|
||||
|
||||
You can use multiple consecutive newline characters (`\n`) to create extra spacing between sections in a markdown document. However, if you need to ensure that extra newlines are not collapsed, you can use as many HTML `<br>` elements as you want.
|
||||
|
||||
Alternatively you can add **two spaces** spaces at the end of your paragraph to force a soft linebreak.
|
||||
|
||||
## Horizontal Rule
|
||||
|
||||
The HTML `<hr>` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can use of the following for this purpose:
|
||||
|
||||
* `___`: three consecutive underscores
|
||||
* `---`: three consecutive dashes
|
||||
* `***`: three consecutive asterisks
|
||||
|
||||
Renders to:
|
||||
|
||||
___
|
||||
|
||||
---
|
||||
|
||||
***
|
||||
|
||||
<br>
|
||||
|
||||
## Emphasis
|
||||
|
||||
### Bold
|
||||
|
||||
For emphasizing a snippet of text with a heavier font-weight.
|
||||
|
||||
The following snippet of text is **rendered as bold text**.
|
||||
|
||||
```markdown
|
||||
**rendered as bold text**
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
**rendered as bold text**
|
||||
|
||||
### Italics
|
||||
|
||||
For emphasizing a snippet of text with italics.
|
||||
|
||||
The following snippet of text is _rendered as italicized text_.
|
||||
|
||||
```markdown
|
||||
_rendered as italicized text_
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
_rendered as italicized text_
|
||||
|
||||
## Strikethrough
|
||||
|
||||
In GFM you can do strickthroughs by wrapping the text with double tildes.
|
||||
|
||||
```markdown
|
||||
~~Strike through this text.~~
|
||||
```
|
||||
|
||||
Which renders to:
|
||||
|
||||
~~Strike through this text.~~
|
||||
|
||||
<br>
|
||||
|
||||
## Links
|
||||
|
||||
### Autolinks
|
||||
|
||||
Autolinks are absolute URIs and email addresses inside `<` and `>`. They are parsed as links, where the URI or email address itself is used as the link's label.
|
||||
|
||||
```markdown
|
||||
<http://foo.bar.baz>
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
<http://foo.bar.baz>
|
||||
|
||||
URIs or email addresses that are not wrapped in angle brackets are not recognized as valid autolinks by markdown parsers.
|
||||
|
||||
|
||||
### Inline links
|
||||
|
||||
```markdown
|
||||
[Assemble](http://assemble.io)
|
||||
```
|
||||
|
||||
Renders to (hover over the link, there is no tooltip):
|
||||
|
||||
[Assemble](http://assemble.io)
|
||||
|
||||
### Link titles
|
||||
|
||||
```markdown
|
||||
[Upstage](https://github.com/upstage/ "Visit Upstage!")
|
||||
```
|
||||
|
||||
Renders to (hover over the link, there should be a tooltip):
|
||||
|
||||
[Upstage](https://github.com/upstage/ "Visit Upstage!")
|
||||
|
||||
### Named Anchors
|
||||
|
||||
Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters:
|
||||
|
||||
```markdown
|
||||
# Table of Contents
|
||||
* [Chapter 1](#chapter-1)
|
||||
* [Chapter 2](#chapter-2)
|
||||
* [Chapter 3](#chapter-3)
|
||||
```
|
||||
|
||||
will jump to these sections:
|
||||
|
||||
```markdown
|
||||
## Chapter 1
|
||||
Content for chapter one.
|
||||
|
||||
## Chapter 2
|
||||
Content for chapter one.
|
||||
|
||||
## Chapter 3 <a name="chapter-3"></a>
|
||||
Content for chapter one.
|
||||
```
|
||||
|
||||
**Anchor placement**
|
||||
|
||||
Note that placement of achors is arbitrary, you can put them anywhere you want, not just in headings. This makes adding cross-references easy when writing markdown.
|
||||
|
||||
<br>
|
||||
|
||||
## Images
|
||||
|
||||
Images have a similar syntax to links but include a preceding exclamation point.
|
||||
|
||||
```markdown
|
||||

|
||||
```
|
||||
|
||||

|
||||
|
||||
or
|
||||
|
||||
```markdown
|
||||

|
||||
```
|
||||
|
||||

|
||||
|
||||
Like links, Images also have a footnote style syntax
|
||||
|
||||
```markdown
|
||||
![Alt text][id]
|
||||
```
|
||||
|
||||
![Alt text][id]
|
||||
|
||||
With a reference later in the document defining the URL location:
|
||||
|
||||
[id]: https://raw.githubusercontent.com/marktext/marktext/develop/resources/icons/256x256/marktext.png "MarkText logo"
|
||||
|
||||
```markdown
|
||||
[id]: https://raw.githubusercontent.com/marktext/marktext/develop/resources/icons/256x256/marktext.png "MarkText logo"
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Blockquotes
|
||||
|
||||
Used for defining a section of quoting text from another source, within your document.
|
||||
|
||||
To create a blockquote, use `>` before any text you want to quote.
|
||||
|
||||
```markdown
|
||||
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
|
||||
|
||||
Blockquotes can also be nested:
|
||||
|
||||
```markdown
|
||||
> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue.
|
||||
Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
|
||||
>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor
|
||||
odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
|
||||
>>> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue.
|
||||
Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue.
|
||||
Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
|
||||
>> Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor
|
||||
odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
|
||||
>>> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue.
|
||||
Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
|
||||
|
||||
<br>
|
||||
|
||||
## Lists
|
||||
|
||||
### Unordered
|
||||
|
||||
A list of items in which the order of the items does not explicitly matter.
|
||||
|
||||
You may use any of the following symbols to denote bullets for each list item:
|
||||
|
||||
```markdown
|
||||
* valid bullet
|
||||
- valid bullet
|
||||
+ valid bullet
|
||||
```
|
||||
|
||||
For example
|
||||
|
||||
```markdown
|
||||
+ Lorem ipsum dolor sit amet
|
||||
+ Consectetur adipiscing elit
|
||||
+ Integer molestie lorem at massa
|
||||
+ Facilisis in pretium nisl aliquet
|
||||
+ Nulla volutpat aliquam velit
|
||||
- Phasellus iaculis neque
|
||||
- Purus sodales ultricies
|
||||
- Vestibulum laoreet porttitor sem
|
||||
- Ac tristique libero volutpat at
|
||||
+ Faucibus porta lacus fringilla vel
|
||||
+ Aenean sit amet erat nunc
|
||||
+ Eget porttitor lorem
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
+ Lorem ipsum dolor sit amet
|
||||
+ Consectetur adipiscing elit
|
||||
+ Integer molestie lorem at massa
|
||||
+ Facilisis in pretium nisl aliquet
|
||||
+ Nulla volutpat aliquam velit
|
||||
- Phasellus iaculis neque
|
||||
- Purus sodales ultricies
|
||||
- Vestibulum laoreet porttitor sem
|
||||
- Ac tristique libero volutpat at
|
||||
+ Faucibus porta lacus fringilla vel
|
||||
+ Aenean sit amet erat nunc
|
||||
+ Eget porttitor lorem
|
||||
|
||||
### Ordered
|
||||
|
||||
A list of items in which the order of items does explicitly matter.
|
||||
|
||||
```markdown
|
||||
1. Lorem ipsum dolor sit amet
|
||||
2. Consectetur adipiscing elit
|
||||
3. Integer molestie lorem at massa
|
||||
4. Facilisis in pretium nisl aliquet
|
||||
5. Nulla volutpat aliquam velit
|
||||
6. Faucibus porta lacus fringilla vel
|
||||
7. Aenean sit amet erat nunc
|
||||
8. Eget porttitor lorem
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
1. Lorem ipsum dolor sit amet
|
||||
2. Consectetur adipiscing elit
|
||||
3. Integer molestie lorem at massa
|
||||
4. Facilisis in pretium nisl aliquet
|
||||
5. Nulla volutpat aliquam velit
|
||||
6. Faucibus porta lacus fringilla vel
|
||||
7. Aenean sit amet erat nunc
|
||||
8. Eget porttitor lorem
|
||||
|
||||
|
||||
### Time-saving Tip
|
||||
|
||||
Sometimes lists change, and when they do it's a pain to re-order all of the numbers. Markdown solves this problem by allowing you to simply use `1.` before each item in the list.
|
||||
|
||||
For example:
|
||||
|
||||
```markdown
|
||||
1. Lorem ipsum dolor sit amet
|
||||
1. Consectetur adipiscing elit
|
||||
1. Integer molestie lorem at massa
|
||||
1. Facilisis in pretium nisl aliquet
|
||||
1. Nulla volutpat aliquam velit
|
||||
1. Faucibus porta lacus fringilla vel
|
||||
1. Aenean sit amet erat nunc
|
||||
1. Eget porttitor lorem
|
||||
```
|
||||
|
||||
Automatically re-numbers the items and renders to:
|
||||
|
||||
1. Lorem ipsum dolor sit amet
|
||||
2. Consectetur adipiscing elit
|
||||
3. Integer molestie lorem at massa
|
||||
4. Facilisis in pretium nisl aliquet
|
||||
5. Nulla volutpat aliquam velit
|
||||
6. Faucibus porta lacus fringilla vel
|
||||
7. Aenean sit amet erat nunc
|
||||
8. Eget porttitor lorem
|
||||
|
||||
<br>
|
||||
|
||||
## Todo List
|
||||
|
||||
```markdown
|
||||
- [ ] Lorem ipsum dolor sit amet
|
||||
- [ ] Consectetur adipiscing elit
|
||||
- [ ] Integer molestie lorem at massa
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
- [ ] Lorem ipsum dolor sit amet
|
||||
- [ ] Consectetur adipiscing elit
|
||||
- [ ] Integer molestie lorem at massa
|
||||
|
||||
**Links in todo lists**
|
||||
|
||||
```markdown
|
||||
- [ ] [foo](#bar)
|
||||
- [ ] [baz](#qux)
|
||||
- [ ] [fez](#faz)
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
- [ ] [foo](#bar)
|
||||
- [ ] [baz](#qux)
|
||||
- [ ] [fez](#faz)
|
||||
|
||||
<br>
|
||||
|
||||
## Tables
|
||||
|
||||
Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header _(this line of dashes is required)_.
|
||||
|
||||
- pipes do not need to be vertically aligned.
|
||||
- pipes on the left and right sides of the table are sometimes optional
|
||||
- three or more dashes must be used for each cell in the separator row
|
||||
|
||||
Example:
|
||||
|
||||
```markdown
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
|
||||
### Aligning cells
|
||||
|
||||
**Center text in a column**
|
||||
|
||||
To center the text in a column, add a colon to the left and right of the dashes in the row beneath the header.
|
||||
|
||||
```markdown
|
||||
| Option | Description |
|
||||
| :-: | :-: |
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
```
|
||||
|
||||
| Option | Description |
|
||||
| :-: | :-: |
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
|
||||
|
||||
**Right-align the text in a column**
|
||||
|
||||
To right-align the text in a column, add a colon to the right of the dashes in the row beneath the header.
|
||||
|
||||
```markdown
|
||||
| Option | Description |
|
||||
| ------:| -----------:|
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
| Option | Description |
|
||||
| ------:| -----------:|
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
|
||||
<br>
|
||||
|
||||
## Code
|
||||
|
||||
### Inline code
|
||||
|
||||
Wrap inline snippets of code with a single backtick: <code>`</code>.
|
||||
|
||||
For example, to show `<div></div>` inline with other text, just wrap it in backticks.
|
||||
|
||||
```markdown
|
||||
For example, to show `<div></div>` inline with other text, just wrap it in backticks.
|
||||
```
|
||||
|
||||
### "Fenced" code block
|
||||
|
||||
Three consecutive backticks, referred to as "code fences", are used to denote multiple lines of code: <code>```</code>.
|
||||
|
||||
For example, this:
|
||||
|
||||
<pre>
|
||||
```html
|
||||
Example text here...
|
||||
```
|
||||
</pre>
|
||||
|
||||
Appears like this when viewed in a browser:
|
||||
|
||||
```markdown
|
||||
Example text here...
|
||||
```
|
||||
|
||||
### Indented code
|
||||
|
||||
You may also indent several lines of code by at least four spaces, but this is not recommended as it is harder to read, harder to maintain, and doesn't support syntax highlighting.
|
||||
|
||||
Example:
|
||||
|
||||
```markdown
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
```
|
||||
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
|
||||
|
||||
### Syntax highlighting
|
||||
|
||||
To activate the correct styling for the language inside the code block, simply add the file extension of the language you want to use directly after the first code "fence": <code>```js</code>, and syntax highlighting will automatically be applied in the rendered HTML (if supported by the parser). For example, to apply syntax highlighting to JavaScript code:
|
||||
|
||||
<pre>
|
||||
```js
|
||||
grunt.initConfig({
|
||||
assemble: {
|
||||
options: {
|
||||
assets: 'docs/assets',
|
||||
data: 'src/data/*.{json,yml}',
|
||||
helpers: 'src/custom-helpers.js',
|
||||
partials: ['src/partials/**/*.{hbs,md}']
|
||||
},
|
||||
pages: {
|
||||
options: {
|
||||
layout: 'default.hbs'
|
||||
},
|
||||
files: {
|
||||
'./': ['src/templates/pages/index.hbs']
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
</pre>
|
||||
|
||||
Which renders to:
|
||||
|
||||
```js
|
||||
grunt.initConfig({
|
||||
assemble: {
|
||||
options: {
|
||||
assets: 'docs/assets',
|
||||
data: 'src/data/*.{json,yml}',
|
||||
helpers: 'src/custom-helpers.js',
|
||||
partials: ['src/partials/**/*.{hbs,md}']
|
||||
},
|
||||
pages: {
|
||||
options: {
|
||||
layout: 'default.hbs'
|
||||
},
|
||||
files: {
|
||||
'./': ['src/templates/pages/index.hbs']
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Keyboard Keys
|
||||
|
||||
Github-Flavored Markdown (GFM) allows you to highlight keyboard keys.
|
||||
|
||||
For example, this:
|
||||
|
||||
```markdown
|
||||
To copy, please press <kbd>CmdOrCtrl</kbd>+<kbd>C</kbd>
|
||||
|
||||
To paste, please press <kbd>CmdOrCtrl</kbd>+<kbd>V</kbd>
|
||||
```
|
||||
|
||||
Which renders to:
|
||||
|
||||
To copy, please press <kbd>CmdOrCtrl</kbd>+<kbd>C</kbd>
|
||||
|
||||
To paste, please press <kbd>CmdOrCtrl</kbd>+<kbd>V</kbd>
|
||||
|
||||
<br>
|
||||
|
||||
## Emojis
|
||||
|
||||
Github-Flavored Markdown (GFM) supports also Emojis. :heart_eyes: :smile: :joy:
|
||||
|
||||
To add an emojis, just surround the emoji name with colons, like this:
|
||||
|
||||
```markdown
|
||||
:heart: :zap: :cow: :dollar: :star: :tada:
|
||||
```
|
||||
|
||||
Which renders to:
|
||||
|
||||
:heart: :zap: :cow: :dollar: :star: :tada:
|
||||
|
||||
**NOTE:** MarkText provides an emoji picker with search functionality.
|
||||
|
||||
<br>
|
||||
|
||||
## Front Matter
|
||||
|
||||
Front matter allows you to insert metadata to your markdown document. The front matter block must be written in the first line before everything else, like in the examples below.
|
||||
|
||||
### YAML
|
||||
|
||||
YAML front matter blocks are identified by an opening and closing `---` line.
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: YAML front matter example
|
||||
key: value
|
||||
---
|
||||
|
||||
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
|
||||
```
|
||||
|
||||
### TOML
|
||||
|
||||
TOML front matter blocks are identified by an opening and closing `+++` line.
|
||||
|
||||
```markdown
|
||||
+++
|
||||
title = "YAML front matter example"
|
||||
key = "value"
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
|
||||
```
|
||||
|
||||
### JSON
|
||||
|
||||
JSON front matter blocks are identified by an opening and closing `;;;` line or `{` and `}`.
|
||||
|
||||
```markdown
|
||||
{
|
||||
"title": YAML front matter example
|
||||
"key": {
|
||||
"subkey1": "value 1",
|
||||
"subkey2": "value 2"
|
||||
}
|
||||
}
|
||||
|
||||
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Math Formulas
|
||||
|
||||
### Inline Math Formulas
|
||||
|
||||
Wrap one line LaTeX with a single dollar sign: <code>$</code>.
|
||||
|
||||
```markdown
|
||||
For example, to show $\alpha \beta \gamma$ inline with other text, just wrap it in dollar signs.
|
||||
```
|
||||
|
||||
### Block Math Formulas
|
||||
|
||||
Two consecutive dollar signs are used to denote multiple lines of math formulas: <code>$$</code>.
|
||||
|
||||
For example, this:
|
||||
|
||||
```markdown
|
||||
$$
|
||||
R_x=\begin{pmatrix}
|
||||
1 & 0 & 0 & 0\\
|
||||
0 & cos(a) & -sin(a) & 0\\
|
||||
0 & sin(a) & cos(a) & 0\\
|
||||
0 & 0 & 0 & 1
|
||||
\end{pmatrix}
|
||||
$$
|
||||
|
||||
or
|
||||
|
||||
$$
|
||||
m=\frac{b_y-a_y}{b_x-a_x}
|
||||
$$
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Diagrams
|
||||
|
||||
MarkText support class, flow chart, gantt and sequence diagrams powered by flowchart.js, mermaid and Vega-Lite. [Code](#code) blocks with special language identifiers are used for diagrams.
|
||||
|
||||
For example, this:
|
||||
|
||||
<pre>
|
||||
## Vega-lite diagram
|
||||
|
||||
Please see [introduction to Vega-Lite](https://vega.github.io/vega-lite/tutorials/getting_started.html) for details.
|
||||
|
||||
```vega-lite
|
||||
{
|
||||
"data": {
|
||||
"values": [
|
||||
{"a": "C", "b": 2}, {"a": "C", "b": 7}, {"a": "C", "b": 4},
|
||||
{"a": "D", "b": 1}, {"a": "D", "b": 2}, {"a": "D", "b": 6},
|
||||
{"a": "E", "b": 8}, {"a": "E", "b": 4}, {"a": "E", "b": 7}
|
||||
]
|
||||
},
|
||||
"mark": "point",
|
||||
"encoding": {
|
||||
"x": {"field": "a", "type": "nominal"},
|
||||
"y": {"field": "b", "type": "quantitative"}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Flowchart
|
||||
|
||||
```flowchart
|
||||
st=>start: Start|past
|
||||
e=>end: End|future
|
||||
op1=>operation: My Operation|past
|
||||
op2=>operation: Stuff|current
|
||||
sub1=>subroutine: My Subroutine|invalid
|
||||
cond=>condition: Yes
|
||||
or No?|approved:>http://www.google.com
|
||||
c2=>condition: Good idea|rejected
|
||||
io=>inputoutput: catch something...|future
|
||||
|
||||
st->op1(right)->cond
|
||||
cond(yes, right)->c2
|
||||
cond(no)->sub1(left)->op1
|
||||
c2(yes)->io->e
|
||||
c2(no)->op2->e
|
||||
```
|
||||
|
||||
## Sequence diagram
|
||||
|
||||
```sequence
|
||||
Title: Here is a title
|
||||
A->B: Normal line
|
||||
B-->C: Dashed line
|
||||
C->>D: Open arrow
|
||||
D-->>A: Dashed open arrow
|
||||
```
|
||||
|
||||
## Flowchart
|
||||
|
||||
```mermaid
|
||||
graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;
|
||||
```
|
||||
|
||||
## Sequence diagram
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Alice
|
||||
participant Bob
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->>John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Some note
|
||||
John-->>Alice: Great!
|
||||
John->>Bob: How about you?
|
||||
Bob-->>John: Jolly good!
|
||||
```
|
||||
|
||||
## Gantt diagram
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
dateFormat YYYY-MM-DD
|
||||
title Adding GANTT diagram to mermaid
|
||||
excludes weekdays 2014-01-10
|
||||
|
||||
section A section
|
||||
Completed task :done, des1, 2014-01-06,2014-01-08
|
||||
Active task :active, des2, 2014-01-09, 3d
|
||||
Future task : des3, after des2, 5d
|
||||
Future task2 : des4, after des3, 5d
|
||||
```
|
||||
|
||||
## Class diagram (experimental)
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
Class03 *-- Class04
|
||||
Class05 o-- Class06
|
||||
Class07 .. Class08
|
||||
Class09 --> C2 : Where am i?
|
||||
Class09 --* C3
|
||||
Class09 --|> Class07
|
||||
Class07 : equals()
|
||||
Class07 : Object[] elementData
|
||||
Class01 : size()
|
||||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
Class08 <--> C2: Cool label
|
||||
```
|
||||
</pre>
|
||||
|
||||
## PlantUML
|
||||
|
||||
Please visit [PlantUML website](https://plantuml.com/) for more details.
|
||||
|
||||
```plantuml
|
||||
@startuml
|
||||
Alice -> Bob: Authentication Request
|
||||
Bob --> Alice: Authentication Response
|
||||
|
||||
Alice -> Bob: Another authentication Request
|
||||
Alice <-- Bob: Another authentication Response
|
||||
@enduml
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Raw HTML
|
||||
|
||||
Any text between `<` and `>` that looks like an HTML tag will be parsed as a raw HTML tag and rendered to HTML without escaping.
|
||||
|
||||
Example:
|
||||
|
||||
```markdown
|
||||
**Visit <a href="https://github.com">Jon Schlinkert's GitHub Profile</a>.**
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
**Visit <a href="https://github.com">Jon Schlinkert's GitHub Profile</a>.**
|
||||
|
||||
## Escaping with backslashes
|
||||
|
||||
Any ASCII punctuation character may be escaped using a single backslash.
|
||||
|
||||
Example:
|
||||
|
||||
```markdown
|
||||
\*this is not italic*
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
\*this is not italic*
|
||||
|
||||
<br>
|
||||
|
||||
## Credits
|
||||
|
||||
This markdown cheatsheet was created by [@jonschlinkert](https://twitter.com/jonschlinkert) and modified. The source can be found [here](https://gist.github.com/jonschlinkert/5854601).
|
||||
@ -1,16 +0,0 @@
|
||||
# Portable Mode
|
||||
|
||||
MarkText stores all user configuration inside the [application data directory](APPLICATION_DATA_DIRECTORY.md) that can be changed with `--user-data-dir` command-line flag.
|
||||
|
||||
## Linux and Windows
|
||||
|
||||
On Linux and Windows you can also create a directory called `marktext-user-data` to save all user data inside the directory. Like:
|
||||
|
||||
```
|
||||
marktext-portable/
|
||||
├── marktext (Linux) or MarkText.exe (Windows)
|
||||
├── marktext-user-data/
|
||||
├── resources/
|
||||
├── THIRD-PARTY-LICENSES.txt
|
||||
└── ...
|
||||
```
|
||||
@ -1,29 +0,0 @@
|
||||
# User Documentation
|
||||
|
||||
Welcome to the end-user documentation of MarkText.
|
||||
|
||||

|
||||
|
||||
**Quick start:**
|
||||
|
||||
- [Basics](BASICS.md)
|
||||
- [Editing in depth](EDITING.md)
|
||||
- [Spelling](SPELLING.md)
|
||||
- [Markdown syntax](MARKDOWN_SYNTAX.md)
|
||||
|
||||
**Further documents:**
|
||||
|
||||
- [Frequently asked questions (FAQ)](FAQ.md)
|
||||
- [Application data directory](APPLICATION_DATA_DIRECTORY.md)
|
||||
- [Command line interface](CLI.md)
|
||||
- [Environment variables](ENVIRONMENT.md)
|
||||
- [Export a document](EXPORT.md)
|
||||
- [Image uploader configuration](IMAGE_UPLOADER_CONFIGRATION.md)
|
||||
- [Installation instructions](../README.md#download-and-installation)
|
||||
- [Key bindings](KEYBINDINGS.md)
|
||||
- [Portable mode](PORTABLE.md)
|
||||
- [Preferences](PREFERENCES.md)
|
||||
- [Themes](THEMES.md)
|
||||
- [Themes for exporting](EXPORT_THEMES.md)
|
||||
|
||||
Interested in developer documentation? Please see [here](dev/README.md).
|
||||
@ -1,35 +0,0 @@
|
||||
# Spelling
|
||||
|
||||
MarkText can automatically check your text for misspelled words as you type and suggest corrections. You just need to enable spell checking in settings under *spelling* to never miss a misspelled word. We're using Hunspell for Linux and older Windows versions and on macOS and Window 10 you can choose between Hunspell or the system spell checker (default). You can control the default proofing language via settings but can change the language at runtime via right-click menu `Change Language` entry under `Spelling` without changing the default language. By default MarkText only support American English for Hunspell and the local available languages for the system spell checker. You can download 42 languages for Hunspell and many more for macOS and Windows 10 via system settings.
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
**Automatic language detection:**
|
||||
|
||||
MarkText can try to automatically detect the language while typing and we're currently support over 160 languages by Compact Language Detector.
|
||||
|
||||
**Don't underline misspelled words:**
|
||||
|
||||
If you don't like that all spelling mistakes are red highlighted, you can disable this feature in settings but still benefit from manually spell checking via right-click menu. Disabling constantly spell checking will also improve performance overall.
|
||||
|
||||
**Adding words to dictionary:**
|
||||
|
||||
You can add words to the selected dictionary by right-clicking on a misspelled word and select `Add to Dictionary` or remove a previously added word. If you want to temporary ignore a word, select `Ignore`.
|
||||
|
||||
## Manage dictionaries
|
||||
|
||||
### macOS spell checker
|
||||
|
||||
You need to add the additional language dictionaries via *"Language & Region"* in your system preferences pane.
|
||||
|
||||
### Windows spell checker
|
||||
|
||||
On Windows 10, you need to add additional language dictionaries via *"Language"* in your *"Time & language"* settings. Add the additional language(s) and download the *"Basic typing"* language option for each language.
|
||||
|
||||
### Hunspell
|
||||
|
||||
Please go to spelling settings and scroll to the bottom. Now you see a list of available language dictionaries and can add additional dictionaries via the drop-down menu at the bottom. Please note that an active internet connection is required to download a dictionary!
|
||||
|
||||

|
||||
@ -1,3 +0,0 @@
|
||||
# Themes
|
||||
|
||||
MarkText currently doesn't support user-defined application themes. This feature is planned for v0.17.0.
|
||||
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 199 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 643 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 700 KiB |
@ -1,71 +0,0 @@
|
||||
# Project Architecture
|
||||
|
||||
## Overview
|
||||
|
||||
- `.`: Configuration files
|
||||
- `package.json`: Project settings
|
||||
- `build/`: Contains generated binaries
|
||||
- `dist/`: Build files for deployment
|
||||
- `docs/`: Documentation and assets
|
||||
- `resources/`: Application assets using at build time
|
||||
- `node_modules/`: Dependencies
|
||||
- `src`: MarkText source code
|
||||
- `common/`: Common source files that only require Node.js APIs. Code from this folder can be used in all other folders except `muya`.
|
||||
- `main/`: Main process source files that require Electron main-process APIs. `main` files can use `common` source code.
|
||||
- `muya/`: MarkTexts backend that only allow pure JavaScript, BOM and DOM APIs. Don't use Electron or Node.js APIs!
|
||||
- `renderer`: Frontend that require Electron renderer-process APIs and may use `common` or `muya` source code.
|
||||
- `static/`: Application assets (images, themes, etc)
|
||||
- `test/`: Contains (unit) tests
|
||||
|
||||
## Introduction to MarkText
|
||||
|
||||
MarkText is a realtime preview (WYSIWYG) editor for markdown with various markdown extensions and our philosophy is to keep things clean, simple and minimal. The application is build with HTML, JS and CSS on top of Electron. Currently we're using a few native node libraries and our UI is build with Vue/Vuex. MarkText can be split in three parts: the core called Muya, the main- and renderer process.
|
||||
|
||||
Muya provides realtime preview and markdown editing via multiple modules based on a block structure. You can imagine it as the editor backend with modules for markdown parsing, data store as block structure, markdown document transformations according CommonMark and GitHub Flavored Markdown specification with some extra specifications, event listeners and an exporter to generate standalone HTML and markdown files but also to generate the WYSIWYG editor. Muya is single threaded as well as MarkText but use asynchronous functions to boost performance.
|
||||
|
||||
> NOTE: MarkText's source-code editor is provided by CodeMirror and not well optimized nor feature rich. It's not part of Muya and an editor (renderer process) feature that load the markdown text from Muya (export), operate on it and re-import the text into Muya when switching to preview mode.
|
||||
|
||||
> NOTE: Muya requires a core refactoring to provide better modularization, APIs and plugins. Furthermore, the data structure need improvements for better performance and stability.
|
||||
|
||||
The editor represents the view and is split into two parts. The first is the main process that have full access to Electron and all OS features. It's mainly used for IO, user interaction with native dialogs and controlls the editor windows. The main process should not (be long) blocked by synchronous operations. The renderer process is the real editor and also a host for Muya. It's responsible for all graphical elements (`src/renderer/components`), data (`src/renderer/store`) and data synchronization. A renderer process is spawned for each window, operates on its own and is controlled by the main process. It contains two text editors: the realtime preview editor provided by Muya and the source-code one by CodeMirror with special features such as tabs, sidebar and editing features.
|
||||
|
||||
### Application entry points
|
||||
|
||||
There are two entry points to the application:
|
||||
|
||||
- `src/main/index.js` for the main process that is executed first and only once per instance. Once the application is initialized, it's safe to access all the environment variables and single-instances and the application (`App`) is started (`src/main/app/index.js`). You can use the application after `App::init()` is run successfully.
|
||||
- `src/renderer/main.js` for each editor window. At the beginning libraries are loaded, the window is initialized and Vue components are mounted.
|
||||
|
||||
### How Muya work
|
||||
|
||||
TBD
|
||||
|
||||
- Overview about Muya components
|
||||
- How Muya work internal
|
||||
- Data structure
|
||||
|
||||
### Main- and renderer process communication
|
||||
|
||||
Main- and renderer process communicate asynchronously via [inter-process communication (IPC)](code/IPC.md) and it's mainly used for IO and user interaction with native dialogs.
|
||||
|
||||
### Editor window (renderer process)
|
||||
|
||||
TBD
|
||||
|
||||
### Examples
|
||||
|
||||
#### Opening a markdown document and render it
|
||||
|
||||
`MarkdownDocument` is a document that represents a markdown file on disk or an untitled document. To get a markdown document you can use the `loadMarkdownFile` function that asynchronously returns a `RawMarkdownDocument` (= `MarkdownDocument` with some additional information) in the main process.
|
||||
|
||||
**Overall steps to open a file:**
|
||||
|
||||
1. Click `File -> Open File` and a file dialog is shown that emit `app-open-file-by-id` with the editor window id to open the file in and resolved absolute file path.
|
||||
2. The application (`App` instance) tries to find the specified editor and call `openTab` on the editor window. A new editor window is created if no editor window exists.
|
||||
3. The editor window tries to load the markdown file via `loadMarkdownFile` and send the result via the `mt::open-new-tab` event to the renderer process.
|
||||
- Each opened file is also added to the filesystem watcher and the full path is saved to track opened file in the current editor window.
|
||||
4. The event is triggered in `src/renderer/store/editor.js` (renderer process), does some checks and create a new document state that represent a markdown document and tab state.
|
||||
5. The new created tab is either opened and the `file-changed` event is emitted or just added to the tab state.
|
||||
6. Both Muya and the source-code editor listen on this event and change the markdown document accordingly.
|
||||
|
||||
> NOTE: We currently have no high level APIs to make changes to the document text or lines automatically. All modifications need user interaction!
|
||||
@ -1,57 +0,0 @@
|
||||
# Build Instructions
|
||||
|
||||
Clone the repository:
|
||||
|
||||
```
|
||||
git clone https://github.com/marktext/marktext.git
|
||||
```
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Before you can get started developing, you need set up your build environment:
|
||||
|
||||
- Node.js `>=v16` but `<v17` and yarn
|
||||
- Python `>=v3.6` for node-gyp
|
||||
- C++ compiler and development tools
|
||||
- Build is supported on Linux, macOS and Windows
|
||||
|
||||
**Additional development dependencies on Linux:**
|
||||
|
||||
- libX11 (with headers)
|
||||
- libxkbfile (with headers)
|
||||
- libsecret (with headers)
|
||||
- libfontconfig (with headers)
|
||||
|
||||
On Debian-based Linux: `sudo apt-get install libx11-dev libxkbfile-dev libsecret-1-dev libfontconfig-dev`
|
||||
|
||||
On Red Hat-based Linux: `sudo dnf install libX11-devel libxkbfile-devel libsecret-devel fontconfig-devel`
|
||||
|
||||
**Additional development dependencies on Windows:**
|
||||
|
||||
- Windows 10 SDK (only needed before Windows 10)
|
||||
- Visual Studio 2019 (preferred)
|
||||
|
||||
### Let's build
|
||||
|
||||
1. Go to `marktext` folder
|
||||
2. Install dependencies: `yarn install` or `yarn install --frozen-lockfile`
|
||||
3. Build MarkText binaries and packages: `yarn run build`
|
||||
4. MarkText binary is located under `build` folder
|
||||
|
||||
Copy the build app to applications folder, or if on Windows run the executable installer.
|
||||
|
||||
### Important scripts
|
||||
|
||||
```
|
||||
$ yarn run <script> # or npm run <script>
|
||||
```
|
||||
|
||||
| Script | Description |
|
||||
| --------------- | ------------------------------------------------ |
|
||||
| `build` | Build MarkText binaries and packages for your OS |
|
||||
| `build:bin` | Build MarkText binary for your OS |
|
||||
| `dev` | Build and run MarkText in developer mode |
|
||||
| `lint` | Lint code style |
|
||||
| `test` / `unit` | Run unit tests |
|
||||
|
||||
For more scripts please see `package.json`.
|
||||
@ -1,33 +0,0 @@
|
||||
# Debugging
|
||||
|
||||
## Use Visual Studio Code
|
||||
|
||||
The most simplest way is to debug using the `Debug MarkText` configuration. You can set breakpoints and use the `debugger` statement.
|
||||
|
||||
**Prerequisites:**
|
||||
|
||||
- [Debugger for Chrome](https://marketplace.visualstudio.com/itemdetails?itemName=msjsdiag.debugger-for-chrome)
|
||||
|
||||
## Use Chrome Developer Tools
|
||||
|
||||
You can use the built-in developer tools via `View -> Toggle Developer Tools` in debug mode or connect via `chrome://inspect` using port `5858` for the main process and `8315` for the renderer process when launched via `yarn run dev`.
|
||||
|
||||
### Debug built application
|
||||
|
||||
You can use the default Electron command-line parameters to enable debug mode as described above.
|
||||
|
||||
```shell
|
||||
$ marktext --inspect=5858 --remote-debugging-port=8315
|
||||
```
|
||||
|
||||
## Debug slow startup performance
|
||||
|
||||
Regardless of whether you are using the built or development version, you can use the [node-profiler](https://github.com/fxha/node-profiler) to analysis startup issues. Please follow the tool description for setup. Afterwards, launch the following commands in parallel (e.g. use three terminal windows and launch MarkText last).
|
||||
|
||||
```shell
|
||||
$ node-profiler main
|
||||
$ node-profiler renderer
|
||||
$ marktext --inspect=5858 --remote-debugging-port=8315
|
||||
```
|
||||
|
||||
After the successful launch of MarkText, press `Ctrl+C` on both `node-profiler` instances. The tools created two files named `main.cpuprofile` and `renderer.cpuprofile`. You can now analyse these files via *Chrome Developer Tools* or *Visual Studio Code*.
|
||||
@ -1,21 +0,0 @@
|
||||
# Interface
|
||||
|
||||
## Main interface
|
||||
|
||||

|
||||
|
||||
- Green: titlebar
|
||||
- Orange: sidebar
|
||||
- Red: editor with tabs and per-tab notification at the bottom
|
||||
|
||||
### Titlebar
|
||||
|
||||
The titlebar is located at the top of the window and shows the current opened file path and the menu on Linux and Windows. On macOS we're using client-side decorations (CSD) that look similar to the picture above. On Linux and Windows there are two type of titlebar: a custom CSD that you can see in the image above and the native one.
|
||||
|
||||
### Sidebar
|
||||
|
||||
The sidebar is an optional feature of MarkText that contains three panels and has a variable width. The first pannel is a tree view of the opened root directory. The latter two are a folder searcher (find in files) that is powered by ripgrep and table of contents of the currently opened document.
|
||||
|
||||
### Editor
|
||||
|
||||
The editor is the core element that hosts the realtime preview editor called Muya and consists of three parts. Tabs are located at the top and at the bottom the per-tab notification bar is located for events like file changed or deleted. The main part is the editor that is either provided by Muya or CodeMirror for the source-code editor. There are multiple overlays available like inline toolbar, emoji picker, quick insert or image tools.
|
||||
@ -1,11 +0,0 @@
|
||||
# Developer Documentation
|
||||
|
||||
Welcome to developer documentation of MarkText.
|
||||
|
||||
- [Project architecture](ARCHITECTURE.md)
|
||||
- [Build instructions](BUILD.md)
|
||||
- [Debugging](DEBUGGING.md)
|
||||
- [Interface](INTERFACE.md)
|
||||
- [Steps to release MarkText](RELEASE.md)
|
||||
- [Prepare a hotfix](RELEASE_HOTFIX.md)
|
||||
- [Internal documentation](code/README.md)
|
||||
@ -1,28 +0,0 @@
|
||||
# Steps to release MarkText
|
||||
|
||||
- Create a release candidate
|
||||
- Create branch `release-v%version%`
|
||||
- Set environment variable `MARKTEXT_IS_STABLE` to `1` (default on AppVeyor and Travis CI)
|
||||
- Ensure [changelog](https://github.com/marktext/marktext/blob/master/.github/CHANGELOG.md) is up-to-date
|
||||
- Bump version in `package.json` and changelog
|
||||
- Update all `README.md` files
|
||||
- Bump Flathub version ([marktext.appdata.xml](https://github.com/marktext/marktext/blob/master/resources/linux/marktext.appdata.xml))
|
||||
- Create commit `release version %version%`
|
||||
- Ensure all tests pass
|
||||
- A new draft release should be available or create one
|
||||
- Publish GitHub release
|
||||
- Add git tag `v%version%`
|
||||
- Add changelog
|
||||
- Add SHA256 checksums
|
||||
- Update website and documentation
|
||||
- Publish [Flathub package](https://github.com/flathub/com.github.marktext.marktext)
|
||||
- Ensure native dependencies
|
||||
- Update `runtime` and `SDK` if needed
|
||||
- Bump version and update URLs
|
||||
- Test the package (`scripts/build-bundle.sh && scripts/test-marktext.sh`)
|
||||
- Create commit `Update to v%version%`
|
||||
|
||||
## Work after releasing
|
||||
|
||||
- Ensure all issues in the changelog are closed
|
||||
- :relaxed: :tada:
|
||||
@ -1,14 +0,0 @@
|
||||
# Prepare a hotfix
|
||||
|
||||
- Create a hotfix branch: `git checkout -b hotfix-vX.Y.Z`
|
||||
- Make changes to the code and/or `cherry-pick` changes from another branch and commit changes.
|
||||
- Test the hotfix and binaries.
|
||||
- [Release](RELEASE.md) a new MarkText version.
|
||||
|
||||
**How to cherry pick?**
|
||||
|
||||
You can pick commits from another branch and apply the commit to the current one.
|
||||
|
||||
- `git checkout hotfix-vX.Y.Z`
|
||||
- `git cherry-pick <full commit hash>`
|
||||
- Please resolve all conflicts and `git commit` the changes if needed.
|
||||
|
Before Width: | Height: | Size: 148 KiB |
@ -1,96 +0,0 @@
|
||||
# Commands
|
||||
|
||||
A command can execute a procedure and is shown in the command palette or can be run from event bus. We distinguish between static commands that are defined at compile time (maybe completed at runtime) and dynamtic commands that are created at runtime. Static commands are pure objects that are listed as array and most dynamic commands are classes that need access to the editor or other components. Each command can have nestled subcommands that have the same properties like a command. A root command is the command from which all subcommands are loaded that are displayed on screen. You can change the root command by calling `bus.$emit('show-command-palette', <command-reference>)`. Please note: a root command has special requirements such as a `run` method.
|
||||
|
||||
**Static command:**
|
||||
|
||||
```js
|
||||
{
|
||||
id: 'file.new-tab', // Unique id
|
||||
description: 'File: New Tab',
|
||||
execute: async () => {
|
||||
// Set `null` as first parameter to fake the sender event.
|
||||
ipcRenderer.emit('mt::new-untitled-tab', null)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Dynamic command:**
|
||||
|
||||
You can use either a class or object at runtime to register a command via the bus event `CMD::register-command`. A simple class example can be found below or a more complex [here](https://github.com/marktext/marktext/blob/develop/src/renderer/commands/quickOpen.js).
|
||||
|
||||
```js
|
||||
export class ExampleCommand {
|
||||
constructor () {
|
||||
this.id = 'example-id'
|
||||
this.description = 'Example'
|
||||
}
|
||||
|
||||
// Execute the command.
|
||||
async execute () {
|
||||
// No-op
|
||||
}
|
||||
}
|
||||
|
||||
export class Example2Command {
|
||||
constructor () {
|
||||
this.id = 'example-2-id'
|
||||
this.description = 'Example 2'
|
||||
this.placeholder = '' // Textbox placeholder (optional)
|
||||
this.title = '' // Tooltip (optional)
|
||||
this.subcommands = [] // (optional)
|
||||
this.subcommandSelectedIndex = -1 // Required if `subcommands` defined (optional)
|
||||
}
|
||||
|
||||
// Prepare subcommands and run the command when the entry is set as root.
|
||||
// `run` must prepare the `subcommands`.
|
||||
// `run` is only required if the command can be loaded as root command. If
|
||||
// `execute` and `run` are not defined but `subcommands` is defined the
|
||||
// subcommands are automatically loaded when the command is selected. Please
|
||||
// note that `subcommands` must be available and the command cannot be loaded
|
||||
// as root command when no `run` method is available (optional).
|
||||
run = async () => {
|
||||
this.subcommands = [{
|
||||
id: 'example-2-sub-1',
|
||||
description: 'Subcommand 1',
|
||||
execute: async () => {
|
||||
// No-op
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'example-2-sub-2',
|
||||
description: 'Subcommand 2',
|
||||
execute: async () => {
|
||||
// No-op
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
// Run when the command palette is unloaded and the command is root.
|
||||
unload = () => {
|
||||
this.subcommands = []
|
||||
}
|
||||
|
||||
// Handle search queries when the entry is root. Must return available
|
||||
// entries that should be shown in UI. If not defined the default searcher
|
||||
// is used (optional).
|
||||
search = async query => {
|
||||
return []
|
||||
}
|
||||
|
||||
// Execute the command. Required but ignore if the parent has a
|
||||
// `executeSubcommand` method.
|
||||
execute = async () => {
|
||||
// The timeout is required to hide the command palette and then show again
|
||||
// to prevent issues.
|
||||
await delay(100)
|
||||
bus.$emit('show-command-palette', this)
|
||||
}
|
||||
|
||||
// When defined this method is called when a subcommand is executed
|
||||
// instead `execute` on subcommand (optional).
|
||||
executeSubcommand = async id => {
|
||||
// No-op
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -1,41 +0,0 @@
|
||||
# Inter-Process Communication (IPC)
|
||||
|
||||
[Electron](https://electronjs.org/docs/api/ipc-main) provides `ipcMain` and `ipcRenderer` to communicate asynchronously between the main process and renderer processes. The event name/channel must be prefixed with `mt::` if used between main process and renderer processes. The default argument list will be `(event, ...args)`. The event name/channel is not prefixed when using `ipcMain` to emit events to the main process directly and emitted events don't have an `event` parameter. The parameter list will only be `(...args)`! When simulate a renderer event you must specify a [event](https://electronjs.org/docs/api/ipc-main#event-object) parameter (`null` or `undefined` may lead to unexpected exceptions).
|
||||
|
||||
## Examples
|
||||
|
||||
Listening to a renderer event in the main process:
|
||||
|
||||
```js
|
||||
import { ipcMain } from 'electron'
|
||||
|
||||
// Listen for renderer events
|
||||
ipcMain.on('mt::some-event-name', (event, arg1, arg2) => {
|
||||
// ...
|
||||
|
||||
// Send a direct response to the renderer process
|
||||
event.sender.send('mt::some-event-name-response', 'pong')
|
||||
})
|
||||
|
||||
// Listen for main events
|
||||
ipcMain.on('some-event-name', (arg1, arg2) => {
|
||||
// ...
|
||||
})
|
||||
|
||||
|
||||
ipcMain.emit('some-event-name', 'arg 1', 'arg 2')
|
||||
// ipcMain.emit('mt::some-event-name-response', undefined, 'arg 1', 'arg 2') // crash because event is used
|
||||
```
|
||||
|
||||
Listening to a main event in the renderer process:
|
||||
|
||||
```js
|
||||
import { ipcRenderer } from 'electron'
|
||||
|
||||
// Listen for main events
|
||||
ipcRenderer.on('mt::some-event-name-response', (event, arg1, arg2) => {
|
||||
// ...
|
||||
})
|
||||
|
||||
ipcRenderer.send('mt::some-event-name-response', 'arg 1', 'arg 2')
|
||||
```
|
||||
@ -1,7 +0,0 @@
|
||||
# Internal Documentation
|
||||
|
||||
WIP documentation of MarkText internals.
|
||||
|
||||
- [Block addition properties and its value](BLOCK_ADDITION_PROPERTY.md)
|
||||
- [Commands](COMMANDS.md)
|
||||
- [Inter-Process Communication (IPC)](IPC.md)
|
||||
@ -1,117 +0,0 @@
|
||||
# Editor
|
||||
|
||||
TBD
|
||||
|
||||
## Internal
|
||||
|
||||
### Raw markdown document
|
||||
|
||||
```typescript
|
||||
interface IMarkdownDocumentRaw
|
||||
{
|
||||
// Markdown content
|
||||
markdown: string,
|
||||
// Filename
|
||||
filename: string,
|
||||
// Full path (may be empty?)
|
||||
pathname: string,
|
||||
|
||||
// Document encoding
|
||||
encoding: string,
|
||||
// "lf" or "crlf"
|
||||
lineEnding: string,
|
||||
// Convert document ("lf") to `lineEnding` when saving
|
||||
adjustLineEndingOnSave: boolean
|
||||
|
||||
// Whether the document has mixed line endings (lf and crlf) and was converted to lf.
|
||||
isMixedLineEndings: boolean
|
||||
}
|
||||
```
|
||||
|
||||
### Markdowm document
|
||||
|
||||
A markdown document (`IMarkdownDocument`) represent a file.
|
||||
|
||||
```typescript
|
||||
interface IMarkdownDocument
|
||||
{
|
||||
// Markdown content
|
||||
markdown: string,
|
||||
// Filename
|
||||
filename: string,
|
||||
// Full path (may be empty?)
|
||||
pathname: string,
|
||||
|
||||
// Document encoding
|
||||
encoding: string,
|
||||
// "lf" or "crlf"
|
||||
lineEnding: string,
|
||||
// Convert document ("lf") to `lineEnding` when saving
|
||||
adjustLineEndingOnSave: boolean
|
||||
}
|
||||
```
|
||||
|
||||
```typescript
|
||||
interface IMarkdownDocumentOptions
|
||||
{
|
||||
// Document encoding
|
||||
encoding: string,
|
||||
// "lf" or "crlf"
|
||||
lineEnding: string,
|
||||
// Convert document ("lf") to `lineEnding` when saving
|
||||
adjustLineEndingOnSave: boolean
|
||||
}
|
||||
```
|
||||
|
||||
### File State
|
||||
|
||||
Internal state of a markdown document. `IMarkdownDocument` is used to create a `IFileState`.
|
||||
|
||||
```typescript
|
||||
interface IDocumentState
|
||||
{
|
||||
isSaved: boolean,
|
||||
pathname: string,
|
||||
filename: string,
|
||||
markdown: string,
|
||||
encoding: string,
|
||||
lineEnding: string,
|
||||
adjustLineEndingOnSave: boolean,
|
||||
history: {
|
||||
stack: Array<any>,
|
||||
index: number
|
||||
},
|
||||
cursor: any,
|
||||
wordCount: {
|
||||
paragraph: number,
|
||||
word: number,
|
||||
character: number,
|
||||
all: number
|
||||
},
|
||||
searchMatches: {
|
||||
index: number,
|
||||
matches: Array<any>,
|
||||
value: string
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### ...
|
||||
|
||||
TBD
|
||||
|
||||
## View
|
||||
|
||||
TBD
|
||||
|
||||
### Sidebar
|
||||
|
||||
TBD
|
||||
|
||||
### Tabs
|
||||
|
||||
TBD
|
||||
|
||||
### Document
|
||||
|
||||
TBD
|
||||
|
Before Width: | Height: | Size: 231 KiB |
|
Before Width: | Height: | Size: 1.4 MiB |
@ -1,181 +0,0 @@
|
||||
> **This documentation is outdated, based on the original readme from 22 June 2018!**
|
||||
|
||||
<p align="center"><img src="../../static/logo-small.png" alt="marktext" width="100" height="100"></p>
|
||||
|
||||
<h1 align="center">MarkText</h1>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://twitter.com/intent/tweet?via=marktextme&url=https://github.com/marktext/marktext/&text=What%20do%20you%20want%20to%20say%20to%20me?&hashtags=happyMarkText">
|
||||
<img src="https://img.shields.io/twitter/url/https/github.com/marktext/marktext.svg?style=for-the-badge" alt="twitter">
|
||||
</a>
|
||||
</div>
|
||||
<div align="center">
|
||||
<strong>:high_brightness:Nouvelle génération d'éditeur markdown:crescent_moon:</strong>
|
||||
</div>
|
||||
<div align="center">
|
||||
Une application <code>Electron</code> disponible sous OS X, Windows et Linux
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div align="center">
|
||||
<!-- Version -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://badge.fury.io/gh/jocs%2Fmarktext.svg" alt="website">
|
||||
</a>
|
||||
<!-- License -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/github/license/marktext/marktext.svg" alt="LICENSE">
|
||||
</a>
|
||||
<!-- Build Status -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://travis-ci.org/marktext/marktext.svg?branch=master" alt="build">
|
||||
</a>
|
||||
<!-- Downloads total -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/total.svg" alt="total download">
|
||||
</a>
|
||||
<!-- Downloads latest release -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/v0.17.1/total.svg" alt="latest download">
|
||||
</a>
|
||||
<!-- deps -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/hackage-deps/v/lens.svg" alt="dependencies">
|
||||
</a>
|
||||
<!-- sponsors -->
|
||||
<a href="https://opencollective.com/marktext">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors/badge.svg?label=SilverSponsors&color=brightgreen" alt="sponsors">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<h3>
|
||||
<a href="https://marktext.github.io/website">
|
||||
Site web
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#features">
|
||||
Fonctionnalités
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#download-and-installation">
|
||||
Téléchargement
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#development">
|
||||
Dévelopment
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#contribution">
|
||||
Contribution
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>Cette éditeur est écrit avec ❤︎ par
|
||||
<a href="https://github.com/Jocs">Jocs</a> et ses
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors">
|
||||
contributeurs
|
||||
</a>
|
||||
</sub>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- Rendu en temps réelle et utilise [snabbdom](https://github.com/snabbdom/snabbdom) en tant que moteur de rendu.
|
||||
- Supporte [CommonMark Spec](https://spec.commonmark.org/0.29/) et [GitHub Flavored Markdown Spec](https://github.github.com/gfm/).
|
||||
- Supporte les paragraphes et raccourices clavier afin d'améliorer votre productivité.
|
||||
- Export de votre markdown en **HTML** et **PDF**.
|
||||
- Thèmes Sombre et Clair.
|
||||
- Plusieurs mode d'édition: **Mode code source**, **Mode machine à écrire**, **Mode focus**.
|
||||
|
||||
<h4 align="center">:crescent_moon:Thèmes Sombre et Clair:high_brightness:</h4>
|
||||
|
||||
| Sombre :crescent_moon: | Clair :high_brightness: |
|
||||
|:------------------------------------------------------------------:|:-------------------------------------------------------------------:|
|
||||
|  |  |
|
||||
|
||||
<h4 align="center">:smile_cat:Mode d'édition:dog:</h4>
|
||||
|
||||
| Code Source | Machine à écrire | Focus |
|
||||
|:--------------------------------------------------------------------:|:------------------------------------------------------------------------:|:-------------------------------------------------------------------:|
|
||||
|  |  |  |
|
||||
|
||||
## Pourquoi écrire un nouvel éditeur?
|
||||
|
||||
1. J'adore écrire. J'ai utilisé de nombreux éditeurs markdown et pourtant, aucun ne correspondait réellement à mes besoins. **MarkText** utilise un DOM virtuel pour le rendu ce qui le rend très efficace. C'est aussi un outil open source pour tous les amoureux de l'écriture et du markdown.
|
||||
2. Comme mentionné **MarkText** est et restera open source. Il est aussi espérer que des amoureux du markdown puissent participer au dévelopement du projet afin de rendre **MarkText** un éditeur parmis les plus populaire.
|
||||
3. Il y a beaucoup d'éditeur markdown et chacun de ses éditeurs à ses propres caractéristiques mais il est aussi difficile de pouvoir satisfaire tout les besoins utilisateurs. J'espère que **MarkText** pourra satisfaire vos besoins le plus possible. De plus **MarkText** n'est pas parfait mais nous faisons de notre mieux pour aller dans cette direction.
|
||||
|
||||
## Download and Install
|
||||
|
||||

|
||||
|
||||
|  |  |  |
|
||||
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
| [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x64.dmg) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-setup.exe) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x86_64.AppImage) |
|
||||
|
||||
Vous ne trouvez pas votre système? Aller sur la [page des releases](https://github.com/marktext/marktext/releases). Toujours pas? Ouvrez une [issue](https://github.com/marktext/marktext/issues).
|
||||
|
||||
Vous voulez voir une nouvelle feature dans la prochaine version? Consulté le [CHANGELOG](../../.github/CHANGELOG.md)
|
||||
|
||||
Si vous êtes sur OS X, vous pouvez installer MarkText via [**homebrew cask**](https://github.com/caskroom/homebrew-cask), pour commencer à utiliser Homebrew-Cask, vous avez seulement besoin d'avoir [Homebrew](https://brew.sh/) installer sur votre machine.
|
||||
|
||||
```bash
|
||||
brew install --cask mark-text
|
||||
```
|
||||
|
||||

|
||||
|
||||
#### macOS and Windows
|
||||
|
||||
Télécharger et installer simplement MarkText via le client d'installation.
|
||||
|
||||
#### Linux
|
||||
|
||||
Veuillez suivre [les instructions d'installations Linux](../../docs/LINUX.md).
|
||||
|
||||
## Development
|
||||
|
||||
Si vous souhaiter participer à l'amélioration de **MarkText**, référer vous au [instructions de dévelopement](../../CONTRIBUTING.md#build-instructions).
|
||||
|
||||
Si vous avez des questions pendant votre utilisation, vous êtes les bienvenues pour ouvrir une issue, mais j'espère que vous suivrez le format requis. Bien sûr, si vous soumettez une PR directement, cela sera apprécié.
|
||||
|
||||
## Contribution
|
||||
|
||||
**MarkText** est en plein déveloment, prenez soin d'étudier le [guide de contribution](../../CONTRIBUTING.md) avant de faire une pull request. Vous souhaitez plus de fonctionnalités à MarkText? Rendez-vous sur la [TODO LIST](../../.github/TODOLIST.md) pour ouvrir des issues.
|
||||
|
||||
## Backers
|
||||
|
||||
Merci à tous nos collaborateurs! 🙏 [[Deviens un backer](https://opencollective.com/marktext#backers)]
|
||||
|
||||
<a href="https://opencollective.com/marktext#backers" target="_blank"><img src="https://opencollective.com/marktext/tiers/backer.svg?avatarHeight=36" /></a>
|
||||
|
||||
## Sponsors
|
||||
|
||||
Supporter ce projet en devenant sponsor de celui-ci. Votre logo sera affiché ici ainsi qu'un lien vers votre site internet. [[Deviens un sponsor](https://opencollective.com/marktext#silver-sponsors)]
|
||||
|
||||
**Platinum Sponsors**
|
||||
|
||||
<a href="https://readme.io" target="_blank"><img src="../../docs/sponsor/readme.png" /></a>
|
||||
|
||||
## Contributors
|
||||
|
||||
Merci à tous les contributeurs ayant déjà participé à MarkText [[contributors](https://github.com/marktext/marktext/graphs/contributors)]
|
||||
|
||||
Un remerciement spécial à @[Yasujizr](https://github.com/Yasujizr) qui est l'auteur du logo de MarkText.
|
||||
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors"><img src="https://opencollective.com/marktext/contributors.svg?width=890" /></a>
|
||||
|
||||
|
||||
## License
|
||||
|
||||
[**MIT**](../../LICENSE).
|
||||
|
||||
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fmarktext%2Fmarktext?ref=badge_large)
|
||||
@ -1,247 +0,0 @@
|
||||
<p align="center"><img src="../../static/logo-small.png" alt="MarkText" width="100" height="100"></p>
|
||||
|
||||
<h1 align="center">MarkText</h1>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://twitter.com/intent/tweet?via=marktextme&url=https://github.com/marktext/marktext/&text=What%20do%20you%20want%20to%20say%20to%20app?&hashtags=happyMarkText">
|
||||
<img src="https://img.shields.io/twitter/url/https/github.com/marktext/marktext.svg?style=for-the-badge" alt="twitter">
|
||||
</a>
|
||||
</div>
|
||||
<div align="center">
|
||||
<strong>:high_brightness: 次世代マークダウンエディタ :crescent_moon:</strong><br>
|
||||
シンプルでエレガントなマークダウンエディタ: スピードと使いやすさをあなたに<br>
|
||||
<sub>Linux・macOS・Windowsで使用可能</sub>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div align="center">
|
||||
<!-- Version -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://badge.fury.io/gh/jocs%2Fmarktext.svg" alt="website">
|
||||
</a>
|
||||
<!-- License -->
|
||||
<a href="LICENSE">
|
||||
<img src="https://img.shields.io/github/license/marktext/marktext.svg" alt="LICENSE">
|
||||
</a>
|
||||
<!-- Build Status -->
|
||||
<a href="https://travis-ci.org/marktext/marktext/">
|
||||
<img src="https://travis-ci.org/marktext/marktext.svg?branch=master" alt="build">
|
||||
</a>
|
||||
<a href="https://ci.appveyor.com/project/marktext/marktext/branch/master">
|
||||
<img src="https://ci.appveyor.com/api/projects/status/l4gxgydj0i95hmxg/branch/master?svg=true" alt="build">
|
||||
</a>
|
||||
<!-- Downloads total -->
|
||||
<a href="https://github.com/marktext/marktext/releases">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/total.svg" alt="total download">
|
||||
</a>
|
||||
<!-- Downloads latest release -->
|
||||
<a href="https://github.com/marktext/marktext/releases/latest">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/v0.17.1/total.svg" alt="latest download">
|
||||
</a>
|
||||
<!-- sponsors -->
|
||||
<a href="https://opencollective.com/marktext">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors/badge.svg?label=SilverSponsors&color=brightgreen" alt="sponsors">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<h3>
|
||||
<a href="https://github.com/marktext/marktext">
|
||||
ウェブサイト
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="#features">
|
||||
特徴
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="#download">
|
||||
ダウンロード
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="#development">
|
||||
開発
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="#contribution">
|
||||
コントリビューション
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>多言語版:</sub>
|
||||
<a href="../../README.md">
|
||||
<span>:uk:</span>
|
||||
</a>
|
||||
<a href="zh_cn.md">
|
||||
<span>:cn:</span>
|
||||
</a>
|
||||
<a href="pl.md">
|
||||
<span>:poland:</span>
|
||||
</a>
|
||||
<a href="french.md">
|
||||
<span>:fr:</span>
|
||||
</a>
|
||||
<a href="tr.md">
|
||||
<span>:tr:</span>
|
||||
</a>
|
||||
<a href="spanish.md">
|
||||
<span>:es:</span>
|
||||
</a>
|
||||
<a href="pt.md">
|
||||
<span>:portugal:</span>
|
||||
</a>
|
||||
<a href="ko.md">
|
||||
<span>:kr:</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>This Markdown editor that could. Built with ❤︎ by
|
||||
<a href="https://github.com/Jocs">Jocs</a> and
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors">
|
||||
contributors
|
||||
</a>
|
||||
</sub>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<h2 align="center">MarkTextへの支援</h2>
|
||||
|
||||
MarkTextは、MITライセンスのオープンソースプロジェクトであり、Githubリリースページからいつでも無料で最新のMarkTextをダウンロードできます。MarkTextはまだ開発中のソフトウェアであり、開発を続けるためにはスポンサーからのご支援が必要です。どうかMarkTextへのご支援をよろしくお願い申し上げます。
|
||||
|
||||
- Patreonを介して継続的ご支援をいただける場合は[こちら](https://www.patreon.com/ranluo)から、また、一時寄付金をいただける場合は[こちら](https://github.com/Jocs/sponsor.me)からお願いいたします。
|
||||
- Open Collectiveを介してご支援をいただける場合は[こちら](https://opencollective.com/marktext)をご利用ください。
|
||||
|
||||
##### PatreonとOpen Collectiveの違い
|
||||
|
||||
Patreonを介した寄付は、MarkTextの開発および維持を行っているLuo Ran (@jocs)に直接届きます。Open Collectiveを介した寄付は、その額や出資者が公開されます。すべての出資金はMarkTextの開発、維持、オンラインおよびオフラインでの活動、そしてその他の必要なリソースの入手に使われます。PatreonかOpen Collectiveかに関わらず、すべての出資者のお名前もしくは会社のロゴは、MarkTextの公式サイトおよびReadmeに掲載いたします。
|
||||
|
||||
**Platinum Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/platinum-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Gold Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/gold-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Silver Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Bronze Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/bronze-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Backers**
|
||||
|
||||
<a href="https://opencollective.com/marktext#backers">
|
||||
<img src="https://opencollective.com/marktext/tiers/backer.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
## スクリーンショット
|
||||
|
||||

|
||||
|
||||
<h2 id="features">特徴</h2>
|
||||
|
||||
- WYSIWYGなリアルタイムプレビューと、執筆に没頭できるクリーンでシンプルなインターフェース
|
||||
- [CommonMark Spec](https://spec.commonmark.org/0.29/)と[GitHub Flavored Markdown Spec](https://github.github.com/gfm/)、および一部の[Pandoc Markdown](https://pandoc.org/MANUAL.html#pandocs-markdown)をサポート
|
||||
- KaTeXを用いた数式表示、Front matterや絵文字が使用可能
|
||||
- 段落とインラインショートカットを利用することで編集効率を向上
|
||||
- **HTML**ファイルと**PDF**ファイルを出力可能
|
||||
- **Cadmium Light**, **Material Dark**など様々なテーマ
|
||||
- 選べる編集モード: **Source Code mode**, **Typewriter mode**, **Focus mode**
|
||||
|
||||
<h4 align="center">:crescent_moon:テーマ:high_brightness:</h4>
|
||||
|
||||
| Cadmium Light | Dark |
|
||||
|:-------------------------------------------------------:|:-----------------------------------------------------:|
|
||||
|  |  |
|
||||
| Graphite Light | Materal Dark |
|
||||
|  |  |
|
||||
| Ulysses Light | One Dark |
|
||||
|  |  |
|
||||
|
||||
<h4 align="center">:smile_cat:編集モード:dog:</h4>
|
||||
|
||||
| Source Code | Typewriter | Focus |
|
||||
|:--------------------------:|:------------------------------:|:-------------------------:|
|
||||
|  |  |  |
|
||||
|
||||
## 開発の意図
|
||||
|
||||
1. 私は書くことが好きです。これまでに沢山のマークダウンエディタを使ってきましたが、まだ私の要望を完璧に満たすものを見つけられていません。致命的なバグに執筆を邪魔されたくないのです。**MarkText**はページのレンダリングに仮想DOMを用いることで効率を向上させ、さらにオープンソースで提供しました。
|
||||
2. 上記の通り、**MarkText**はオープンソースなので、誰でもソースコードをコントリビュートすることで開発に参加し、**MarkText** をポピュラーなマークダウンエディタにしていくことができます。
|
||||
3. 特徴的な機能を備えたマークダウンエディタは既に沢山ありますが、全てのマークダウンユーザーの要望を満たすのは難しいです。まだまだ未熟ですが、**MarkText** がマークダウンユーザーの要望を可能な限り叶えられるエディタになることを願っています。
|
||||
|
||||
<h2 id="download">ダウンロード</h2>
|
||||
|
||||

|
||||
|
||||
|  |  |  |
|
||||
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
| [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x64.dmg) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-setup.exe) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x86_64.AppImage) |
|
||||
|
||||
このバージョンでの新着情報をご確認いただくには、[CHANGELOG](../../.github/CHANGELOG.md)を参照してください。
|
||||
|
||||
#### macOS
|
||||
|
||||
最新のMarkText(`marktext-%version%.dmg`)を[リリースページ](https://github.com/marktext/marktext/releases/latest)からダウンロードするか、[**homebrew cask**](https://github.com/caskroom/homebrew-cask)を用いてインストールしてください。Homebrew-Caskを使うためには、[Homebrew](https://brew.sh/)がインストールされている必要があります。
|
||||
|
||||
```bash
|
||||
brew install --cask mark-text
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
MarkTextをダウンロードして、セットアップウィザード(`marktext-setup-%version%.exe`)を介してインストールしてください。インストールの際、ユーザごとにインストールするか、グローバルにインストールするかを選択してください。
|
||||
|
||||
#### Linux
|
||||
|
||||
[Linux installation instructions](../../docs/LINUX.md)を参照してください。
|
||||
|
||||
#### その他
|
||||
|
||||
Linux、macOSおよびWindows用の全てのバイナリは、[リリースページ](https://github.com/marktext/marktext/releases/latest)からダウンロードできます。お使いのシステムで使用可能なソフトウェアがリリースページ内に見つからない場合は、[issue](https://github.com/marktext/marktext/issues) を作成してお知らせいただけると幸いです。
|
||||
|
||||
<h2 id="development">開発</h2>
|
||||
|
||||
**MarkText** を自前でビルドしたい場合は、[build instructions](../../docs/dev/BUILD.md)を参照してください。
|
||||
|
||||
- [User documentation](../../docs/README.md)
|
||||
- [Developer documentation](../../docs/dev/README.md)
|
||||
|
||||
**MarkText**に関するご質問がありましたら、フォーマットを参考にissueを作成してください。もちろんプルリクエストを直接提出して頂いても構いません。ご協力ありがとうございます。
|
||||
|
||||
## インテグレーション
|
||||
|
||||
- [Alfred Workflow](http://www.packal.org/workflow/mark-text): macOS向けのアプリであるAlfred Workflowです。Alfredを起動して、"mt"コマンドを入力することでファイルやフォルダをMarkTextで開きます。
|
||||
|
||||
<h2 id="contribution">コントリビューション</h2>
|
||||
|
||||
MarkTextは開発の真っ最中です、プルリクエストを作成する場合は事前に [Contributing Guide](../../CONTRIBUTING.md) をご確認ください。MarkTextに追加したい新機能がある場合は、 [roadmap](https://github.com/marktext/marktext/projects)を参考にしてissueを作成してください。
|
||||
|
||||
## コントリビューター
|
||||
|
||||
MarkTextにコントリビュートしてくださった [[コントリビューター](https://github.com/marktext/marktext/graphs/contributors)] の皆さんに感謝を申し上げます。
|
||||
|
||||
MarkTextのロゴをデザインしてくださった @[Yasujizr](https://github.com/Yasujizr) に感謝を申し上げます。
|
||||
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors"><img src="https://opencollective.com/marktext/contributors.svg?width=890" /></a>
|
||||
|
||||
## ライセンス
|
||||
|
||||
[**MIT**](../../LICENSE).
|
||||
|
||||
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fmarktext%2Fmarktext?ref=badge_large)
|
||||
@ -1,264 +0,0 @@
|
||||
<p align="center"><img src="../../static/logo-small.png" alt="마크 텍스트" width="100" height="100"></p>
|
||||
|
||||
<h1 align="center">마크 텍스트</h1>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://twitter.com/intent/tweet?via=marktextme&url=https://github.com/marktext/marktext/&text=What%20do%20you%20want%20to%20say%20to%20app?&hashtags=happyMarkText">
|
||||
<img src="https://img.shields.io/twitter/url/https/github.com/marktext/marktext.svg?style=for-the-badge" alt="twitter">
|
||||
</a>
|
||||
</div>
|
||||
<div align="center">
|
||||
<strong>:high_brightness: 새로운 세대의 마크다운 에디터 :crescent_moon:</strong><br>
|
||||
속도와 사용성에 중점을 둔 단순하고 우아한 오픈소스 마크다운 에디터.<br>
|
||||
<sub>리눅스, 맥OS 그리고 윈도우에서 이용 가능</sub>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div align="center">
|
||||
<!-- Version -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://badge.fury.io/gh/jocs%2Fmarktext.svg" alt="website">
|
||||
</a>
|
||||
<!-- License -->
|
||||
<a href="LICENSE">
|
||||
<img src="https://img.shields.io/github/license/marktext/marktext.svg" alt="LICENSE">
|
||||
</a>
|
||||
<!-- Build Status -->
|
||||
<a href="https://travis-ci.org/marktext/marktext/">
|
||||
<img src="https://travis-ci.org/marktext/marktext.svg?branch=master" alt="build">
|
||||
</a>
|
||||
<a href="https://ci.appveyor.com/project/marktext/marktext/branch/master">
|
||||
<img src="https://ci.appveyor.com/api/projects/status/l4gxgydj0i95hmxg/branch/master?svg=true" alt="build">
|
||||
</a>
|
||||
<!-- Downloads total -->
|
||||
<a href="https://github.com/marktext/marktext/releases">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/total.svg" alt="total download">
|
||||
</a>
|
||||
<!-- Downloads latest release -->
|
||||
<a href="https://github.com/marktext/marktext/releases/latest">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/v0.17.1/total.svg" alt="latest download">
|
||||
</a>
|
||||
<!-- sponsors -->
|
||||
<a href="https://opencollective.com/marktext">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors/badge.svg?label=SilverSponsors&color=brightgreen" alt="sponsors">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<h3>
|
||||
<a href="https://github.com/marktext/marktext">
|
||||
웹사이트
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#features">
|
||||
기능
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#download-and-installation">
|
||||
다운로드
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#development">
|
||||
개발
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#contribution">
|
||||
기여
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>번역본:</sub>
|
||||
<a href="zh_cn.md#readme">
|
||||
<span>:cn:</span>
|
||||
</a>
|
||||
<a href="zh_tw.md#readme">
|
||||
<span>:taiwan:</span>
|
||||
</a>
|
||||
<a href="pl.md#readme">
|
||||
<span>:poland:</span>
|
||||
</a>
|
||||
<a href="ja.md#readme">
|
||||
<span>:jp:</span>
|
||||
</a>
|
||||
<a href="french.md#readme">
|
||||
<span>:fr:</span>
|
||||
</a>
|
||||
<a href="tr.md#readme">
|
||||
<span>:tr:</span>
|
||||
</a>
|
||||
<a href="spanish.md#readme">
|
||||
<span>:es:</span>
|
||||
</a>
|
||||
<a href="pt.md#readme">
|
||||
<span>:portugal:</span>
|
||||
</a>
|
||||
<a href="ko.md#readme">
|
||||
<span>:kr:</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>이 마크다운 에디터는
|
||||
<a href="https://github.com/Jocs">Jocs</a>와
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors">
|
||||
기여자분들의 ❤︎로 만들어집니다.
|
||||
</a>
|
||||
</sub>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<h2 align="center">마크 텍스트 후원</h2>
|
||||
|
||||
마크 텍스트는 MIT 라이센스 오픈 소스 프로젝트이며, 최신 버전은 언제나 GitHub 릴리즈 페이지에서 무료로 다운로드할 수 있습니다. 마크 텍스트는 아직 개발 중이며, 개발은 후원자들의 후원으로 이루어집니다. 당신이 동참해주시길 바라고 있습니다:
|
||||
|
||||
- [Patreon에서 후원하기](https://www.patreon.com/ranluo) 혹은 [1회성 후원](https://github.com/Jocs/sponsor.me)
|
||||
- [Open Collective에서 후원하기](https://opencollective.com/marktext)
|
||||
|
||||
##### Patreon과 Open Collective의 차이는 무엇입니까?
|
||||
|
||||
Patreon: 마크 텍스트를 만들고 계속 유지하고 있는 Luo Ran (@jocs)에게 직접 후원됩니다.
|
||||
Open Collective: 모든 지출은 투명합니다. 후원금은 마크 텍스트의 개발 및 유지, 온라인 및 오프라인 활동 지원, 그리고 다른 필요한 리소스를 얻는 데에 사용됩니다. 모든 후원자의 이름과 회사 로고는 (Patreon과 Open Collective 둘 다) 공식 웹사이트와 README.md 파일에 나타납니다.
|
||||
|
||||
**스페셜 후원자**
|
||||
|
||||
<a href="https://www.dogedoge.com/">
|
||||
<img src="https://www.dogedoge.com/assets/new_logo.min.png" width="100" height="100">
|
||||
</a>
|
||||
|
||||
**플래티넘 후원자**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/platinum-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**골드 후원자**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/gold-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**실버 후원자**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**브론즈 후원자**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/bronze-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**후원자**
|
||||
|
||||
<a href="https://opencollective.com/marktext#backers">
|
||||
<img src="https://opencollective.com/marktext/tiers/backer.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
## 스크린샷
|
||||
|
||||

|
||||
|
||||
## 기능
|
||||
|
||||
- 실시간 미리보기 (WYSIWYG) 및 주의분산 없는 글쓰기 경험을 위한 깔끔하고 단순한 인터페이스.
|
||||
- [CommonMark Spec](https://spec.commonmark.org/0.29/), [GitHub Flavored Markdown Spec](https://github.github.com/gfm/) 지원 및 [Pandoc markdown](https://pandoc.org/MANUAL.html#pandocs-markdown) 일부 지원.
|
||||
- 수학 표현 (KaTeX), 서문, 이모지와 같은 마크다운 확장.
|
||||
- 단락 및 인라인 스타일 단축키 지원으로 문서 작성 효율 향상.
|
||||
- **HTML** 및 **PDF** 파일 출력.
|
||||
- 다양한 테마: **카드뮴 라이트**, **머티리얼 다크** 등등.
|
||||
- 다양한 편집 모드: **소스 코드 모드**, **타자기 모드**, **포커스 모드**.
|
||||
- 클립보드에서 바로 이미지 붙여넣기.
|
||||
|
||||
<h4 align="center">:crescent_moon:테마:high_brightness:</h4>
|
||||
|
||||
| 카드뮴 라이트 | 다크 |
|
||||
|:-------------------------------------------------:|:-----------------------------------------------:|
|
||||
|  |  |
|
||||
| 그래파이트 라이트 | 머티리얼 다크 |
|
||||
|  |  |
|
||||
| 율리시스 라이트 | 원 다크 |
|
||||
|  |  |
|
||||
|
||||
<h4 align="center">:smile_cat:편집 모드:dog:</h4>
|
||||
|
||||
| 소스 코드 | 타자기 | 포커스 |
|
||||
|:--------------------:|:------------------------:|:-------------------:|
|
||||
|  |  |  |
|
||||
|
||||
## 왜 다른 에디터를 쓰나요?
|
||||
|
||||
1. 저는 글쓰기를 좋아합니다. 많은 마크다운 에디터를 사용해왔지만, 아직 제 요구를 완벽히 충족시키는 편집기는 없었습니다. 글을 쓸 때 견딜 수 없는 버그 때문에 방해 받길 원치 않습니다. **마크 텍스트**는 높은 효율성과 오픈소스라는 추가 이점이 있는 가상 DOM을 이용하여 페이지를 렌더링합니다. 마크다운과 글쓰기를 좋아하는 사람이라면 누구나 마크 텍스트를 이용할 수 있습니다.
|
||||
2. 위에서 설명한 대로, **마크 텍스트**는 완전히 무료이고 오픈 소스이며 영원히 오픈 소스일 것입니다. 우리는 모든 마크다운 애호가들이 자신만의 코드를 컨트리뷰트하여 **마크 텍스트**를 인기있는 마크다운 에디터로 개발하는 데 도움 주기를 바랍니다.
|
||||
3. 많은 마크다운 에디터가 각자의 장점을 가지고 있습니다. 어떤 것은 다른 것에 없는 기능을 가지고 있습니다. 각각의 사용자들의 요구를 만족시키기는 어렵지만 우리는 **마크 텍스트**가 가능한 한 많은 사용자를 만족시킬 수 있기를 바랍니다. 최신의 **마크 텍스트**가 아직 완벽하지 않을 수 있어도, 우리는 할 수 있는 한 최고로 만들기 위해 노력할 것입니다.
|
||||
## 다운로드 및 설치
|
||||
|
||||

|
||||
|
||||
|  |  |  |
|
||||
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
| [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x64.dmg) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-setup.exe) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x86_64.AppImage) |
|
||||
|
||||
최신 버전의 새로운 기능을 보고 싶나요? [변경사항](.github/CHANGELOG.md)을 참조하세요.
|
||||
|
||||
#### 맥OS
|
||||
|
||||
최신 `marktext-%version%.dmg`를 [릴리즈 페이지](https://github.com/marktext/marktext/releases/latest)에서 다운로드하거나 [**homebrew cask**](https://github.com/caskroom/homebrew-cask)를 이용하여 설치할 수 있습니다. Homebrew-Cask를 이용하려면 [Homebrew](https://brew.sh/)가 설치되어 있어야 합니다.
|
||||
|
||||
```bash
|
||||
brew install --cask mark-text
|
||||
```
|
||||
|
||||
#### 윈도우
|
||||
|
||||
마크 텍스트를 다운로드하여 설치 마법사(`marktext-setup-%version%.exe`)를 통해 설치하고 사용자별로 설치할 것인지 공용으로 설치할 것인지 선택하십시오.
|
||||
|
||||
다른 방법으로, [Chocolatey](https://chocolatey.org/)를 이용해서 마크 텍스트를 설치하십시오. Chocolatey를 이용하기 위해서는 [Chocolatey](https://chocolatey.org/install)가 설치되어 있어야 합니다.
|
||||
|
||||
```bash
|
||||
choco install marktext
|
||||
```
|
||||
|
||||
#### 리눅스
|
||||
|
||||
[리눅스 설치 가이드](docs/LINUX.md)를 따르십시오.
|
||||
|
||||
#### 기타
|
||||
|
||||
모든 리눅스, 맥OS 그리고 윈도우 용 파일은 [릴리즈 페이지](https://github.com/marktext/marktext/releases/latest)에서 다운로드할 수 있습니다. 시스템에서 버전을 이용할 수 없을 시, [이슈](https://github.com/marktext/marktext/issues)를 열어주세요.
|
||||
|
||||
## 개발
|
||||
|
||||
스스로 **마크 텍스트**를 빌드하고 싶다면, [빌드 가이드](docs/dev/BUILD.md)를 참고해주십시오.
|
||||
|
||||
- [사용자 문서](docs/README.md)
|
||||
- [개발자 문서](docs/dev/README.md)
|
||||
|
||||
**마크 텍스트**와 관련하여 질문이 있으시면 언제든지 질문을 이슈에 기재하실 수 있습니다. 기재할 때는 이슈를 열 때 나오는 기본 포맷을 사용해주십시오. 물론 바로 PR을 제출하는 것도 대환영입니다.
|
||||
|
||||
## 통합
|
||||
|
||||
- [Alfred Workflow](http://www.packal.org/workflow/mark-text): 맥OS 앱 Alfred를 위한 워크플로우: 마크 텍스트를 이용하여 파일/폴더를 열려면 "mt"를 사용하세요.
|
||||
|
||||
## 기여
|
||||
|
||||
마크 텍스트는 전체 개발 중입니다. PR 하기 전에 [컨트리뷰트 가이드](CONTRIBUTING.md)를 필히 읽어주십시오.
|
||||
마크 텍스트에 새로운 기능을 추가하고 싶은가요? [로드맵](https://github.com/marktext/marktext/projects)을 참조하시어 이슈를 열어주세요.
|
||||
|
||||
## 기여자
|
||||
|
||||
마크 텍스트에 기여해주신 모든 분들께 감사합니다. [[기여자](https://github.com/marktext/marktext/graphs/contributors)]
|
||||
|
||||
마크 텍스트 로고를 디자인해주신 @[Yasujizr](https://github.com/Yasujizr)에게 특별한 감사를 전합니다.
|
||||
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors"><img src="https://opencollective.com/marktext/contributors.svg?width=890" /></a>
|
||||
|
||||
## 라이센스
|
||||
|
||||
[**MIT**](LICENSE).
|
||||
|
||||
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fmarktext%2Fmarktext?ref=badge_large)
|
||||
@ -1,161 +0,0 @@
|
||||
> **This documentation is outdated, based on the original readme from 14 April 2018!**
|
||||
|
||||
<p align="center"><img src="../../static/logo-small.png" alt="marktext" width="100" height="100"></p>
|
||||
|
||||
<h1 align="center">MarkText</h1>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fmarktext%2Fmarktext">
|
||||
<img src="https://img.shields.io/twitter/url/https/github.com/marktext/marktext.svg?style=for-the-badge" alt="twitter">
|
||||
</a>
|
||||
</div>
|
||||
<div align="center">
|
||||
<strong>:high_brightness:Edytor markdown nowej generacji:crescent_moon:</strong>
|
||||
</div>
|
||||
<div align="center">
|
||||
Aplikacja na bazie <code>Electron</code> na platformy OS X, Windows i Linux
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div align="center">
|
||||
<!-- Version -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://badge.fury.io/gh/jocs%2Fmarktext.svg" alt="website">
|
||||
</a>
|
||||
<!-- License -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/github/license/marktext/marktext.svg" alt="LICENSE">
|
||||
</a>
|
||||
<!-- Build Status -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://travis-ci.org/marktext/marktext.svg?branch=master" alt="build">
|
||||
</a>
|
||||
<!-- Downloads total -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/total.svg" alt="total download">
|
||||
</a>
|
||||
<!-- Downloads latest release -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/v0.17.1/total.svg" alt="latest download">
|
||||
</a>
|
||||
<!-- deps -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/hackage-deps/v/lens.svg" alt="dependencies">
|
||||
</a>
|
||||
<!-- donates -->
|
||||
<a href="https://opencollective.com/marktext">
|
||||
<img src="https://opencollective.com/marktext/tiers/backer/badge.svg?label=backer&color=brightgreen" alt="donate">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<h3>
|
||||
<a href="https://marktext.github.io/website">
|
||||
Strona
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#features">
|
||||
Cechy programu
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#download-and-installation">
|
||||
Instalacja
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#development">
|
||||
Rozwój
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#contribution">
|
||||
Udział w projekcie
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>Edytor Markdown, który potrafi. Zbudowany z ❤︎ przez
|
||||
<a href="https://github.com/Jocs">Jocs</a> i
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors">
|
||||
innych
|
||||
</a>
|
||||
</sub>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||

|
||||
|
||||
### Cechy programu
|
||||
|
||||
- Podgląd na żywo - użycie [snabbdom](https://github.com/snabbdom/snabbdom) jako swojego silnika renderującego.
|
||||
- Wsparcie specyfikacji [CommonMark](https://spec.commonmark.org/0.29/) i [GitHub Flavored Markdown](https://github.github.com/gfm/).
|
||||
- Wsparcie paragrafów i skrótów klawiatowych dla stylów wbudowanych w celu zwiększenia twojej wydajności podczas pisania.
|
||||
- Zapis do plików **HTML** i **PDF**.
|
||||
- Ciemny i jasny motyw.
|
||||
- Różne tryby edycji: **Kod źródłowy**, **Maszyna do pisania**, **Skupienie**.
|
||||
|
||||
<h4 align="center">:crescent_moon:Motywy:high_brightness:</h4>
|
||||
|
||||
| Ciemny :crescent_moon: | Jasny :high_brightness: |
|
||||
|:------------------------------------------------------------------:|:-------------------------------------------------------------------:|
|
||||
|  |  |
|
||||
|
||||
<h4 align="center">:smile_cat:Tryby edycji:dog:</h4>
|
||||
|
||||
| Kod źródłowy | Maszyna do pisania | Skupienie |
|
||||
|:--------------------------------------------------------------------:|:------------------------------------------------------------------------:|:-------------------------------------------------------------------:|
|
||||
|  |  |  |
|
||||
|
||||
### Dlaczego kolejny edytor?
|
||||
|
||||
1. Kocham pisać. Używałem wiele różnych edytorów markdown, ale wciąż nie ma takiego, który byłby w pełni zgodny z moimi oczekiwaniami. Nie lubię, kiedy pisanie przerywają mi niemożliwe do wytrzymania błędy. **MarkText** używa wirtualnego DOM do wyrenderowania strony co sprawia, że jest bardzo wydajny. Program jest rozpowszechniany na licencji open source dla wszystkich przyjaciół kochających markdown i pisanie.
|
||||
2. Jak już zostało wspomniane powyżej, **MarkText** będzie zawsze rozpowszechniany na licencji open source. Wierzymy, że wszyscy wielbiciele markdown dołożą swoją cegiełkę do kodów źródłowych programu i pomogą w rozwijaniu **MarkText**.
|
||||
3. Istnieje wiele edytorów markdown i każdy z nich ma swoje cechy szczególne, jednak ciężko jest zaspokoić wszystkie potrzeby użytkowników. Wierzę, że **MarkText** jest w stanie zaspokoić potrzeby jak największej grupy osób. Mimo iż najnowsza wersja **MarkText** nie jest idealna, próbujemy stworzyć go tak doskonałym jak to jest tylko możliwe.
|
||||
|
||||
### Instalacja
|
||||
|
||||

|
||||
|
||||
|  |  |  |
|
||||
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
| [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x64.dmg) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-setup.exe) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x86_64.AppImage) |
|
||||
|
||||
Nie znalazłeś swojego systemu? Przejdź do strony [release](https://github.com/marktext/marktext/releases). Wciąż nie znalazłeś? Zgłoś [problem](https://github.com/marktext/marktext/issues).
|
||||
|
||||
Chciałbyś zobaczyć jak nowe udogodnienia wprowadziła najnowsza wersja? Udaj się do [CHANGELOG](../../.github/CHANGELOG.md)
|
||||
|
||||
Jeśli używasz systemu OS X, to możesz zainstalować MarkText za pomocą [**homebrew cask**](https://github.com/caskroom/homebrew-cask). Aby zacząć korzystać z Homebrew-Cask potrzebujesz tylko [Homebrew](https://brew.sh/).
|
||||
|
||||
> brew install --cask mark-text
|
||||
|
||||

|
||||
|
||||
### Rozwój
|
||||
|
||||
Jeżeli chciałbyś samodzielnie zbudować **MarkText**:
|
||||
|
||||
- sklonuj to repozytorium.
|
||||
- uruchom komendę `npm install`
|
||||
- uruchom komendę `npm run build`
|
||||
- skopiuj zbudowaną aplikację do folderu Applications lub jeśli używasz systemu Windows uruchom instalator.
|
||||
|
||||
W przypadku jakichkolwiek pytań podczas korzystania z **MarkText** zaczęcamy do zgłoszenia problemu. Mamy nadzieję, że będziesz trzymał się ustalonego z góry formatu zgłaszania problemów. Wspaniale by było, jeżeli to właśnie ty naprawisz błąd i zgłosisz pull request.
|
||||
|
||||
## Udział w projekcie
|
||||
|
||||
MarkText jest w trakcie rozwijania. Upewnij się, że przeczytałeś [Contributing Guide](../../CONTRIBUTING.md) przed stworzeniem pull request. Chcesz dodać nowe udogodnienia do MarkText? Udaj się do [TODO LIST](../../.github/TODOLIST.md)
|
||||
|
||||
Dziękujemy wszystkim osobom, które już wzięły udział w projekcie MarkText! Jeżeli już jesteś członkiem [contributors](https://github.com/marktext/marktext/graphs/contributors), otwórz pull request aby dodać twoje imię i zdjęcie do poniższej listy osób, które pomogły przy projekcie.
|
||||
|
||||
Specjalne podziękowania dla @[Yasujizr](https://github.com/Yasujizr), który zaprojektował logo MarkText.
|
||||
|
||||
| [](https://github.com/Jocs) | [](https://github.com/ywwhack) | [](https://github.com/notAlaanor) | [](https://github.com/fxha) |
|
||||
|:----------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:|
|
||||
| [Jocs](https://github.com/Jocs) | [ywwhack](https://github.com/ywwhack) | [notAlaanor](https://github.com/notAlaanor) | [fxha](https://github.com/fxha) |
|
||||
|
||||
### Licencja
|
||||
|
||||
[**MIT**](../../LICENSE).
|
||||
|
||||
Copyright (c) 2017-present, @Jocs
|
||||
@ -1,266 +0,0 @@
|
||||
<p align="center"><img src="https://github.com/marktext/marktext/raw/develop/static/logo-small.png" alt="MarkText" width="100" height="100"></p>
|
||||
|
||||
<h1 align="center">MarkText</h1>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://twitter.com/intent/tweet?via=marktextme&url=https://github.com/marktext/marktext/&text=What%20do%20you%20want%20to%20say%20to%20app?&hashtags=happyMarkText">
|
||||
<img src="https://img.shields.io/twitter/url/https/github.com/marktext/marktext.svg?style=for-the-badge" alt="twitter">
|
||||
</a>
|
||||
</div>
|
||||
<div align="center">
|
||||
<strong>:high_brightness: Editor de Markdown de nova geração :crescent_moon:</strong><br>
|
||||
Um editor de markdown simples e elegante em código aberto, com foco em performance e usabilidade.<br>
|
||||
<sub>Disponível para Linux, macOS and Windows.</sub>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div align="center">
|
||||
<!-- Version -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://badge.fury.io/gh/jocs%2Fmarktext.svg" alt="website">
|
||||
</a>
|
||||
<!-- License -->
|
||||
<a href="LICENSE">
|
||||
<img src="https://img.shields.io/github/license/marktext/marktext.svg" alt="LICENSE">
|
||||
</a>
|
||||
<!-- Build Status -->
|
||||
<a href="https://travis-ci.org/marktext/marktext/">
|
||||
<img src="https://travis-ci.org/marktext/marktext.svg?branch=master" alt="build">
|
||||
</a>
|
||||
<a href="https://ci.appveyor.com/project/marktext/marktext/branch/master">
|
||||
<img src="https://ci.appveyor.com/api/projects/status/l4gxgydj0i95hmxg/branch/master?svg=true" alt="build">
|
||||
</a>
|
||||
<!-- Downloads total -->
|
||||
<a href="https://github.com/marktext/marktext/releases">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/total.svg" alt="total download">
|
||||
</a>
|
||||
<!-- Downloads latest release -->
|
||||
<a href="https://github.com/marktext/marktext/releases/latest">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/v0.17.1/total.svg" alt="latest download">
|
||||
</a>
|
||||
<!-- sponsors -->
|
||||
<a href="https://opencollective.com/marktext">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors/badge.svg?label=SilverSponsors&color=brightgreen" alt="sponsors">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<h3>
|
||||
<a href="https://github.com/marktext/marktext">
|
||||
Site
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#features">
|
||||
Recursos
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#download-and-installation">
|
||||
Downloads
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#development">
|
||||
Desenvolvimento
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#contribution">
|
||||
Contribuição
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>Traduções:</sub>
|
||||
<a href="zh_cn.md#readme">
|
||||
<span>:cn:</span>
|
||||
</a>
|
||||
<a href="zh_tw.md#readme">
|
||||
<span>:taiwan:</span>
|
||||
</a>
|
||||
<a href="pl.md#readme">
|
||||
<span>:poland:</span>
|
||||
</a>
|
||||
<a href="ja.md#readme">
|
||||
<span>:jp:</span>
|
||||
</a>
|
||||
<a href="french.md#readme">
|
||||
<span>:fr:</span>
|
||||
</a>
|
||||
<a href="tr.md#readme">
|
||||
<span>:tr:</span>
|
||||
</a>
|
||||
<a href="spanish.md#readme">
|
||||
<span>:es:</span>
|
||||
</a>
|
||||
<a href="pt.md#readme">
|
||||
<span>:portugal:</span>
|
||||
</a>
|
||||
<a href="ko.md#readme">
|
||||
<span>:kr:</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>Um Markdown que tem poder. Feito com ❤︎ por
|
||||
<a href="https://github.com/Jocs">Jocs</a> e
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors">
|
||||
contribuidores.
|
||||
</a>
|
||||
</sub>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<h2 align="center">Apoie o MarkText</h2>
|
||||
|
||||
O MarkText é um projeto com licença MIT (projetos de código aberto), e as suas atualizações sempre estarão disponíveis gratuitamente na página de 'Releases' do GitHub. O MarkText ainda está em desenvolvimento e é inseparável de todos os patrocinadores. Espero que você se junte a esse grupo:
|
||||
|
||||
- [Torne-se um apoiador ou patrocinador no Patreon](https://www.patreon.com/ranluo) ou [Doe uma vez](https://github.com/Jocs/sponsor.me)
|
||||
- [Seja um apoiador ou patrocinador no Open Collective](https://opencollective.com/marktext)
|
||||
|
||||
##### Qual é a diferença entre Patreon e Open Collective?
|
||||
|
||||
**Patreon**: Os fundos serão patrocinados diretamente para Luo Ran (@jocs) que criou o MarkText e continua a mantê-lo.
|
||||
|
||||
**Open Collective**: Todas as despesas são transparentes. Os fundos serão usados para o desenvolvimento e manutenção do MarkText, financiando atividades online e offline e adquirindo outros recursos necessários.
|
||||
Nomes e logotipos de empresas de todos os patrocinadores (do Patreon e do Open Collective) aparecerão no site oficial do MarkText e no seu arquivo README.md.
|
||||
|
||||
**Patrocinadores Especiais**
|
||||
|
||||
<a href="https://www.dogedoge.com/">
|
||||
<img src="https://www.dogedoge.com/assets/new_logo.min.png" width="100" height="100">
|
||||
</a>
|
||||
|
||||
**Patrocinadores Platinum**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/platinum-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Patrocinadores Ouro**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/gold-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Patrocinadores Prata**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Patrocinadores Bronze**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/bronze-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Apoiadores**
|
||||
|
||||
<a href="https://opencollective.com/marktext#backers">
|
||||
<img src="https://opencollective.com/marktext/tiers/backer.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
## Captura de Tela
|
||||
|
||||

|
||||
|
||||
## Recursos
|
||||
|
||||
- Visualização em tempo real (WYSIWYG) e uma interface limpa e simples para obter uma experiência de escrita sem distrações.
|
||||
- Suporta o uso de [CommonMark Spec](https://spec.commonmark.org/0.29/), [GitHub Flavored Markdown Spec](https://github.github.com/gfm/) e suporte seletivo para [Pandoc markdown](https://pandoc.org/MANUAL.html#pandocs-markdown).
|
||||
- Extensões de Markdown, como expressões matemáticas (KaTeX), front matter e emojis.
|
||||
- Utilize parágrafos e atalhos de estilos para melhorar sua eficiência de escrita.
|
||||
- Exporta arquivos **HTML** e **PDF**.
|
||||
- Vários temas, como: **Cadmium Light**, **Material Dark**, etc.
|
||||
- Vários modos de edição: **Modo Código**, **Modo Escritor** e **Modo Foco**.
|
||||
- Cole imagens diretamente.
|
||||
|
||||
<h4 align="center">:crescent_moon:Temas:high_brightness:</h4>
|
||||
|
||||
| Cadmium Light | Dark |
|
||||
|:-------------------------------------------------:|:-----------------------------------------------:|
|
||||
|  |  |
|
||||
| Graphite Light | Material Dark |
|
||||
|  |  |
|
||||
| Ulysses Light | One Dark |
|
||||
|  |  |
|
||||
|
||||
<h4 align="center">:smile_cat:Modos de Edição:dog:</h4>
|
||||
|
||||
| Código | Escritor | Foco |
|
||||
|:--------------------:|:------------------------:|:-------------------:|
|
||||
|  |  |  |
|
||||
|
||||
## Por que criar outro editor?
|
||||
|
||||
1. Eu adoro escrever. Usei muitos editores de markdown, mas ainda não há nenhum que consiga atender totalmente às minhas necessidades. Não gosto de ser incomodado quando escrevo por algum bug insuportável. **MarkText** usa DOM virtual para renderizar páginas, o que tem os benefícios adicionais de ser altamente eficiente e possui código aberto. Desta forma, qualquer pessoa que adora markdown e escrita pode usar MarkText.
|
||||
2. Conforme mencionado acima, **MarkText** é totalmente gratuito e de código-fonte aberto e será para sempre. Esperamos que todos os amantes do markdown contribuam com seu próprio código e ajudem a desenvolver o **MarkText**, tornando-o um editor de markdown popular.
|
||||
3. Existem muitos editores de markdown e todos têm seus próprios méritos, alguns têm recursos que outros não. É difícil satisfazer as necessidades de cada pessoa, mas esperamos que **MarkText** seja capaz de satisfazer cada utilizador de Markdown tanto quanto possível. Embora o último **MarkText** ainda não seja perfeito, vamos tentar fazer o melhor que pudermos.
|
||||
|
||||
## Download e Instalação
|
||||
|
||||

|
||||
|
||||
|  |  |  |
|
||||
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
| [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x64.dmg) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-setup.exe) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x86_64.AppImage) |
|
||||
|
||||
Quer ver os últimos recursos? Por favor consulte o [Histórico de Mudanças](.github/CHANGELOG.md).
|
||||
|
||||
#### macOS
|
||||
|
||||
Pode baixar o último `marktext-%version%.dmg` indo à [página de versões](https://github.com/marktext/marktext/releases/latest) ou instale o MarkText usando [**homebrew cask**](https://github.com/caskroom/homebrew-cask) (é necessário ter o [Homebrew](https://brew.sh/) instalado).
|
||||
|
||||
```bash
|
||||
brew install --cask mark-text
|
||||
```
|
||||
|
||||
#### Windows
|
||||
|
||||
Instale o MarkText utilizando um gerenciador de instalações (`marktext-setup-%version%.exe`) e escolha para instalar para seu usuário ou em toda a máquina.
|
||||
|
||||
Caso não quiser fazer isso, pode instalar usando o [Chocolatey](https://chocolatey.org/). Para usar o Chocolatey você precisa de ter instalado [Chocolatey](https://chocolatey.org/install).
|
||||
|
||||
```bash
|
||||
choco install marktext
|
||||
```
|
||||
|
||||
#### Linux
|
||||
|
||||
Siga o [Manual de Instalações do Linux](docs/LINUX.md).
|
||||
|
||||
#### Outros
|
||||
|
||||
Todo o código-fonte para Linux, macOS and Windows pode ser baixado na [página de versões](https://github.com/marktext/marktext/releases/latest). Se não está a conseguir usar nenhuma versão no seu sistema, por favor abra uma [issue](https://github.com/marktext/marktext/issues).
|
||||
|
||||
## Desenvolvimento
|
||||
|
||||
Se você deseja fazer sua própria build do **MarkText**, dê uma lida no documento de [instruções de build](docs/dev/BUILD.md).
|
||||
|
||||
- [Documentação do Usuário](docs/README.md)
|
||||
- [Documentação do Desenvolvedor](docs/dev/README.md)
|
||||
|
||||
Se você ainda possui alguma dúvida sobre **MarkText**, seja bem vindo para abrir uma issue. Ao fazer isso, use o formato padrão encontrado ao abrir uma 'issue'. Claro, se você enviar um PR diretamente, será muito apreciado.
|
||||
|
||||
## Integrações
|
||||
|
||||
- [Alfred Workflow](http://www.packal.org/workflow/mark-text): Um fluxo de trabalho para o aplicativo Alfred do macOS: Use "mt" para abrir arquivos/pasta com MarkText.
|
||||
|
||||
## Contribuição
|
||||
|
||||
MarkText está em pleno desenvolvimento, certifique-se de ler o [guia de Contribuição](CONTRIBUTING.md) antes de fazer uma solicitação de PR. Quer adicionar alguns recursos ao MarkText? Consulte nosso [roadmap](https://github.com/marktext/marktext/projects) and open issues.
|
||||
|
||||
## Contribuidores
|
||||
|
||||
Obrigado a todas as pessoas que já contribuíram para MarkText[[contribuidores](https://github.com/marktext/marktext/graphs/contributors)]
|
||||
|
||||
Um agradecimento especial ao @[Yasujizr](https://github.com/Yasujizr) por desenhar nossa Logo.
|
||||
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors"><img src="https://opencollective.com/marktext/contributors.svg?width=890" /></a>
|
||||
|
||||
## Licença
|
||||
|
||||
[**MIT**](LICENSE).
|
||||
|
||||
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fmarktext%2Fmarktext?ref=badge_large)
|
||||
@ -1,200 +0,0 @@
|
||||
> **This documentation is outdated, based on the original readme from 1 October 2018!**
|
||||
|
||||
<p align="center"><img src="../../static/logo-small.png" alt="marktext" width="100" height="100"></p>
|
||||
|
||||
<h1 align="center">MarkText</h1>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://twitter.com/intent/tweet?via=marktextme&url=https://github.com/marktext/marktext/&text=What%20do%20you%20want%20to%20say%20to%20me?&hashtags=happyMarkText">
|
||||
<img src="https://img.shields.io/twitter/url/https/github.com/marktext/marktext.svg?style=for-the-badge" alt="twitter">
|
||||
</a>
|
||||
</div>
|
||||
<div align="center">
|
||||
<strong>:high_brightness:Editor de Markdown next-gen:crescent_moon:</strong>
|
||||
</div>
|
||||
<div align="center">
|
||||
Una aplicación hecha en <code>Electron</code> disponible para OS X, Windows y Linux
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div align="center">
|
||||
<!-- Version -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://badge.fury.io/gh/jocs%2Fmarktext.svg" alt="website">
|
||||
</a>
|
||||
<!-- License -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/github/license/marktext/marktext.svg" alt="LICENSE">
|
||||
</a>
|
||||
<!-- Build Status -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://travis-ci.org/marktext/marktext.svg?branch=master" alt="build">
|
||||
</a>
|
||||
<!-- Downloads total -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/total.svg" alt="total download">
|
||||
</a>
|
||||
<!-- Downloads latest release -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/github/downloads/marktext/marktext/v0.17.1/total.svg" alt="latest download">
|
||||
</a>
|
||||
<!-- deps -->
|
||||
<a href="https://marktext.github.io/website">
|
||||
<img src="https://img.shields.io/hackage-deps/v/lens.svg" alt="dependencies">
|
||||
</a>
|
||||
<!-- sponsors -->
|
||||
<a href="https://opencollective.com/marktext">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors/badge.svg?label=SilverSponsors&color=brightgreen" alt="sponsors">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<h3>
|
||||
<a href="https://marktext.github.io/website">
|
||||
Página web
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#features">
|
||||
Funcionalidades
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#download-and-installation">
|
||||
Descargas
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#development">
|
||||
Desarrollo
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="https://github.com/marktext/marktext#contribution">
|
||||
Contribuciones
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<sub>Editor escrito con ❤︎ por
|
||||
<a href="https://github.com/Jocs">Jocs</a> y
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors">
|
||||
contribuidores
|
||||
</a>
|
||||
</sub>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||

|
||||
|
||||
## Características
|
||||
|
||||
- Renderizado en tiempo real, y utiliza [snabbdom](https://github.com/snabbdom/snabbdom) como motor de renderizado.
|
||||
- Soporta [CommonMark Spec](https://spec.commonmark.org/0.29/) y [GitHub Flavored Markdown Spec](https://github.github.com/gfm/).
|
||||
- Soporta párrafos y atajos en mitad de la línea para mejorar la eficiencia de escritura
|
||||
- Exporta archivos markdown en **HTML** y **PDF**.
|
||||
- Temas claro y oscuro.
|
||||
- Varios modos de edición: **Modo código fuente**, **Modo máquina de escribir**, **Modo concentración**.
|
||||
|
||||
<h4 align="center">:crescent_moon:Temas claro y oscuro:high_brightness:</h4>
|
||||
|
||||
| Oscuro :crescent_moon: | Claro :high_brightness: |
|
||||
|:------------------------------------------------------------------:|:-------------------------------------------------------------------:|
|
||||
|  |  |
|
||||
|
||||
<h4 align="center">:smile_cat:Mode d'édition:dog:</h4>
|
||||
|
||||
| Código fuente | Máquina de escribir | Concentración |
|
||||
|:--------------------------------------------------------------------:|:------------------------------------------------------------------------:|:-------------------------------------------------------------------:|
|
||||
|  |  |  |
|
||||
|
||||
## ¿Por qué hacer otro editor ?
|
||||
|
||||
1. Me encanta escribir. He usado un montón de editores de markdown, y todavía no he encontrado ninguno que cumpla todas mis necesidades. No me gusta que me moleste ningún bug cuando escribo. **MarkText** usa virtual DOM para renderizar páginas, la cual tiene el beneficio de ser muy eficiente y de código abierto. Así, a cualquiera que le guste escribir y use markdown puede usar MarkText
|
||||
2. Como se ha mencionado arriba, **MarkText** es de código abierto, y lo será para siempre. Esperamos que todos los amantes de markdown contribuyan y ayuden al desarrollo de **MarkText**, para que sea popular.
|
||||
3. Hay muchos editores de markdown, y todos tienen sus méritos. Algunos tienen funcionalidades que otros no. Es difícil satisfacer los gustos de todo el mundo, pero esperamos que **MarkText** cubra las necesidades de todos lo máximo posible. Aunque lo último de **MarkText** no sea perfecto, lo damos todo para intentar que sea lo mejor
|
||||
|
||||
## Descarga e instalación
|
||||
|
||||

|
||||
|
||||
|  |  |  |
|
||||
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
| [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x64.dmg) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-setup.exe) | [](https://github.com/marktext/marktext/releases/download/v0.17.1/marktext-x86_64.AppImage) |
|
||||
|
||||
¿No encuentras tu sistema? Ve a la [página de descargas](https://github.com/marktext/marktext/releases). ¿No se encuentra disponible tu versión? Abre una [issue](https://github.com/marktext/marktext/issues).
|
||||
|
||||
¿Quieres saber las nuevas funcionalidades de la última versión? Échale un vistazo al [CHANGELOG](../../.github/CHANGELOG.md)
|
||||
|
||||
Si estás usando macOS, puedes instalar Mart Text usando [**homebrew cask**](https://github.com/caskroom/homebrew-cask). Para usar Homebrew-Cask, tienes que tener instalado [Homebrew](https://brew.sh/)
|
||||
```bash
|
||||
brew install --cask mark-text
|
||||
```
|
||||
|
||||

|
||||
|
||||
#### macOS y Windows
|
||||
|
||||
Descarga e instala Mart Text a partir del asistente de instalación
|
||||
|
||||
#### Linux
|
||||
|
||||
Sigue las [instrucciones de instalación de Linux] (../../docs/LINUX.md).
|
||||
|
||||
## Desarrollo
|
||||
|
||||
Si quieres construir tú mismo **MarkText**, por favor, sigue las [instrucciones de desarrollo](../../CONTRIBUTING.md#build-instructions).
|
||||
|
||||
Si tienes dudas sobre **MarkText**, puedes abrir un issue. Si lo haces, por favor, sigue el formato estándar. Por supuesto, apreciamos que mandes directamente un Pull Request
|
||||
|
||||
## Integración
|
||||
- [Alfred Workflow](http://www.packal.org/workflow/mark-text): un workflow para la aplicación de macOS Alfred: usa "mt" para abrir archivos/carpetas con MarkText
|
||||
## Contribución
|
||||
|
||||
**MarkText** está en pleno desarrollo. Asegúrate de leer [la guía de contribución](../../CONTRIBUTING.md) antes de hacer un Pull Request. ¿Quieres añadir algunas funcionalidades? Échale un vistazo a la [TODO LIST](../../.github/TODOLIST.md) y abre issues.
|
||||
|
||||
## Backers
|
||||
|
||||
¡Gracias a todos nuestros colaboradores! 🙏 [[Conviértete en un backer](https://opencollective.com/marktext#backers)]
|
||||
|
||||
<a href="https://opencollective.com/marktext#backers" target="_blank"><img src="https://opencollective.com/marktext/tiers/backer.svg?avatarHeight=36" /></a>
|
||||
|
||||
## Sponsors
|
||||
|
||||
Apoya este proyecto convirtiéndote en un sponsor. Tu logo se verá aquí con un link a tu página [[Conviértete en un sponsor](https://opencollective.com/marktext#silver-sponsors)]
|
||||
|
||||
**Bronze Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/bronze-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Silver Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/silver-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Gold Sponsors**
|
||||
|
||||
<a href="https://opencollective.com/marktext#platinum-sponsors">
|
||||
<img src="https://opencollective.com/marktext/tiers/gold-sponsors.svg?avatarHeight=36&width=600">
|
||||
</a>
|
||||
|
||||
**Platinum Sponsors**
|
||||
|
||||
<a href="https://readme.io" target="_blank"><img src="../../docs/sponsor/readme.png" /></a>
|
||||
|
||||
|
||||
## Contribuidores
|
||||
|
||||
Gracias a todo el mundo que ha contribuido al desarrollo de MarkText! [[contributors](https://github.com/marktext/marktext/graphs/contributors)]
|
||||
|
||||
Un especial agradecimiento a @[Yasujizr](https://github.com/Yasujizr) por hacer el logo de MarkText.
|
||||
|
||||
<a href="https://github.com/marktext/marktext/graphs/contributors"><img src="https://opencollective.com/marktext/contributors.svg?width=890" /></a>
|
||||
|
||||
## Licencia
|
||||
|
||||
[**MIT**](../../LICENSE).
|
||||
|
||||
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fmarktext%2Fmarktext?ref=badge_large)
|
||||
|
Before Width: | Height: | Size: 631 KiB |
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 483 KiB |
|
Before Width: | Height: | Size: 567 KiB |
|
Before Width: | Height: | Size: 590 KiB |
|
Before Width: | Height: | Size: 811 KiB |