TinyMCEPlugin Development

This is the topic to discuss development of download TinyMCEPlugin

help If you need support, go to Support.TinyMCEPlugin where you can ask questions and find answers to previously asked questions. warning If you want to report a bug, or a feature request, go to Tasks.TinyMCEPlugin where you can see already submitted issues and where you can submit a new bug report or feature request.

Active Items

Id Summary Priority Current State Creation Date Last Edit
Item741 Allow users to build search queries using the Tinymce editor Enhancement New 11 Jan 2009 - 20:09 03 Jan 2010 - 03:30
Item2285 Fullscreen mode might be confusing Enhancement New 24 Oct 2009 - 07:40 15 Jan 2010 - 22:58
Item1419 Inserting formatted links is not working correctly Enhancement Confirmed 04 Apr 2009 - 12:25 16 Jan 2010 - 00:42
Item9220 autosave drafts should be removed on save/save+continue Enhancement Confirmed 28 Jun 2010 - 23:53 01 Jul 2010 - 05:44
Item10695 Losing table colours at save Enhancement Confirmed 02 May 2011 - 10:25 08 Apr 2014 - 03:17
Item9726 How to disable Wysiwyg from an EditTemplate. Enhancement Confirmed 21 Sep 2010 - 04:56 21 Jan 2015 - 19:01
Item13851 TinyMCE needs a "signature" button, similar to the NatEdit option. Enhancement Confirmed 13 Nov 2015 - 15:01 13 Nov 2015 - 15:01
Item14323 Update to latest TinyMCE version Urgent Being Worked On 21 Feb 2017 - 08:00 22 Jun 2019 - 01:55


Updating with a new TinyMCE Release.

As of TinyMCEPlugin 2.0, Foswiki uses the TinyMCE distribution without any modifications. All Foswiki integration is done external to the tinymce release. In preparation for the upgrade, download the latest TinyMCE Community Release. The developer version is not required.

  • In TinyMCEPlugin root directory in git, use git clean -fdx to clean the directory and all sub-directories of extraneous files
  • Change to the pub/System/TinyMCEPlugin directory
  • Remove the pub/System/TinyMCEPlugin/tinymce directory: rm -rf tinymce
  • Unzip tinymce_x.x.x.zip to recreate the tinymce directory: unzip ~/Downloads/tinymce_4.6.6.zip
  • Change file permissions so that the new MANIFEST file will be correct:
    find . -type f -exec chmod 644 {} \;
    find . -type d -exec chmod 755 {} \; 
  • Add the changes to the git index: git add .
  • Recreate the MANIFEST file to reflect any changes:
    cd ../../../lib/Foswiki/Plugins/TinyMCEPlugin/
    perl build.pl manifest | grep -v tinymce_dev | grep -v \.psd > MANIFEST
  • Edit the manifest:
    • Remove the header/trailer lines created by build.pl
    • Add the !noci line to the top of the file
  • Commit the changes

TinyMCE Developer Version

(The Developer code is currently unzipped into pub/System/TinyMCEPlugin/tinymce_dev. As we don't use this code normally, it may be better to reference the developer edition using a git submodule. This is a proposed change - See Tasks.Item14481 )

The TinyMCE Developer version is not needed by Foswiki and is not shipped. However it can be useful when debugging / testing TinyMCE. The developer version can also be downloaded from tinymce.com, however it is also available from github and can be included in the Foswiki repository through use of a submodule.

pub/System/TinyMCEPlugin/tinymce_dev will be removed and replaced with a submodule. pointing to the TinyMCE git Repository

Proposed changes

Remove the existing tinymce_dev directory
cd pub/System/TinyMCEPlugin
git rm -rf tinymce_dev

Create a new tinymce_dev as a submodule pointing to the tinymce github account
git submodule add https://github.com/tinymce/tinymce.git tinymce_dev
Cloning into 'TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce_dev'...
remote: Counting objects: 79661, done.
remote: Compressing objects: 100% (341/341), done.
remote: Total 79661 (delta 157), reused 311 (delta 91), pack-reused 79206
Receiving objects: 100% (79661/79661), 32.90 MiB | 5.94 MiB/s, done.
Resolving deltas: 100% (49296/49296), done.
Checking connectivity... done.

git diff --cached
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..2ceea27
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce_dev"]
+       path = TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce_dev
+       url = https://github.com/tinymce/tinymce.git
diff --git a/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce_dev b/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce_dev
new file mode 160000
index 0000000..72f3470
--- /dev/null
+++ b/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce_dev
@@ -0,0 +1 @@
+Subproject commit 72f34705055f16116a4f501ef826d7eba96a81ed

Note that these changes cannot be made into a feature branch, but have to be applied directly to master. (Once the submodule directory tinymce_dev is initialized in a branch, it's not possible to switch back to master due to the collision. As this was a recent addition, there is no conflict with other branches.

Switch developers source over to a release:

cd pub/System/TinyMCEPlugin/tinymce_dev/
git checkout 4.6.6
Note: checking out '4.6.6'.<

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 16916f0... Merge pull request #343 in TINYMCE/tinymce from TINY-1204 to master

 ((HEAD detached at 4.6.6)) $ 

Build a test release using the git source

Refer to the latest instructions in tinymce_dev/readme.md

  • Change to the tinymce_dev directory
  • Check out the desired release tag or use master for latest changes
  • Run npm install to install the grunt modules into the project.
  • The grunt command will build the TinyMCE release into the tinymce_dev/tmp directory
  • Unzip the release file as described above.

Removing the submodule if conflicting with another branch

  • cd pub/System/TinyMCEPlugin/tinymce_dev
  • git clean -fdx (Remove all untracked files from the submodule)
  • cd ..
  • git submodule deinit tinymce_dev
This should leave an empty tinymce_dev directory so that another conflicting branch can be checked out. To restore the submodule:
  • cd pub/System/TinyMCEPlugin/tinymce_dev
  • git submodule init
  • git submodule update
That should restore the tinymce_dev module and check it out to the tinymce master branch.
I Attachment Action Size Date Who Comment
wordcount.diffdiff wordcount.diff manage 753 bytes 20 Apr 2010 - 05:04 PaulHarvey patch to wordcount fixing build failure
Topic revision: r18 - 16 Sep 2017, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy