diff --git a/build/examples/build.js b/build/examples/build.js
index 26cd6506..c7fe42d6 100644
--- a/build/examples/build.js
+++ b/build/examples/build.js
@@ -5,20 +5,20 @@ import config from './webpack.config'
const spinner = ora('Building …')
export default new Promise((resolve, reject) => {
- spinner.start()
+ spinner.start()
- webpack(config, (error, stats) => {
- if (error) {
- return reject(error)
- }
+ webpack(config, (error, stats) => {
+ if (error) {
+ return reject(error)
+ }
- if (stats.hasErrors()) {
- process.stdout.write(stats.toString() + "\n");
- return reject(new Error('Build failed with errors.'))
- }
+ if (stats.hasErrors()) {
+ process.stdout.write(stats.toString() + "\n");
+ return reject(new Error('Build failed with errors.'))
+ }
- return resolve('Build complete.')
- })
+ return resolve('Build complete.')
+ })
})
.then(success => spinner.succeed(success))
.catch(error => spinner.fail(error))
diff --git a/build/examples/server.js b/build/examples/server.js
index d971bdcd..447f9a6f 100644
--- a/build/examples/server.js
+++ b/build/examples/server.js
@@ -16,11 +16,11 @@ middlewares.push(historyApiFallbackMiddleware())
// add webpack stuff
middlewares.push(webpackDevMiddleware(bundler, {
- publicPath: config.output.publicPath,
- stats: {
- colors: true,
- chunks: false,
- },
+ publicPath: config.output.publicPath,
+ stats: {
+ colors: true,
+ chunks: false,
+ },
}))
// add hot reloading
@@ -30,25 +30,25 @@ middlewares.push(webpackHotMiddleware(bundler))
const url = 'http://localhost'
const bs = browserSync.create()
const server = bs.init({
- server: {
- baseDir: `${srcPath}/`,
- middleware: middlewares,
- },
- files: [],
- logLevel: 'silent',
- open: false,
- notify: false,
- injectChanges: false,
- ghostMode: {
- clicks: false,
- forms: false,
- scroll: false,
- },
+ server: {
+ baseDir: `${srcPath}/`,
+ middleware: middlewares,
+ },
+ files: [],
+ logLevel: 'silent',
+ open: false,
+ notify: false,
+ injectChanges: false,
+ ghostMode: {
+ clicks: false,
+ forms: false,
+ scroll: false,
+ },
})
console.log(`${url}:${server.options.get('port')}`)
// sass import
bs.watch(path.join(sassImportPath, '**/!(index|index_sub).scss'), { ignoreInitial: true }, () => {
- sassImport(sassImportPath)
+ sassImport(sassImportPath)
})
diff --git a/build/examples/utilities.js b/build/examples/utilities.js
index f6792766..8f0ca34e 100644
--- a/build/examples/utilities.js
+++ b/build/examples/utilities.js
@@ -6,11 +6,11 @@ import minimist from 'minimist'
let argv = minimist(process.argv.slice(2))
export function removeEmpty(array) {
- return array.filter(entry => !!entry)
+ return array.filter(entry => !!entry)
}
export function ifElse(condition) {
- return (then, otherwise) => (condition ? then : otherwise)
+ return (then, otherwise) => (condition ? then : otherwise)
}
export const env = argv.env || 'development'
@@ -23,25 +23,25 @@ export const ifProd = ifElse(isProd)
export const ifTest = ifElse(isTest)
export function sassImport(basePath) {
- const indexFileName = 'index.scss'
- glob.sync(`${basePath}/**/${indexFileName}`).forEach(sourceFile => {
- fs.writeFileSync(sourceFile, '// This is a dynamically generated file \n\n')
- glob.sync(`${path.dirname(sourceFile)}/*.scss`).forEach(file => {
- if (path.basename(file) !== indexFileName) {
- fs.appendFileSync(sourceFile, `@import "${path.basename(file)}";\n`)
- }
- })
- })
+ const indexFileName = 'index.scss'
+ glob.sync(`${basePath}/**/${indexFileName}`).forEach(sourceFile => {
+ fs.writeFileSync(sourceFile, '// This is a dynamically generated file \n\n')
+ glob.sync(`${path.dirname(sourceFile)}/*.scss`).forEach(file => {
+ if (path.basename(file) !== indexFileName) {
+ fs.appendFileSync(sourceFile, `@import "${path.basename(file)}";\n`)
+ }
+ })
+ })
- const indexSubFileName = 'index_sub.scss'
- glob.sync(`${basePath}/**/${indexSubFileName}`).forEach(sourceFile => {
- fs.writeFileSync(sourceFile, '// This is a dynamically generated file \n\n')
- glob.sync(`${path.dirname(sourceFile)}/**/*.scss`).forEach(file => {
- if (path.basename(file) !== indexSubFileName) {
- let importPath = (path.dirname(sourceFile) === path.dirname(file)) ? path.basename(file) : file
- importPath = importPath.replace(`${path.dirname(sourceFile)}/`, '')
- fs.appendFileSync(sourceFile, `@import "${importPath}";\n`)
- }
- })
- })
+ const indexSubFileName = 'index_sub.scss'
+ glob.sync(`${basePath}/**/${indexSubFileName}`).forEach(sourceFile => {
+ fs.writeFileSync(sourceFile, '// This is a dynamically generated file \n\n')
+ glob.sync(`${path.dirname(sourceFile)}/**/*.scss`).forEach(file => {
+ if (path.basename(file) !== indexSubFileName) {
+ let importPath = (path.dirname(sourceFile) === path.dirname(file)) ? path.basename(file) : file
+ importPath = importPath.replace(`${path.dirname(sourceFile)}/`, '')
+ fs.appendFileSync(sourceFile, `@import "${importPath}";\n`)
+ }
+ })
+ })
}
diff --git a/build/examples/webpack.config.js b/build/examples/webpack.config.js
index 84316ea5..0d4e5fac 100644
--- a/build/examples/webpack.config.js
+++ b/build/examples/webpack.config.js
@@ -13,214 +13,214 @@ import { rootPath, srcPath, buildPath } from './paths'
export default {
- mode: ifDev('development', 'production'),
+ mode: ifDev('development', 'production'),
- entry: {
- app: removeEmpty([
- ifDev('webpack-hot-middleware/client?reload=true'),
- `${srcPath}/assets/sass/main.scss`,
- `${srcPath}/main.js`,
- ]),
- },
+ entry: {
+ app: removeEmpty([
+ ifDev('webpack-hot-middleware/client?reload=true'),
+ `${srcPath}/assets/sass/main.scss`,
+ `${srcPath}/main.js`,
+ ]),
+ },
- output: {
- path: `${buildPath}/`,
- filename: `assets/js/[name]${ifProd('.[hash]', '')}.js`,
- chunkFilename: `assets/js/[name]${ifProd('.[chunkhash]', '')}.js`,
- publicPath: '/',
- },
+ output: {
+ path: `${buildPath}/`,
+ filename: `assets/js/[name]${ifProd('.[hash]', '')}.js`,
+ chunkFilename: `assets/js/[name]${ifProd('.[chunkhash]', '')}.js`,
+ publicPath: '/',
+ },
- resolve: {
- extensions: ['.js', '.scss', '.vue'],
- alias: {
- vue$: 'vue/dist/vue.esm.js',
- modules: path.resolve(rootPath, '../node_modules'),
- images: `${srcPath}/assets/images`,
- fonts: `${srcPath}/assets/fonts`,
- variables: `${srcPath}/assets/sass/variables`,
- tiptap: path.resolve(rootPath, '../packages/tiptap/src'),
- 'tiptap-commands': path.resolve(rootPath, '../packages/tiptap-commands/src'),
- 'tiptap-utils': path.resolve(rootPath, '../packages/tiptap-utils/src'),
- 'tiptap-models': path.resolve(rootPath, '../packages/tiptap-models/src'),
- 'tiptap-extensions': path.resolve(rootPath, '../packages/tiptap-extensions/src'),
- },
- modules: [
- srcPath,
- path.resolve(rootPath, '../node_modules'),
- ],
- },
+ resolve: {
+ extensions: ['.js', '.scss', '.vue'],
+ alias: {
+ vue$: 'vue/dist/vue.esm.js',
+ modules: path.resolve(rootPath, '../node_modules'),
+ images: `${srcPath}/assets/images`,
+ fonts: `${srcPath}/assets/fonts`,
+ variables: `${srcPath}/assets/sass/variables`,
+ tiptap: path.resolve(rootPath, '../packages/tiptap/src'),
+ 'tiptap-commands': path.resolve(rootPath, '../packages/tiptap-commands/src'),
+ 'tiptap-utils': path.resolve(rootPath, '../packages/tiptap-utils/src'),
+ 'tiptap-models': path.resolve(rootPath, '../packages/tiptap-models/src'),
+ 'tiptap-extensions': path.resolve(rootPath, '../packages/tiptap-extensions/src'),
+ },
+ modules: [
+ srcPath,
+ path.resolve(rootPath, '../node_modules'),
+ ],
+ },
- devtool: ifDev('eval-source-map', 'source-map'),
+ devtool: ifDev('eval-source-map', 'source-map'),
- module: {
- rules: [
- {
- test: /\.vue$/,
- loader: 'vue-loader',
- },
- {
- test: /\.js$/,
- exclude: [/node_modules/],
- use: {
- loader: ifDev('babel-loader?cacheDirectory=true', 'babel-loader'),
- options: {
- presets: [
- '@babel/preset-env',
- ],
- plugins: [
- '@babel/plugin-syntax-dynamic-import',
- ],
- },
- },
- },
- {
- test: /\.css$/,
- use: removeEmpty([
- ifDev('vue-style-loader', MiniCssExtractPlugin.loader),
- 'css-loader',
- 'postcss-loader',
- ]),
- },
- {
- test: /\.scss$/,
- use: removeEmpty([
- ifDev('vue-style-loader', MiniCssExtractPlugin.loader),
- 'css-loader',
- 'postcss-loader',
- 'sass-loader',
- ]),
- },
- {
- test: /\.(png|jpe?g|gif|svg|ico)(\?.*)?$/,
- use: {
- loader: 'file-loader',
- options: {
- name: `assets/images/[name]${ifProd('.[hash]', '')}.[ext]`,
- },
- },
- },
- {
- test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
- use: {
- loader: 'file-loader',
- options: {
- name: `assets/fonts/[name]${ifProd('.[hash]', '')}.[ext]`,
- },
- },
- },
- ],
- },
+ module: {
+ rules: [
+ {
+ test: /\.vue$/,
+ loader: 'vue-loader',
+ },
+ {
+ test: /\.js$/,
+ exclude: [/node_modules/],
+ use: {
+ loader: ifDev('babel-loader?cacheDirectory=true', 'babel-loader'),
+ options: {
+ presets: [
+ '@babel/preset-env',
+ ],
+ plugins: [
+ '@babel/plugin-syntax-dynamic-import',
+ ],
+ },
+ },
+ },
+ {
+ test: /\.css$/,
+ use: removeEmpty([
+ ifDev('vue-style-loader', MiniCssExtractPlugin.loader),
+ 'css-loader',
+ 'postcss-loader',
+ ]),
+ },
+ {
+ test: /\.scss$/,
+ use: removeEmpty([
+ ifDev('vue-style-loader', MiniCssExtractPlugin.loader),
+ 'css-loader',
+ 'postcss-loader',
+ 'sass-loader',
+ ]),
+ },
+ {
+ test: /\.(png|jpe?g|gif|svg|ico)(\?.*)?$/,
+ use: {
+ loader: 'file-loader',
+ options: {
+ name: `assets/images/[name]${ifProd('.[hash]', '')}.[ext]`,
+ },
+ },
+ },
+ {
+ test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
+ use: {
+ loader: 'file-loader',
+ options: {
+ name: `assets/fonts/[name]${ifProd('.[hash]', '')}.[ext]`,
+ },
+ },
+ },
+ ],
+ },
- // splitting out the vendor
- optimization: {
- namedModules: true,
- splitChunks: {
- name: 'vendor',
- minChunks: 2,
- },
- noEmitOnErrors: true,
- // concatenateModules: true,
- },
+ // splitting out the vendor
+ optimization: {
+ namedModules: true,
+ splitChunks: {
+ name: 'vendor',
+ minChunks: 2,
+ },
+ noEmitOnErrors: true,
+ // concatenateModules: true,
+ },
- plugins: removeEmpty([
+ plugins: removeEmpty([
- // create manifest file for server-side asset manipulation
- new ManifestPlugin({
- fileName: 'assets/manifest.json',
- writeToFileEmit: true,
- }),
+ // create manifest file for server-side asset manipulation
+ new ManifestPlugin({
+ fileName: 'assets/manifest.json',
+ writeToFileEmit: true,
+ }),
- // define env
- // new webpack.DefinePlugin({
- // 'process.env': {},
- // }),
+ // define env
+ // new webpack.DefinePlugin({
+ // 'process.env': {},
+ // }),
- // copy static files
- new CopyWebpackPlugin([
- {
- context: `${srcPath}/assets/static`,
- from: { glob: '**/*', dot: false },
- to: `${buildPath}/assets`,
- },
- {
- context: `${srcPath}/assets/static`,
- from: { glob: '**/*', dot: false },
- to: `${buildPath}/assets/[path][name].[hash].[ext]`,
- },
- ]),
+ // copy static files
+ new CopyWebpackPlugin([
+ {
+ context: `${srcPath}/assets/static`,
+ from: { glob: '**/*', dot: false },
+ to: `${buildPath}/assets`,
+ },
+ {
+ context: `${srcPath}/assets/static`,
+ from: { glob: '**/*', dot: false },
+ to: `${buildPath}/assets/[path][name].[hash].[ext]`,
+ },
+ ]),
- // enable hot reloading
- ifDev(new webpack.HotModuleReplacementPlugin()),
+ // enable hot reloading
+ ifDev(new webpack.HotModuleReplacementPlugin()),
- // html
- new HtmlWebpackPlugin({
- filename: 'index.html',
- template: `${srcPath}/index.html`,
- inject: true,
- minify: ifProd({
- removeComments: true,
- collapseWhitespace: true,
- removeAttributeQuotes: true,
- }),
- buildVersion: new Date().valueOf(),
- chunksSortMode: 'none',
- }),
+ // html
+ new HtmlWebpackPlugin({
+ filename: 'index.html',
+ template: `${srcPath}/index.html`,
+ inject: true,
+ minify: ifProd({
+ removeComments: true,
+ collapseWhitespace: true,
+ removeAttributeQuotes: true,
+ }),
+ buildVersion: new Date().valueOf(),
+ chunksSortMode: 'none',
+ }),
- new VueLoaderPlugin(),
+ new VueLoaderPlugin(),
- // create css files
- ifProd(new MiniCssExtractPlugin({
- filename: `assets/css/[name]${ifProd('.[hash]', '')}.css`,
- chunkFilename: `assets/css/[name]${ifProd('.[hash]', '')}.css`,
- })),
+ // create css files
+ ifProd(new MiniCssExtractPlugin({
+ filename: `assets/css/[name]${ifProd('.[hash]', '')}.css`,
+ chunkFilename: `assets/css/[name]${ifProd('.[hash]', '')}.css`,
+ })),
- // minify css files
- ifProd(new OptimizeCssAssetsPlugin({
- cssProcessorOptions: {
- reduceIdents: false,
- autoprefixer: false,
- zindex: false,
- discardComments: {
- removeAll: true,
- },
- },
- })),
+ // minify css files
+ ifProd(new OptimizeCssAssetsPlugin({
+ cssProcessorOptions: {
+ reduceIdents: false,
+ autoprefixer: false,
+ zindex: false,
+ discardComments: {
+ removeAll: true,
+ },
+ },
+ })),
- // svg icons
- new SvgStore({
- prefix: 'icon--',
- svgoOptions: {
- plugins: [
- { cleanupIDs: false },
- { collapseGroups: false },
- { removeTitle: true },
- ],
- },
- }),
+ // svg icons
+ new SvgStore({
+ prefix: 'icon--',
+ svgoOptions: {
+ plugins: [
+ { cleanupIDs: false },
+ { collapseGroups: false },
+ { removeTitle: true },
+ ],
+ },
+ }),
- // image optimization
- new ImageminWebpackPlugin({
- optipng: ifDev(null, {
- optimizationLevel: 3,
- }),
- jpegtran: ifDev(null, {
- progressive: true,
- quality: 80,
- }),
- svgo: ifDev(null, {
- plugins: [
- { cleanupIDs: false },
- { removeViewBox: false },
- { removeUselessStrokeAndFill: false },
- { removeEmptyAttrs: false },
- ],
- }),
- }),
+ // image optimization
+ new ImageminWebpackPlugin({
+ optipng: ifDev(null, {
+ optimizationLevel: 3,
+ }),
+ jpegtran: ifDev(null, {
+ progressive: true,
+ quality: 80,
+ }),
+ svgo: ifDev(null, {
+ plugins: [
+ { cleanupIDs: false },
+ { removeViewBox: false },
+ { removeUselessStrokeAndFill: false },
+ { removeEmptyAttrs: false },
+ ],
+ }),
+ }),
- ]),
+ ]),
- node: {
- fs: 'empty',
- },
+ node: {
+ fs: 'empty',
+ },
}
diff --git a/build/packages/config.js b/build/packages/config.js
index 25150c17..a05d2ef0 100644
--- a/build/packages/config.js
+++ b/build/packages/config.js
@@ -9,7 +9,7 @@ import packagejson from '../../package.json'
const { version } = packagejson
const banner = `
- /*!
+ /*!
* tiptap v${version}
* (c) ${new Date().getFullYear()} Scrumpy UG (limited liability)
* @license MIT
@@ -23,19 +23,19 @@ function genConfig(opts) {
input: {
input: opts.input,
plugins: [
- flow(),
+ flow(),
node(),
cjs(),
- vue({
- css: true,
- compileTemplate: true,
- }),
+ vue({
+ css: true,
+ compileTemplate: true,
+ }),
replace({
__VERSION__: version,
}),
buble({
- objectAssign: 'Object.assign',
- }),
+ objectAssign: 'Object.assign',
+ }),
],
external(id) { return !/^[\.\/]/.test(id) },
},
@@ -44,7 +44,7 @@ function genConfig(opts) {
format: opts.format,
banner,
name: 'tiptap',
- },
+ },
}
if (opts.env) {
diff --git a/examples/Components/Ad/index.vue b/examples/Components/Ad/index.vue
index e48f8e1a..5184c551 100644
--- a/examples/Components/Ad/index.vue
+++ b/examples/Components/Ad/index.vue
@@ -1,7 +1,7 @@
-
-
-
+
+
+
diff --git a/examples/Components/Ad/style.scss b/examples/Components/Ad/style.scss
index 9b938444..81556ef4 100644
--- a/examples/Components/Ad/style.scss
+++ b/examples/Components/Ad/style.scss
@@ -1,42 +1,42 @@
@import "~variables";
.ad {
- display: block;
- padding: 1rem;
- transition: 0.2s transform;
- margin: 3rem auto 0 auto;
- width: 15rem;
+ display: block;
+ padding: 1rem;
+ transition: 0.2s transform;
+ margin: 3rem auto 0 auto;
+ width: 15rem;
- @media (min-width: 1020px) {
- position: fixed;
- left: 0;
- bottom: 0;
- margin-top: 0;
- }
+ @media (min-width: 1020px) {
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ margin-top: 0;
+ }
- &__image {
- display: block;
- width: 100%;
- height: auto;
- border-radius: 5px;
- overflow: hidden;
- transition: 0.2s box-shadow;
- box-shadow:
- 0 2px 4px 0 rgba(black, 0.05),
- 0 2px 10px 0 rgba(black, 0.07)
- ;
- }
+ &__image {
+ display: block;
+ width: 100%;
+ height: auto;
+ border-radius: 5px;
+ overflow: hidden;
+ transition: 0.2s box-shadow;
+ box-shadow:
+ 0 2px 4px 0 rgba(black, 0.05),
+ 0 2px 10px 0 rgba(black, 0.07)
+ ;
+ }
- &:hover {
- transform: translateY(-5px);
- }
+ &:hover {
+ transform: translateY(-5px);
+ }
- &:hover &__image {
- box-shadow:
- 0 2px 1px 0 rgba(black, 0.07),
- 0 5px 20px 0 rgba(black, 0.06),
- 0 8px 40px 0 rgba(black, 0.04)
- ;
- }
+ &:hover &__image {
+ box-shadow:
+ 0 2px 1px 0 rgba(black, 0.07),
+ 0 5px 20px 0 rgba(black, 0.06),
+ 0 8px 40px 0 rgba(black, 0.04)
+ ;
+ }
-}
\ No newline at end of file
+}
diff --git a/examples/Components/App/style.scss b/examples/Components/App/style.scss
index b81dc98a..c700022a 100644
--- a/examples/Components/App/style.scss
+++ b/examples/Components/App/style.scss
@@ -2,8 +2,8 @@
.page {
- &__content {
- padding: 4rem 1rem;
+ &__content {
+ padding: 4rem 1rem;
}
&__footer {
@@ -212,4 +212,4 @@ li[data-done="true"] .todo-checkbox {
li[data-done="false"] {
text-decoration: none;
-}
\ No newline at end of file
+}
diff --git a/examples/Components/Hero/index.vue b/examples/Components/Hero/index.vue
index d6c15a04..ea5c23f9 100644
--- a/examples/Components/Hero/index.vue
+++ b/examples/Components/Hero/index.vue
@@ -1,17 +1,17 @@
-
-
-
-
-
-
- tiptap – a renderless rich-text editor for Vue.js
-
-
- This editor is based on Prosemirror , fully extendable and renderless. You can easily add custom nodes as Vue components .
-
-
-
+
+
+
+
+
+
+ tiptap – a renderless rich-text editor for Vue.js
+
+
+ This editor is based on Prosemirror , fully extendable and renderless. You can easily add custom nodes as Vue components .
+
+
+
diff --git a/examples/Components/Hero/style.scss b/examples/Components/Hero/style.scss
index 8b44796e..c77fec24 100644
--- a/examples/Components/Hero/style.scss
+++ b/examples/Components/Hero/style.scss
@@ -2,23 +2,23 @@
.hero {
- background-color: $color-black;
- color: $color-white;
- text-align: center;
- padding: 3rem 1rem;
+ background-color: $color-black;
+ color: $color-white;
+ text-align: center;
+ padding: 3rem 1rem;
- &__inner {
- margin: 0 auto;
- max-width: 30rem;
- }
+ &__inner {
+ margin: 0 auto;
+ max-width: 30rem;
+ }
- &__logo {
- width: 4rem;
- height: 4rem;
+ &__logo {
+ width: 4rem;
+ height: 4rem;
- path {
- fill: $color-white;
- }
- }
+ path {
+ fill: $color-white;
+ }
+ }
-}
\ No newline at end of file
+}
diff --git a/examples/Components/Icon/index.vue b/examples/Components/Icon/index.vue
index eac940ca..29f23ad0 100644
--- a/examples/Components/Icon/index.vue
+++ b/examples/Components/Icon/index.vue
@@ -1,57 +1,57 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/examples/Components/Navigation/index.vue b/examples/Components/Navigation/index.vue
index 39979957..628657ea 100644
--- a/examples/Components/Navigation/index.vue
+++ b/examples/Components/Navigation/index.vue
@@ -1,30 +1,30 @@
-
+
-
- tiptap beta
-
+
+ tiptap beta
+
-
+
-
+
-
\ No newline at end of file
+
diff --git a/examples/Components/Navigation/style.scss b/examples/Components/Navigation/style.scss
index bbb49e38..ba3c6127 100644
--- a/examples/Components/Navigation/style.scss
+++ b/examples/Components/Navigation/style.scss
@@ -2,54 +2,54 @@
.navigation {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0.75rem;
- background-color: $color-black;
- color: $color-white;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem;
+ background-color: $color-black;
+ color: $color-white;
- &__logo {
- font-size: 1.1rem;
- font-weight: bold;
- margin: 0;
- }
+ &__logo {
+ font-size: 1.1rem;
+ font-weight: bold;
+ margin: 0;
+ }
- &__icon {
- width: 1.5rem;
- height: 1.5rem;
- }
+ &__icon {
+ width: 1.5rem;
+ height: 1.5rem;
+ }
- &__beta {
- display: inline-block;
- vertical-align: middle;
- background-color: $color-white;
- color: $color-black;
- font-size: 0.6rem;
- font-weight: bold;
- text-transform: uppercase;
- letter-spacing: 0.05rem;
- padding: 0.1rem 0.2rem;
- border-radius: 5px;
- }
+ &__beta {
+ display: inline-block;
+ vertical-align: middle;
+ background-color: $color-white;
+ color: $color-black;
+ font-size: 0.6rem;
+ font-weight: bold;
+ text-transform: uppercase;
+ letter-spacing: 0.05rem;
+ padding: 0.1rem 0.2rem;
+ border-radius: 5px;
+ }
- &__link {
- display: inline-block;
- color: rgba($color-white, 0.5);
- text-decoration: none;
- font-weight: bold;
- font-size: 0.9rem;
- padding: 0.1rem 0.5rem;
- border-radius: 3px;
+ &__link {
+ display: inline-block;
+ color: rgba($color-white, 0.5);
+ text-decoration: none;
+ font-weight: bold;
+ font-size: 0.9rem;
+ padding: 0.1rem 0.5rem;
+ border-radius: 3px;
- &:hover {
- color: $color-white;
+ &:hover {
+ color: $color-white;
background-color: rgba($color-white, 0.1);
}
- }
+ }
- &__github-link {
- margin-left: 0.5rem;
- }
+ &__github-link {
+ margin-left: 0.5rem;
+ }
-}
\ No newline at end of file
+}
diff --git a/examples/Components/Routes/Basic/index.vue b/examples/Components/Routes/Basic/index.vue
index 6f0d9fb0..efa91d35 100644
--- a/examples/Components/Routes/Basic/index.vue
+++ b/examples/Components/Routes/Basic/index.vue
@@ -1,209 +1,209 @@
-
-
-
+
+
\ No newline at end of file
+
diff --git a/examples/Components/Routes/CodeHighlighting/index.vue b/examples/Components/Routes/CodeHighlighting/index.vue
index 0782347a..7f46c23b 100644
--- a/examples/Components/Routes/CodeHighlighting/index.vue
+++ b/examples/Components/Routes/CodeHighlighting/index.vue
@@ -1,136 +1,136 @@
-
-
-
+
+
+
diff --git a/examples/Components/Routes/Embeds/Iframe.js b/examples/Components/Routes/Embeds/Iframe.js
index fef35aca..63141242 100644
--- a/examples/Components/Routes/Embeds/Iframe.js
+++ b/examples/Components/Routes/Embeds/Iframe.js
@@ -2,57 +2,57 @@ import { Node } from 'tiptap'
export default class Iframe extends Node {
- get name() {
- return 'iframe'
- }
+ get name() {
+ return 'iframe'
+ }
- get schema() {
- return {
- attrs: {
- src: {
- default: null,
- },
- },
- group: 'block',
- selectable: false,
- parseDOM: [{
- tag: 'iframe',
- getAttrs: dom => ({
- src: dom.getAttribute('src'),
- }),
- }],
- toDOM: node => ['iframe', {
- src: node.attrs.src,
- frameborder: 0,
- allowfullscreen: 'true',
- }],
- }
- }
+ get schema() {
+ return {
+ attrs: {
+ src: {
+ default: null,
+ },
+ },
+ group: 'block',
+ selectable: false,
+ parseDOM: [{
+ tag: 'iframe',
+ getAttrs: dom => ({
+ src: dom.getAttribute('src'),
+ }),
+ }],
+ toDOM: node => ['iframe', {
+ src: node.attrs.src,
+ frameborder: 0,
+ allowfullscreen: 'true',
+ }],
+ }
+ }
- get view() {
- return {
- props: ['node', 'updateAttrs', 'editable'],
- data() {
- return {
- url: this.node.attrs.src,
- }
- },
- methods: {
- onChange(event) {
- this.url = event.target.value
+ get view() {
+ return {
+ props: ['node', 'updateAttrs', 'editable'],
+ data() {
+ return {
+ url: this.node.attrs.src,
+ }
+ },
+ methods: {
+ onChange(event) {
+ this.url = event.target.value
- this.updateAttrs({
- src: this.url,
- })
- },
- },
- template: `
-
-
-
-
- `,
- }
- }
+ this.updateAttrs({
+ src: this.url,
+ })
+ },
+ },
+ template: `
+
+
+
+
+ `,
+ }
+ }
}
diff --git a/examples/Components/Routes/Embeds/index.vue b/examples/Components/Routes/Embeds/index.vue
index 8d927c54..907dbc9f 100644
--- a/examples/Components/Routes/Embeds/index.vue
+++ b/examples/Components/Routes/Embeds/index.vue
@@ -1,51 +1,51 @@
-
-
-
+
+
+
@@ -53,20 +53,20 @@ export default {
@import "~variables";
.iframe {
- &__embed {
- width: 100%;
- height: 15rem;
- border: 0;
- }
+ &__embed {
+ width: 100%;
+ height: 15rem;
+ border: 0;
+ }
- &__input {
- display: block;
- width: 100%;
- font: inherit;
- border: 0;
- border-radius: 5px;
- background-color: rgba($color-black, 0.1);
- padding: 0.3rem 0.5rem;
- }
+ &__input {
+ display: block;
+ width: 100%;
+ font: inherit;
+ border: 0;
+ border-radius: 5px;
+ background-color: rgba($color-black, 0.1);
+ padding: 0.3rem 0.5rem;
+ }
}
diff --git a/examples/Components/Routes/Export/index.vue b/examples/Components/Routes/Export/index.vue
index f14238f0..a2d3348f 100644
--- a/examples/Components/Routes/Export/index.vue
+++ b/examples/Components/Routes/Export/index.vue
@@ -1,203 +1,203 @@
-
-
-
-
-
-
- Clear Content
-
-
- Set Content
-
-
+
+
+ Clear Content
+
+
+ Set Content
+
+
-
-
JSON
-
+
+
JSON
+
-
HTML
-
{{ html }}
-
-
+ HTML
+ {{ html }}
+
+
@@ -205,27 +205,27 @@ export default {
@import "~variables";
.actions {
- max-width: 30rem;
- margin: 0 auto 2rem auto;
+ max-width: 30rem;
+ margin: 0 auto 2rem auto;
}
.export {
- max-width: 30rem;
- margin: 0 auto 2rem auto;
+ max-width: 30rem;
+ margin: 0 auto 2rem auto;
- pre {
- padding: 1rem;
- border-radius: 5px;
- font-size: 0.8rem;
- font-weight: bold;
- background: rgba($color-black, 0.05);
- color: rgba($color-black, 0.8);
- }
+ pre {
+ padding: 1rem;
+ border-radius: 5px;
+ font-size: 0.8rem;
+ font-weight: bold;
+ background: rgba($color-black, 0.05);
+ color: rgba($color-black, 0.8);
+ }
- code {
- display: block;
- white-space: pre-wrap;
- }
+ code {
+ display: block;
+ white-space: pre-wrap;
+ }
}
diff --git a/examples/Components/Routes/FloatingMenu/index.vue b/examples/Components/Routes/FloatingMenu/index.vue
index d0513dac..5a761042 100644
--- a/examples/Components/Routes/FloatingMenu/index.vue
+++ b/examples/Components/Routes/FloatingMenu/index.vue
@@ -1,132 +1,132 @@
-
-
-
+
+
@@ -135,20 +135,20 @@ export default {
.editor {
- position: relative;
+ position: relative;
- &__floating-menu {
- position: absolute;
- margin-top: -0.25rem;
- visibility: hidden;
- opacity: 0;
- transition: opacity 0.2s, visibility 0.2s;
+ &__floating-menu {
+ position: absolute;
+ margin-top: -0.25rem;
+ visibility: hidden;
+ opacity: 0;
+ transition: opacity 0.2s, visibility 0.2s;
- &.is-active {
- opacity: 1;
- visibility: visible;
- }
- }
+ &.is-active {
+ opacity: 1;
+ visibility: visible;
+ }
+ }
}
-
\ No newline at end of file
+
diff --git a/examples/Components/Routes/HidingMenuBar/index.vue b/examples/Components/Routes/HidingMenuBar/index.vue
index 3e3d259d..b463b4f0 100644
--- a/examples/Components/Routes/HidingMenuBar/index.vue
+++ b/examples/Components/Routes/HidingMenuBar/index.vue
@@ -1,185 +1,185 @@
-
-
-
+
+
\ No newline at end of file
+
diff --git a/examples/Components/Routes/Images/index.vue b/examples/Components/Routes/Images/index.vue
index 79356dfa..500c5091 100644
--- a/examples/Components/Routes/Images/index.vue
+++ b/examples/Components/Routes/Images/index.vue
@@ -1,68 +1,68 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ No newline at end of file
+
diff --git a/examples/Components/Routes/Links/index.vue b/examples/Components/Routes/Links/index.vue
index 607c833f..5284eab4 100644
--- a/examples/Components/Routes/Links/index.vue
+++ b/examples/Components/Routes/Links/index.vue
@@ -1,113 +1,113 @@
-
-
\ No newline at end of file
+
diff --git a/examples/Components/Routes/MarkdownShortcuts/index.vue b/examples/Components/Routes/MarkdownShortcuts/index.vue
index 09d1f4fc..325f3c0e 100644
--- a/examples/Components/Routes/MarkdownShortcuts/index.vue
+++ b/examples/Components/Routes/MarkdownShortcuts/index.vue
@@ -1,69 +1,69 @@
-
-
-
+
+
+
\ No newline at end of file
+
diff --git a/examples/Components/Routes/MenuBubble/index.vue b/examples/Components/Routes/MenuBubble/index.vue
index e0469ba8..a8a992a2 100644
--- a/examples/Components/Routes/MenuBubble/index.vue
+++ b/examples/Components/Routes/MenuBubble/index.vue
@@ -1,106 +1,106 @@
-
-
-
+
+
\ No newline at end of file
+
diff --git a/examples/Components/Routes/Placeholder/index.vue b/examples/Components/Routes/Placeholder/index.vue
index f192115c..59ed3880 100644
--- a/examples/Components/Routes/Placeholder/index.vue
+++ b/examples/Components/Routes/Placeholder/index.vue
@@ -1,47 +1,47 @@
-
-
-
+
+
+
diff --git a/examples/Components/Routes/ReadOnly/index.vue b/examples/Components/Routes/ReadOnly/index.vue
index 6994057d..607c9be4 100644
--- a/examples/Components/Routes/ReadOnly/index.vue
+++ b/examples/Components/Routes/ReadOnly/index.vue
@@ -1,49 +1,49 @@
-
-
-
+
+
+
\ No newline at end of file
+
diff --git a/examples/Components/Routes/Suggestions/index.vue b/examples/Components/Routes/Suggestions/index.vue
index d5e4101c..214f58d8 100644
--- a/examples/Components/Routes/Suggestions/index.vue
+++ b/examples/Components/Routes/Suggestions/index.vue
@@ -1,28 +1,28 @@
-
+
-
-
-
+
+
+
-
-
-
- {{ user.name }}
-
-
-
- No users found
-
-
+
+
+
+ {{ user.name }}
+
+
+
+ No users found
+
+
-
+
@@ -242,74 +242,74 @@ export default {
font-weight: bold;
border-radius: 5px;
padding: 0.2rem 0.5rem;
- white-space: nowrap;
+ white-space: nowrap;
}
.mention-suggestion {
- color: rgba($color-black, 0.6);
+ color: rgba($color-black, 0.6);
}
.suggestion-list {
- padding: 0.2rem;
- border: 2px solid rgba($color-black, 0.1);
- font-size: 0.8rem;
- font-weight: bold;
+ padding: 0.2rem;
+ border: 2px solid rgba($color-black, 0.1);
+ font-size: 0.8rem;
+ font-weight: bold;
- &__no-results {
- padding: 0.2rem 0.5rem;
- }
+ &__no-results {
+ padding: 0.2rem 0.5rem;
+ }
- &__item {
- border-radius: 5px;
- padding: 0.2rem 0.5rem;
- margin-bottom: 0.2rem;
- cursor: pointer;
+ &__item {
+ border-radius: 5px;
+ padding: 0.2rem 0.5rem;
+ margin-bottom: 0.2rem;
+ cursor: pointer;
- &:last-child {
- margin-bottom: 0;
- }
+ &:last-child {
+ margin-bottom: 0;
+ }
- &.is-selected,
- &:hover {
- background-color: rgba($color-white, 0.2);
- }
+ &.is-selected,
+ &:hover {
+ background-color: rgba($color-white, 0.2);
+ }
- &.is-empty {
- opacity: 0.5;
- }
- }
+ &.is-empty {
+ opacity: 0.5;
+ }
+ }
}
.tippy-tooltip.dark-theme {
- background-color: $color-black;
- padding: 0;
- font-size: 1rem;
- text-align: inherit;
- color: $color-white;
- border-radius: 5px;
+ background-color: $color-black;
+ padding: 0;
+ font-size: 1rem;
+ text-align: inherit;
+ color: $color-white;
+ border-radius: 5px;
- .tippy-backdrop {
- display: none;
- }
+ .tippy-backdrop {
+ display: none;
+ }
- .tippy-roundarrow {
- fill: $color-black;
- }
+ .tippy-roundarrow {
+ fill: $color-black;
+ }
- .tippy-popper[x-placement^=top] & .tippy-arrow {
- border-top-color: $color-black;
- }
+ .tippy-popper[x-placement^=top] & .tippy-arrow {
+ border-top-color: $color-black;
+ }
- .tippy-popper[x-placement^=bottom] & .tippy-arrow {
- border-bottom-color: $color-black;
- }
+ .tippy-popper[x-placement^=bottom] & .tippy-arrow {
+ border-bottom-color: $color-black;
+ }
- .tippy-popper[x-placement^=left] & .tippy-arrow {
- border-left-color: $color-black;
- }
+ .tippy-popper[x-placement^=left] & .tippy-arrow {
+ border-left-color: $color-black;
+ }
- .tippy-popper[x-placement^=right] & .tippy-arrow {
- border-right-color: $color-black;
- }
+ .tippy-popper[x-placement^=right] & .tippy-arrow {
+ border-right-color: $color-black;
+ }
}
diff --git a/examples/Components/Routes/TextAlign/Paragraph.js b/examples/Components/Routes/TextAlign/Paragraph.js
index 926fa1fd..6185cca1 100644
--- a/examples/Components/Routes/TextAlign/Paragraph.js
+++ b/examples/Components/Routes/TextAlign/Paragraph.js
@@ -3,32 +3,32 @@ import { Node } from 'tiptap'
export default class Paragraph extends Node {
- get name() {
- return 'paragraph'
- }
+ get name() {
+ return 'paragraph'
+ }
- get schema() {
- return {
- attrs: {
- textAlign: {
- default: 'left',
- },
- },
- content: 'inline*',
- group: 'block',
- draggable: false,
- parseDOM: [{
- tag: 'p',
- getAttrs: node => ({
- textAlign: node.style.textAlign,
- }),
- }],
- toDOM: node => ['p', { style: `text-align: ${node.attrs.textAlign}` }, 0],
- }
- }
+ get schema() {
+ return {
+ attrs: {
+ textAlign: {
+ default: 'left',
+ },
+ },
+ content: 'inline*',
+ group: 'block',
+ draggable: false,
+ parseDOM: [{
+ tag: 'p',
+ getAttrs: node => ({
+ textAlign: node.style.textAlign,
+ }),
+ }],
+ toDOM: node => ['p', { style: `text-align: ${node.attrs.textAlign}` }, 0],
+ }
+ }
- commands({ type }) {
- return attrs => setBlockType(type, attrs)
- }
+ commands({ type }) {
+ return attrs => setBlockType(type, attrs)
+ }
}
diff --git a/examples/Components/Routes/TextAlign/index.vue b/examples/Components/Routes/TextAlign/index.vue
index f9f64d49..81d12f75 100644
--- a/examples/Components/Routes/TextAlign/index.vue
+++ b/examples/Components/Routes/TextAlign/index.vue
@@ -1,93 +1,93 @@
-
-
-
+
+
+
+
diff --git a/examples/Components/Routes/TodoList/index.vue b/examples/Components/Routes/TodoList/index.vue
index 297c18e1..149977d8 100644
--- a/examples/Components/Routes/TodoList/index.vue
+++ b/examples/Components/Routes/TodoList/index.vue
@@ -1,108 +1,108 @@
-
-
-
+
+
@@ -148,4 +148,4 @@ li[data-done="true"] .todo-checkbox {
li[data-done="false"] {
text-decoration: none;
}
-
\ No newline at end of file
+
diff --git a/examples/Components/Subnavigation/index.vue b/examples/Components/Subnavigation/index.vue
index ba93707e..3cc9cf5b 100644
--- a/examples/Components/Subnavigation/index.vue
+++ b/examples/Components/Subnavigation/index.vue
@@ -1,51 +1,51 @@
-
-
- Basic
-
-
- Menu Bubble
-
-
- Floating Menu
-
-
- Links
-
-
- Images
-
-
- Text Align
-
-
- Hiding Menu Bar
-
-
- Todo List
-
-
- Suggestions
-
-
- Markdown Shortcuts
-
-
- Code Highlighting
-
-
- Read-Only
-
-
- Embeds
-
-
- Placeholder
-
-
- Export HTML or JSON
-
-
+
+
+ Basic
+
+
+ Menu Bubble
+
+
+ Floating Menu
+
+
+ Links
+
+
+ Images
+
+
+ Text Align
+
+
+ Hiding Menu Bar
+
+
+ Todo List
+
+
+ Suggestions
+
+
+ Markdown Shortcuts
+
+
+ Code Highlighting
+
+
+ Read-Only
+
+
+ Embeds
+
+
+ Placeholder
+
+
+ Export HTML or JSON
+
+
-
\ No newline at end of file
+
diff --git a/examples/Components/Subnavigation/style.scss b/examples/Components/Subnavigation/style.scss
index 32387211..403da309 100644
--- a/examples/Components/Subnavigation/style.scss
+++ b/examples/Components/Subnavigation/style.scss
@@ -2,35 +2,35 @@
.subnavigation {
- padding: 0.5rem;
- background-color: rgba($color-black, 0.9);
- color: $color-white;
- text-align: center;
+ padding: 0.5rem;
+ background-color: rgba($color-black, 0.9);
+ color: $color-white;
+ text-align: center;
- @media (min-width: 600px) {
- position: sticky;
- top: 0;
- z-index: 1000;
- }
+ @media (min-width: 600px) {
+ position: sticky;
+ top: 0;
+ z-index: 1000;
+ }
- &__link {
- display: inline-block;
- color: rgba($color-white, 0.5);
- text-decoration: none;
- font-weight: bold;
- font-size: 0.9rem;
- padding: 0.1rem 0.5rem;
- border-radius: 3px;
+ &__link {
+ display: inline-block;
+ color: rgba($color-white, 0.5);
+ text-decoration: none;
+ font-weight: bold;
+ font-size: 0.9rem;
+ padding: 0.1rem 0.5rem;
+ border-radius: 3px;
- &:hover {
- color: $color-white;
+ &:hover {
+ color: $color-white;
background-color: rgba($color-white, 0.1);
}
&.is-exact-active {
- color: $color-white;
+ color: $color-white;
background-color: rgba($color-white, 0.2);
}
- }
+ }
-}
\ No newline at end of file
+}
diff --git a/examples/assets/images/icons/align-center.svg b/examples/assets/images/icons/align-center.svg
index 707ceb54..4f980d65 100644
--- a/examples/assets/images/icons/align-center.svg
+++ b/examples/assets/images/icons/align-center.svg
@@ -1 +1 @@
-paragraph-center-align-alternate
\ No newline at end of file
+paragraph-center-align-alternate
diff --git a/examples/assets/images/icons/align-left.svg b/examples/assets/images/icons/align-left.svg
index 5a679484..40665539 100644
--- a/examples/assets/images/icons/align-left.svg
+++ b/examples/assets/images/icons/align-left.svg
@@ -1 +1 @@
-paragraph-left-align-alternate
\ No newline at end of file
+paragraph-left-align-alternate
diff --git a/examples/assets/images/icons/align-right.svg b/examples/assets/images/icons/align-right.svg
index 8e70ec39..820e6fec 100644
--- a/examples/assets/images/icons/align-right.svg
+++ b/examples/assets/images/icons/align-right.svg
@@ -1 +1 @@
-paragraph-right-align-alternate
\ No newline at end of file
+paragraph-right-align-alternate
diff --git a/examples/assets/images/icons/bold.svg b/examples/assets/images/icons/bold.svg
index a981d296..985854b3 100644
--- a/examples/assets/images/icons/bold.svg
+++ b/examples/assets/images/icons/bold.svg
@@ -1 +1 @@
-text-bold
\ No newline at end of file
+text-bold
diff --git a/examples/assets/images/icons/checklist.svg b/examples/assets/images/icons/checklist.svg
index d4298911..20e8dc03 100644
--- a/examples/assets/images/icons/checklist.svg
+++ b/examples/assets/images/icons/checklist.svg
@@ -1 +1 @@
-checklist-alternate
\ No newline at end of file
+checklist-alternate
diff --git a/examples/assets/images/icons/code.svg b/examples/assets/images/icons/code.svg
index 3570e175..18b960bf 100644
--- a/examples/assets/images/icons/code.svg
+++ b/examples/assets/images/icons/code.svg
@@ -1 +1 @@
-angle-brackets
\ No newline at end of file
+angle-brackets
diff --git a/examples/assets/images/icons/image.svg b/examples/assets/images/icons/image.svg
index 8e1a8f4f..388c745f 100644
--- a/examples/assets/images/icons/image.svg
+++ b/examples/assets/images/icons/image.svg
@@ -1 +1 @@
-paginate-filter-picture-alternate
\ No newline at end of file
+paginate-filter-picture-alternate
diff --git a/examples/assets/images/icons/italic.svg b/examples/assets/images/icons/italic.svg
index a0773927..1916b10a 100644
--- a/examples/assets/images/icons/italic.svg
+++ b/examples/assets/images/icons/italic.svg
@@ -1 +1 @@
-text-italic
\ No newline at end of file
+text-italic
diff --git a/examples/assets/images/icons/link.svg b/examples/assets/images/icons/link.svg
index e02c680f..223282be 100644
--- a/examples/assets/images/icons/link.svg
+++ b/examples/assets/images/icons/link.svg
@@ -1 +1 @@
-hyperlink-2
\ No newline at end of file
+hyperlink-2
diff --git a/examples/assets/images/icons/ol.svg b/examples/assets/images/icons/ol.svg
index 90e8cb36..1e524f7f 100644
--- a/examples/assets/images/icons/ol.svg
+++ b/examples/assets/images/icons/ol.svg
@@ -1 +1 @@
-list-numbers
\ No newline at end of file
+list-numbers
diff --git a/examples/assets/images/icons/paragraph.svg b/examples/assets/images/icons/paragraph.svg
index b58ab10e..4c23b826 100644
--- a/examples/assets/images/icons/paragraph.svg
+++ b/examples/assets/images/icons/paragraph.svg
@@ -1 +1 @@
-paragraph
\ No newline at end of file
+paragraph
diff --git a/examples/assets/images/icons/quote.svg b/examples/assets/images/icons/quote.svg
index ca4b1533..64c4d3fb 100644
--- a/examples/assets/images/icons/quote.svg
+++ b/examples/assets/images/icons/quote.svg
@@ -1 +1 @@
-close-quote
\ No newline at end of file
+close-quote
diff --git a/examples/assets/images/icons/redo.svg b/examples/assets/images/icons/redo.svg
index 93fd762c..fbfc27a5 100644
--- a/examples/assets/images/icons/redo.svg
+++ b/examples/assets/images/icons/redo.svg
@@ -1 +1 @@
-redo
\ No newline at end of file
+redo
diff --git a/examples/assets/images/icons/remove.svg b/examples/assets/images/icons/remove.svg
index dad025f3..53397958 100644
--- a/examples/assets/images/icons/remove.svg
+++ b/examples/assets/images/icons/remove.svg
@@ -1 +1 @@
-delete-2-alternate
\ No newline at end of file
+delete-2-alternate
diff --git a/examples/assets/images/icons/strike.svg b/examples/assets/images/icons/strike.svg
index 4e67b52d..5bf1e886 100644
--- a/examples/assets/images/icons/strike.svg
+++ b/examples/assets/images/icons/strike.svg
@@ -1 +1 @@
-text-strike-through
\ No newline at end of file
+text-strike-through
diff --git a/examples/assets/images/icons/ul.svg b/examples/assets/images/icons/ul.svg
index af7a060a..ab754800 100644
--- a/examples/assets/images/icons/ul.svg
+++ b/examples/assets/images/icons/ul.svg
@@ -1 +1 @@
-list-bullets
\ No newline at end of file
+list-bullets
diff --git a/examples/assets/images/icons/underline.svg b/examples/assets/images/icons/underline.svg
index ac70c47a..26f85651 100644
--- a/examples/assets/images/icons/underline.svg
+++ b/examples/assets/images/icons/underline.svg
@@ -1 +1 @@
-text-underline
\ No newline at end of file
+text-underline
diff --git a/examples/assets/images/icons/undo.svg b/examples/assets/images/icons/undo.svg
index c834b4b1..833ab39d 100644
--- a/examples/assets/images/icons/undo.svg
+++ b/examples/assets/images/icons/undo.svg
@@ -1 +1 @@
-undo
\ No newline at end of file
+undo
diff --git a/examples/assets/sass/editor.scss b/examples/assets/sass/editor.scss
index a92b6336..2c7947e1 100644
--- a/examples/assets/sass/editor.scss
+++ b/examples/assets/sass/editor.scss
@@ -53,4 +53,4 @@
}
}
-}
\ No newline at end of file
+}
diff --git a/examples/assets/sass/main.scss b/examples/assets/sass/main.scss
index bdba5825..89a88025 100644
--- a/examples/assets/sass/main.scss
+++ b/examples/assets/sass/main.scss
@@ -1,39 +1,39 @@
@import "~variables";
* {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- text-size-adjust: 100%;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
- -webkit-touch-callout: none;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- text-rendering: optimizeLegibility;
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ text-size-adjust: 100%;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+ -webkit-touch-callout: none;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ text-rendering: optimizeLegibility;
- &:focus {
- outline: none;
- }
+ &:focus {
+ outline: none;
+ }
}
*::before,
*::after {
- box-sizing: border-box;
+ box-sizing: border-box;
}
html {
- font-family: -apple-system, BlinkMacSystemFont, San Francisco, Roboto, Segoe UI, Helvetica Neue, sans-serif;
- font-size: 18px;
- color: $color-black;
- line-height: 1.5;
+ font-family: -apple-system, BlinkMacSystemFont, San Francisco, Roboto, Segoe UI, Helvetica Neue, sans-serif;
+ font-size: 18px;
+ color: $color-black;
+ line-height: 1.5;
}
body {
- margin: 0;
+ margin: 0;
}
a {
- color: inherit;
+ color: inherit;
}
h1,
@@ -44,11 +44,11 @@ ul,
ol,
pre,
blockquote {
- margin: 1rem 0;
+ margin: 1rem 0;
&:first-child {
margin-top: 0;
- }
+ }
&:last-child {
margin-bottom: 0;
@@ -58,22 +58,22 @@ blockquote {
h1,
h2,
h3 {
- line-height: 1.3;
+ line-height: 1.3;
}
.button {
- font-weight: bold;
- display: inline-flex;
- background: transparent;
- border: 0;
- color: $color-black;
- padding: 0.2rem 0.5rem;
- margin-right: 0.2rem;
- border-radius: 3px;
- cursor: pointer;
- background-color: rgba($color-black, 0.1);
+ font-weight: bold;
+ display: inline-flex;
+ background: transparent;
+ border: 0;
+ color: $color-black;
+ padding: 0.2rem 0.5rem;
+ margin-right: 0.2rem;
+ border-radius: 3px;
+ cursor: pointer;
+ background-color: rgba($color-black, 0.1);
}
@import "./editor";
@import "./menubar";
-@import "./menububble";
\ No newline at end of file
+@import "./menububble";
diff --git a/examples/assets/sass/menubar.scss b/examples/assets/sass/menubar.scss
index e7dea82b..3846f046 100644
--- a/examples/assets/sass/menubar.scss
+++ b/examples/assets/sass/menubar.scss
@@ -34,4 +34,4 @@
background-color: rgba($color-black, 0.1);
}
}
-}
\ No newline at end of file
+}
diff --git a/examples/assets/sass/menububble.scss b/examples/assets/sass/menububble.scss
index 818c5d5e..e408465f 100644
--- a/examples/assets/sass/menububble.scss
+++ b/examples/assets/sass/menububble.scss
@@ -45,4 +45,4 @@
background: transparent;
color: $color-white;
}
-}
\ No newline at end of file
+}
diff --git a/examples/assets/sass/variables.scss b/examples/assets/sass/variables.scss
index 7ca1d2c6..7d6283ac 100644
--- a/examples/assets/sass/variables.scss
+++ b/examples/assets/sass/variables.scss
@@ -1,2 +1,2 @@
$color-black: #000000;
-$color-white: #ffffff;
\ No newline at end of file
+$color-white: #ffffff;
diff --git a/examples/helpers/svg-sprite-loader.js b/examples/helpers/svg-sprite-loader.js
index 63922383..db9be476 100644
--- a/examples/helpers/svg-sprite-loader.js
+++ b/examples/helpers/svg-sprite-loader.js
@@ -1,80 +1,80 @@
;(function(window, document) {
- 'use strict';
+ 'use strict';
- var isSvg = document.createElementNS && document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ).createSVGRect;
- var localStorage = 'localStorage' in window && window['localStorage'] !== null ? window.localStorage : false;
+ var isSvg = document.createElementNS && document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ).createSVGRect;
+ var localStorage = 'localStorage' in window && window['localStorage'] !== null ? window.localStorage : false;
- function svgSpriteInjector(source, opts) {
- var file;
- opts = opts || {};
+ function svgSpriteInjector(source, opts) {
+ var file;
+ opts = opts || {};
- if (source instanceof Node) {
- file = source.getAttribute('data-svg-sprite');
- opts.revision = source.getAttribute('data-svg-sprite-revision') || opts.revision;
- } else if (typeof source === 'string') {
- file = source;
- }
+ if (source instanceof Node) {
+ file = source.getAttribute('data-svg-sprite');
+ opts.revision = source.getAttribute('data-svg-sprite-revision') || opts.revision;
+ } else if (typeof source === 'string') {
+ file = source;
+ }
- if (isSvg) {
- if (file) {
- injector(file, opts);
- } else {
- console.error('svg-sprite-injector: undefined sprite filename!');
- }
- } else {
- console.error('svg-sprite-injector require ie9 or greater!');
- }
- };
+ if (isSvg) {
+ if (file) {
+ injector(file, opts);
+ } else {
+ console.error('svg-sprite-injector: undefined sprite filename!');
+ }
+ } else {
+ console.error('svg-sprite-injector require ie9 or greater!');
+ }
+ };
- function injector(filepath, opts) {
- var name = 'injectedSVGSprite' + filepath,
- revision = opts.revision,
- request;
+ function injector(filepath, opts) {
+ var name = 'injectedSVGSprite' + filepath,
+ revision = opts.revision,
+ request;
- // localStorage cache
- if (revision !== undefined && localStorage && localStorage[name + 'Rev'] == revision) {
- return injectOnLoad(localStorage[name]);
- }
+ // localStorage cache
+ if (revision !== undefined && localStorage && localStorage[name + 'Rev'] == revision) {
+ return injectOnLoad(localStorage[name]);
+ }
- // Async load
- request = new XMLHttpRequest();
- request.open('GET', filepath, true);
- request.onreadystatechange = function (e) {
- var data;
+ // Async load
+ request = new XMLHttpRequest();
+ request.open('GET', filepath, true);
+ request.onreadystatechange = function (e) {
+ var data;
- if (request.readyState === 4 && request.status >= 200 && request.status < 400) {
- injectOnLoad(data = request.responseText);
- if (revision !== undefined && localStorage) {
- localStorage[name] = data;
- localStorage[name + 'Rev'] = revision;
- }
- }
- };
- request.send();
- }
+ if (request.readyState === 4 && request.status >= 200 && request.status < 400) {
+ injectOnLoad(data = request.responseText);
+ if (revision !== undefined && localStorage) {
+ localStorage[name] = data;
+ localStorage[name + 'Rev'] = revision;
+ }
+ }
+ };
+ request.send();
+ }
- function injectOnLoad(data) {
- if (data) {
- if (document.body) {
- injectData(data);
- } else {
- document.addEventListener('DOMContentLoaded', injectData.bind(null, data));
- }
- }
- }
+ function injectOnLoad(data) {
+ if (data) {
+ if (document.body) {
+ injectData(data);
+ } else {
+ document.addEventListener('DOMContentLoaded', injectData.bind(null, data));
+ }
+ }
+ }
- function injectData(data) {
- var body = document.body;
- body.insertAdjacentHTML('afterbegin', data);
- if (body.firstChild.tagName === 'svg') {
- body.firstChild.style.display = 'none';
- }
- }
+ function injectData(data) {
+ var body = document.body;
+ body.insertAdjacentHTML('afterbegin', data);
+ if (body.firstChild.tagName === 'svg') {
+ body.firstChild.style.display = 'none';
+ }
+ }
- if (typeof exports === 'object') {
- module.exports = svgSpriteInjector;
- } else {
- window.svgSpriteInjector = svgSpriteInjector;
- }
+ if (typeof exports === 'object') {
+ module.exports = svgSpriteInjector;
+ } else {
+ window.svgSpriteInjector = svgSpriteInjector;
+ }
-} (window, document));
\ No newline at end of file
+} (window, document));
diff --git a/examples/index.html b/examples/index.html
index ce90f5c5..c3cb9ed8 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -1,16 +1,16 @@
-
-
-
- tiptap
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+ tiptap
+
+
+
+
+
+
+
+
+
+