-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade rich-text and rich-text-presence example to Quill 2.0.2 #683
base: master
Are you sure you want to change the base?
Changes from 5 commits
872ccbf
bf35ca5
41b986f
bb56a4a
e845f87
2f39ee7
bbf90af
ac8f1dd
0196849
93e17a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
"description": "An example of presence using ShareDB and Quill", | ||
"main": "server.js", | ||
"scripts": { | ||
"build": "browserify client.js -o static/dist/bundle.js", | ||
"build": "webpack --mode development", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "node server.js" | ||
}, | ||
|
@@ -18,7 +18,7 @@ | |
"@teamwork/websocket-json-stream": "^2.0.0", | ||
"bson-objectid": "^2.0.4", | ||
"express": "^4.18.2", | ||
"quill": "^1.3.7", | ||
"quill": "^2.0.2", | ||
"quill-cursors": "^4.0.2", | ||
"reconnecting-websocket": "^4.4.0", | ||
"rich-text": "^4.1.0", | ||
|
@@ -27,6 +27,10 @@ | |
"ws": "^8.12.1" | ||
}, | ||
"devDependencies": { | ||
"browserify": "^17.0.0" | ||
"@babel/core": "^7.25.7", | ||
"@babel/preset-env": "^7.25.7", | ||
"babel-loader": "^9.2.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unneeded. |
||
"webpack": "^5.88.2", | ||
"webpack-cli": "^5.1.4" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
<title>ShareDB Rich Text</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/> | ||
<link href="quill.bubble.css" rel="stylesheet"> | ||
<link href="quill.snow.css" rel="stylesheet"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you're changing theme here, please remove |
||
<link href="style.css" rel="stylesheet"> | ||
|
||
<div class="controls"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
entry: './client.js', | ||
output: { | ||
path: path.resolve(__dirname, 'static/dist'), | ||
filename: 'bundle.js' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: 'babel-loader', | ||
options: { | ||
presets: ['@babel/preset-env'] | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
resolve: { | ||
extensions: ['.js'] | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above: unneeded; please remove |
||
mode: 'development' | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
"description": "A simple rich-text editor example based on Quill and ShareDB", | ||
"main": "server.js", | ||
"scripts": { | ||
"build": "browserify client.js -o static/dist/bundle.js", | ||
"build": "webpack --mode development", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "node server.js" | ||
}, | ||
|
@@ -15,14 +15,20 @@ | |
"license": "MIT", | ||
"dependencies": { | ||
"@teamwork/websocket-json-stream": "^2.0.0", | ||
"bson-objectid": "^2.0.4", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not used in this example |
||
"express": "^4.18.2", | ||
"quill": "^1.3.7", | ||
"quill": "^2.0.2", | ||
"quill-cursors": "^4.0.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not used in this example |
||
"reconnecting-websocket": "^4.4.0", | ||
"rich-text": "^4.1.0", | ||
"sharedb": "^3.3.0", | ||
"ws": "^8.12.1" | ||
}, | ||
"devDependencies": { | ||
"browserify": "^17.0.0" | ||
"@babel/core": "^7.25.7", | ||
"@babel/preset-env": "^7.25.7", | ||
"babel-loader": "^9.2.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need these? I think if you remove Similar comment applies for |
||
"webpack": "^5.88.2", | ||
"webpack-cli": "^5.1.4" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
entry: './client.js', | ||
output: { | ||
path: path.resolve(__dirname, 'static/dist'), | ||
filename: 'bundle.js' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: 'babel-loader', | ||
options: { | ||
presets: ['@babel/preset-env'] | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As noted above, I don't think this is needed. Let's remove to keep as minimalist as possible. |
||
resolve: { | ||
extensions: ['.js'] | ||
}, | ||
Comment on lines
+17
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You actually also don't need this. |
||
mode: 'development' | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason in particular for changing the theme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The theme has a toolbar. It is easier to test behavior cursor and the toolbar interactions with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷🏼♂️ I guess it doesn't matter which theme we use, but if you need to do any particularly in-depth testing with cursors and toolbar interaction, that should really be a concern of
quill-cursors
.