Skip to content

Commit 02feff8

Browse files
authored
React test (#700)
* first commit for react-test * Update selection.js * small arrangements to archived files * prepare for PR
1 parent afa6e24 commit 02feff8

File tree

14 files changed

+2160
-63
lines changed

14 files changed

+2160
-63
lines changed
+1-32
Original file line numberDiff line numberDiff line change
@@ -1,32 +1 @@
1-
---
2-
name: Feature Request
3-
about: Report a new feature
4-
title: ''
5-
labels: enhancement
6-
assignees: ''
7-
---
8-
9-
<!--
10-
11-
NOTE: THIS PROJECT IS NOT BEING ACTIVELY MAINTAINED.
12-
13-
YOU CAN FILE A SUGGESTION IN CASE SOMEONE DECIDES TO WORK ON IT.
14-
15-
-->
16-
17-
## Motivation
18-
19-
<!-- What would be the purpose of this new feature? -->
20-
21-
## Current behavior
22-
23-
<!-- If this is to enhance an existing rule, how does the rule
24-
currently behave in regard to the new changes? -->
25-
26-
## Desired behavior
27-
28-
<!-- What would you like to see happen instead? -->
29-
30-
## Alternatives considered
31-
32-
<!-- For any alternatives you have considered -->
1+
Please submit Feature Requests in the [discussion tab](https://github.com/SVG-Edit/svgedit/discussions)

FUNDING.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
github: [brettz9] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
44
patreon: # Replace with a single Patreon username
5-
open_collective: # Replace with a single Open Collective username
6-
ko_fi: # Replace with a single Ko-fi username
7-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9-
liberapay: # Replace with a single Liberapay username
105
issuehunt: svg-edit # Replace with a single IssueHunt username
11-
otechie: # Replace with a single Otechie username
12-
custom: # Replace with a single custom sponsorship URL
6+
7+

README.md

+15-10
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,10 @@
33
# SVGEdit
44

55
[![npm](https://img.shields.io/npm/v/svgedit.svg)](https://www.npmjs.com/package/svgedit)
6-
[![Dependencies](https://img.shields.io/david/SVG-Edit/svgedit.svg)](https://david-dm.org/SVG-Edit/svgedit)
7-
[![devDependencies](https://img.shields.io/david/dev/SVG-Edit/svgedit.svg)](https://david-dm.org/SVG-Edit/svgedit?type=dev)
8-
9-
<!-- [![Actions Status](https://github.com/SVG-Edit/svgedit/workflows/Node%20CI/badge.svg)](https://github.com/SVG-Edit/svgedit/actions)
10-
[![Actions Status](https://github.com/SVG-Edit/svgedit/workflows/Coverage/badge.svg)](https://github.com/SVG-Edit/svgedit/actions)
11-
-->
12-
[![Tests badge](https://raw.githubusercontent.com/SVG-Edit/svgedit/master/badges/tests-badge.svg?sanitize=true)](badges/tests-badge.svg)
13-
[![Coverage badge](https://raw.githubusercontent.com/SVG-Edit/svgedit/master/badges/coverage-badge.svg?sanitize=true)](badges/coverage-badge.svg)
14-
6+
[![Actions Status](https://github.com/SVG-Edit/svgedit/workflows/Node%20CI/badge.svg)](https://github.com/SVG-Edit/svgedit/actions)
157
[![Known Vulnerabilities](https://snyk.io/test/github/SVG-Edit/svgedit/badge.svg)](https://snyk.io/test/github/SVG-Edit/svgedit)
168
[![Total Alerts](https://img.shields.io/lgtm/alerts/g/SVG-Edit/svgedit.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/SVG-Edit/svgedit/alerts)
179
[![Code Quality: Javascript](https://img.shields.io/lgtm/grade/javascript/g/SVG-Edit/svgedit.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/SVG-Edit/svgedit/context:javascript)
18-
1910
[![issuehunt-to-marktext](https://issuehunt.io/static/embed/issuehunt-button-v1.svg)](https://issuehunt.io/r/SVG-Edit/svgedit)
2011

2112
SVG-edit is a fast, web-based, JavaScript-driven SVG drawing editor that
@@ -65,6 +56,20 @@ For earlier versions of SVGEdit, please look in their respective branches.
6556
## Supported browsers
6657
Developments and Continuous Integration are done with a **Chrome** environment. Chrome, FireFox and Safari recent versions are supported (in the meaning that we will try to fix bugs for these browsers).
6758
Support for old browsers may require to use an older version of the package. However, please open an issue if you need support for a specific version of your browser so the project team can decide if we should support with the latest version.
59+
60+
## Sample extension based on React
61+
A sample React component was used to build a svgedit extension.
62+
To activate:
63+
- "npm run build" from the extension folder "src/editor/react-extensions/react-test" in order to create the bundle for the extension.
64+
- modify "index.html" to activate the extension as a userExtensions
65+
```
66+
svgEditor.setConfig({
67+
allowInitialUserOverride: true,
68+
extensions: [],
69+
noDefaultExtensions: false,
70+
userExtensions: ['./react-extensions/react-test/dist/react-test.js']
71+
})
72+
```
6873
## Further reading and more information
6974
* Participate in [discussions](https://github.com/SVG-Edit/svgedit/discussions)
7075
* See [AUTHORS](AUTHORS) file for authors.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/editor/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h1>End</h1>
3838
allowInitialUserOverride: true,
3939
extensions: [],
4040
noDefaultExtensions: false,
41-
userExtensions: [/* '../ext-helloworld/ext-helloworld.js' */]
41+
userExtensions: [/* './react-extensions/react-test/dist/react-test.js' */]
4242
})
4343
// Variable XDOMAIN below is created by Rollup for the Xdomain build (see rollup.config.js)
4444
/* globals XDOMAIN */

0 commit comments

Comments
 (0)