Vaadin Flow Java API for HugeRTE text editor. HugeRTE is an MIT-licensed fork of TinyMCE, the world's #1 JavaScript library for rich text editing, which switched from MIT to a GPL-or-pay license model in its latest version.
This add-on is a direct port of the TinyMCE for Flow add-on to use HugeRTE instead. Comments in the code may though refer to previous issues in the TinyMCE add-on, as the code is mostly a copy of it.
Works with binder as the component implements HasValue interfaces. The value is plain HTML. If you can't trust your clients, consider adding a converter that filters the input with e.g. JSOUP library.
Builds will be available from https://vaadin.com/directory
Check out the project to your IDE and run the Application class from src/test/java folder.
This opens up a Spring Boot based testing setup to http://localhost:9998
Some very basic tests are executed on mvn install using Playwright.
Before cutting a release, make sure the build passes properly locally and in GitHub Actions based verification build.
To tag a release and increment versions, issue:
mvn release:prepare release:clean
Answer questions, defaults most often fine.
Note that release:perform is not needed as there is a GitHub Action is set up build and to push release to Maven Central automatically.
Directory will automatically pick up new releases within about half an hour, but if browser or Vaadin version support change, be sure to adjust the metadata in Vaadin Directory UI.
Windows 11 may have issues deploying a new release due to missing tools or unusual setup, that might work on other OSes out of the box.
(As a side note: this is more or less a log of my personal tragedy trying to set up my machine to make it work. Some of this stuff may help, other not. If you find things, that work differently, feel free to updated or extend the following steps. Stefan)
GPG is used to sign the package for maven central. By default, Windows has no utility installed for that.
- Install gpg: https://gpg4win.org/
- Open Kleopatra and create a new public-private-key-pair.
- Export that created key to the public key servers (context menu on the key).
- Extend your maven settings.xml with a gpg profile. To do so copy the 16 digit hexadecimal "id" from the Kleopatra list entry Then create such an entry in your settings: gpg <gpg.keyname>YOUR_16_DIGIT_KEY</gpg.keyname>
Alternatively it should also work to pass the key as a parameter to the mvn call later by using -Dgpg.keyname=YOUR_16_DIGIT_KEY
Important At the moment, there are two release profiles. Ensure to always use the "release-gpg" one plus your gpg profile or -D parameter.
If not setup, you may need to setup the ssh agent and tell git to use Windows' open ssh. You need an ssh key pair in your
.ssh folder, for instance id_rsa or id_ed25519.
- Check if the ssh agent is running using the PowerShell as an admin
Get-Service ssh-agent - If it shows "STOPPED", start it with
Start-Service ssh-agentand set it to automatic startup withSet-Service ssh-agent -StartupType Automatic - Add your key via
ssh-add $env:USERPROFILE\.ssh\id_ed25519(or whatever your key file name is) - Verify the successfull add via
ssh-add -l - Open a new console and test
ssh -T git@github.com. You should see a success message.
- Add a new maven configuration to your IDE.
mvn release:prepare -Prelease-gpg,gpgormvn release:prepare -Prelease-gpg -Dgpg.keyname=YOUR_KEY- Add an environment variable with the name
MAVEN_GPG_PASSPHRASEand set your key password here - I trust you, that no one else can use this ;) - Add an environment variable to your system (or alternatively to your maven configuration - see next step):
GIT_SSHthat points toC:\Windows\System32\OpenSSH\ssh.exe - Run it (and pray, since it still is Windows).
If something fails, ensure to call mvn release:rollback before doing anything else.