diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md new file mode 100644 index 0000000..190edc6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -0,0 +1,14 @@ +--- +name: Custom issue template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + +**Do you want to request a feature or report a bug?** + +**What's the current behavior?** + +**What's the expected behavior?** diff --git a/lerna.json b/lerna.json index 6cd472c..a981ac0 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "2.7.1", - "version": "5.1.0", + "version": "5.1.1", "npmClient": "yarn", "useWorkspaces": true, "packages": [ @@ -10,7 +10,8 @@ "publish": { "allowBranch": [ "master", - "feature/*" + "feature/*", + "release/*" ] } } diff --git a/package.json b/package.json index ef35a02..a7b57fc 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "private": true, + "license": "MIT", "scripts": { "dev": "yarn install && node -r dotenv/config ./node_modules/.bin/lerna run start --parallel", "start": "yarn install && ./node_modules/.bin/lerna run start --parallel", diff --git a/packages/slate-editor-example/package.json b/packages/slate-editor-example/package.json index 3f09edc..b463886 100644 --- a/packages/slate-editor-example/package.json +++ b/packages/slate-editor-example/package.json @@ -1,6 +1,6 @@ { "name": "slate-editor-example", - "version": "5.1.0", + "version": "5.1.1", "description": "A complete rich text editor based on SlateJS framework", "private": true, "main": "lib/index.js", @@ -26,7 +26,7 @@ "@slate-editor/font-family-plugin": "^5.1.0", "@slate-editor/font-size-plugin": "^5.1.0", "@slate-editor/grid-plugin": "^5.1.0", - "@slate-editor/image-plugin": "^5.1.0", + "@slate-editor/image-plugin": "^5.1.1", "@slate-editor/italic-plugin": "^5.0.0", "@slate-editor/link-plugin": "^5.1.0", "@slate-editor/list-plugin": "^5.1.0", @@ -38,7 +38,7 @@ "react-dom": "^16.2.0", "react-router": "^4.2.0", "react-scripts": "^1.1.4", - "slate-editor": "^5.1.0" + "slate-editor": "^5.1.1" }, "files": [ "README.md", diff --git a/packages/slate-editor-image-plugin/package.json b/packages/slate-editor-image-plugin/package.json index 193995e..e363866 100644 --- a/packages/slate-editor-image-plugin/package.json +++ b/packages/slate-editor-image-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@slate-editor/image-plugin", - "version": "5.1.0", + "version": "5.1.1", "description": "SlateJS image node plugin.", "main": "dist/index.js", "repository": "https://github.com/nossas/slate-editor", @@ -25,7 +25,8 @@ "url": "https://github.com/nossas/slate-editor/issues" }, "scripts": { - "prepare": "babel src --out-dir dist --copy-files" + "prepare": "babel src --out-dir dist --copy-files", + "start": "yarn prepare --watch" }, "dependencies": { "@slate-editor/components": "^5.0.0", diff --git a/packages/slate-editor-image-plugin/src/ImageEditLayer.css b/packages/slate-editor-image-plugin/src/ImageEditLayer.css index 0b7fc09..637e80e 100644 --- a/packages/slate-editor-image-plugin/src/ImageEditLayer.css +++ b/packages/slate-editor-image-plugin/src/ImageEditLayer.css @@ -30,6 +30,15 @@ z-index: 11; line-height: 1; } +.image-node--container .image-node--image-edit-layer .image-node--image-edit-text { + color: #000; + font-size: 14px; + padding: 7px 10px; + text-align: center; + position: relative; + line-height: 1; + font-weight: 600; +} .image-node--container:not(.readonly):hover .image-node--image-edit-layer, .image-node--container:not(.readonly):hover .image-node--image-edit-button { diff --git a/packages/slate-editor-image-plugin/src/ImageEditLayer.js b/packages/slate-editor-image-plugin/src/ImageEditLayer.js index e979ec0..84adb4e 100644 --- a/packages/slate-editor-image-plugin/src/ImageEditLayer.js +++ b/packages/slate-editor-image-plugin/src/ImageEditLayer.js @@ -4,12 +4,18 @@ import { Button } from '@slate-editor/components' // FIXME: Needs to handle assets files to work with SSR if (require('exenv').canUseDOM) require('./ImageEditLayer.css') -const ImageEditLayer = ({ changeModalState, text }) => ( -
{text}
+