I am currently using TinyMCE 4.0.5 with jQuery package and noticed that spell check is not working
i am using a simple set up
tinymce.init({
selector: "textarea",
plugins : "spellchecker",
});
With this set up i can see the option 'SpellCheck' under 'Tools' but when i click on 'SpellCheck' it throws an error
'Error: GENERAL'
Also there is an error in the error log
"File does not exist: PATH/tinymce/js/tinymce/plugins/spellchecker//
but i can see the following file in the above path
PATH/tinymce/js/tinymce/plugins/spellchecker/plugin.min.js
According to what I've found elsewhere, the spellchecker plugin was powered by Google service - which has been retired. So at this time there does not appear to be an integrated TinyMCE spellchecker solution.
However, you CAN enable the browser's built-in spellchecker by doing the following:
tinymce.init({
browser_spellcheck : true,
});
Be sure to remove spellchecker from your toolbar and your plugins list.
Ran into this and solution is even more weird then problem itself: the thing is, that when plugin misses spellchecker_rpc_url parameter, it simply queries the same directory he's in, that's why we get
File does not exist: PATH/tinymce/js/tinymce/plugins/spellchecker/
Set spellchecker_rpc_url parameter to your script URL and this error message will be gone.
The current version of the tinyMCE PHP speller checker (2.0.6.1) seems to be for tinyMCE 3.x not 4.x. I had the same issue as you when setting up 4.0.12. Even if I set my spellchecker_rpc_url to point to rpc.php from the 2.0.6.1 php, it doesn't work because the code doesn't line up with the JSON request being sent by tinyMCE.
There is unreleased work on the tinyMCE spell checker git hub https://github.com/tinymce/tinymce_spellchecker_php
If you download this and use this instead you should have more luck. Beware though, the Google API doesn't exist any more, so you'll have to use enchant or pspell.
There is also a proposed solution to updating the 2.0.6.1 code to work with 4.x on this post http://www.tinymce.com/develop/bugtracker_view.php?id=6309%29.
I did a lot of R&D how to make it work with PHP and details are given below:
Download the community version of tinyMCE form the tinyMCE website. In the download directory, there is a folder spellcheck under plugin folder in which there is a file plugin.min.js. Reference to this file needs to add in the client side code.
Download the PHP spell check code from the given URL i.e
https://www.tinymce.com/docs/get-started/spellchecking/#phpspellcheckercomponent
Host the same on PHP server. And make sure that the enchant option is enabled on PHP server.
You can check the same via phpserverurl/spellchecker/info.php, find the enchant module [to check the enchant option is enabled or not, on PHP server][1][1]: https://i.stack.imgur.com/fBzDm.png
If the file phpserverurl/spellchecker/info.php does not exist, then create a new file there and write the following code:
<?php
phpinfo();
?>
Client-side code for tinyMCE:
// Scripts reference
tinymce.init({
mode: "exact",
selector: 'textarea',
height: 540,
with: 'auto',
menubar: false,
toolbar: 'spellchecker | formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | undo redo | removeformat',
toolbar_items_size: 'small',
branding: false, // To disable "Powered by TinyMCE"
statusbar: false,
plugins: "spellchecker",
spellchecker_rpc_url: 'phpserverurl/spellchecker/spellchecker.php', // this is url of php server where spellchecker code is hosted
spellchecker_languages: 'en'
});
Click on spellcheck icon when the editor is rendered and it will give you the suggestions to correct the misspelled words.
If your tinyMCE code and spellchecker code is hosted on a different server then add a line of code in the header of spellchecker.php file i.e given below
header ("Access-Control-Allow-Origin: *");
header ("Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE, OPTIONS");
header ("Access-Control-Allow-Headers: *");
In order to resolve the cross-domain request, otherwise, there is no need to add the above line of code.
Thanks.
Related
after i updated TYPO3 from 8.x to 9.5.x appears some red texts in the backend. How can i remove it?
Well,
It's not a Bug, It's Feature!!
You must have enabled TYPO3 backend debug, that way you will see the field name right after field label. You can disable from LocalConfiguration.php or from TYPO3 backend it self.
From LocalConfiguration.php: Just open LocalConfiguration.php located in typo3conf. Find [BE]['debug'] => 'true' and switch it back to [BE]['debug'] => 'false'
From TYPO3 backend:
Go to settings module under Admin Tool.
Find Configuration Presets and click on Choose Preset
You will find Debug settings there, click on it and switch to Live
Basically, both done the same thing. TYPO3 will disable debug mode and only critical warnings and errors will be displayed.
That's it!
HCL Connections has some kind of customized build of TinyMCE, which could be officially used as replacement for the old CKEditor. I'd like to know which version is installed. Especially on test systems I'm not sure which version is currently installed on which system.
Found out that this could be fetched from JS variables in the browser console:
tinymce.majorVersion + '.' + tinymce.minorVersion
"5.1.1"
But it misses the patch version 5.1.1-XX where XX is a number. Is there any other way how to find out detailled information about the installed version?
There is a test page avaliable on the following url: https://cnx.host/connections/resources/web/tiny.editors.connections/verify.html
When TinyMCE was successfully installed (may require a restart of at least the common app), you'll see something like this:
Tiny Editors for HCL Connections has been successfully installed. This
is release 4.1.0.15
The TinyMCE version in this release is 5.1.1-57.
The Textbox.io version in this release is 2.4.2.95.
This gave you four information:
The installation itself works. When enabled in config.js, you'll use TinyMCE instead of CKEditor in all Connections applications (Wikis, Blogs, ...)
The exact version numbers of TinyMCE = 5.1.1-57 (independent from Connection)
The Connections Editor version = 4.1.0.15 (HCL bundle of TinyMCE and Textbox.io editors)
The Textbox.io version = 2.4.2.95 (also independent from Connections, only relevant when using Textbox.io instead of TinyMCE)
The TinyMCE version we ship for connections isn't a customised build; our customisations are all done through public APIs and configuration options (including the premium plugins).
If you see 5.1.1-57, that should be an exact copy of the public 5.1.1 release available on our website. 57 is just an internal packaging build system number.
If you open the editor help dialog there should be version information there as well (but only the connections package version and current editor version, not both editor versions).
The help dialog also contains the version of the editor and the integration. This is true for both textbox.io and TinyMCE and the steps are roughly the same. I show images for TinyMCE below.
First open the "cog" menu and click on the "Help" entry:
Second select the "Version" tab to view the version:
I want to use the css linter "stylelint" on my VScode text editor.
I downloaded the plugin and install it, then I make the "css.validate": false. But i don't have any box that show me error on my CSS files. What can I do ?
If you're getting started with stylelint for the first time, there are two key steps to enable it in Visual Studio Code:
turn off Visual Studio Code's built-in CSS linter and turn on the stylelint extension
create a stylelint configuration object and turn on some rules
You can complete the first step by following the extension usage instructions, mainly changing your Visual Studio Code settings to:
{
"stylelint.enable": true,
"css.validate": false,
"scss.validate": false
}
And the second step by following the configuration documentation on the stylelint website. I believe the quickest means to get started is:
install the recommended config into your project using npm:
npm install --save-dev stylelint-config-recommended
Create a .stylelintrc file that extends the recommended config in the root of your project:
{ "extends": "stylelint-config-recommended" }
This config turns on just the possible error rules. It is a sensible config to start with and build upon. There are over 150 rules built-in to stylelint. You can choose to turn on and configure as many, or as few, as you like to meet your linting needs.
For anyone seeing this and trying to lint other file extensions; note that by default, the extension validates only CSS and PostCSS files.
In order to validate file extensions such as SCSS, you would need to explicitly state so in .vscode\settings.json:
{
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.enable": true,
"stylelint.validate": ["css", "scss"]
}
I am using tinymce 4.0.12 in my wicket project. I have added spellchecker plugin in my editor,
but when i click on spell checker icon it gives ERROR: GENERAL, and the console error i'm getting is:
POST
http://localhost:1100/project/js/tinymce/plugins/spellchecker/resources/wicket.contrib.tinymce.TinyMceBehavior/spellcheck_rpc 404
Note: I have added this code in my tinyMCE init function for spellchecker.
spellchecker_rpc_url :"resources/wicket.contrib.tinymce.TinyMceBehavior/spellcheck_rpc",
Thanks
TinyMCE uses a remote spellchecking API to do the spellchecking for you. It seems that it used the Google API for spellchecking which got discontinued. It could also be the case that you have to manually configure the spellchecking engine used.
http://www.tinymce.com/wiki.php/Plugin3x:spellchecker (This is for TinyMCE 3, but i guess it works similarly in TinyMCE 4)
I'm finding myself unable to add links ("a" tags) via the version of Products.TinyMCE in Plone 4.3b1. Switching to a non-visual editor and manually adding a link works fine, but using the chainlink icon in TinyMCE brings up an insert/edit popup window that doesn't appear to have anyplace to enter the destination address. There's a "search" text field, but entering text into it does not enable the "OK" button.
Here's a screenshot of what I am seeing:
Does anyone know if this is a known issue, or if I'm just completely missing how to enter links, or have any light to shed on this? Thanks.
UPDATE:
The problem seems to be that the popup's tabs are not un-hideing the relevant divs. When I use Firebug to switch div external_panel from class="hide" to class="show" the missing material appears; I also have to use Firebug to remove a disabled="disable" from the OK button in order to press it. A screenshot showing the segments is below. I've used the tgz file of the unified installer; is it possible that there is a variation between that installer's contents and the binary installer for the Mac?
The problem is showing up on a plain vanilla fresh install performed by
- untarring the 4.3b1 unified installer tgz file,
- running the command ./install.sh --target=/home/me/P4.3b1 from the installer's dir
- going to /home/me/P4.3b1/zinstance
- running the command bin/instance fg
- going in the browser to localhost:8080,
- creating a Plone instance and logging into it as admin
- going immediately to edit the front page of the site.
Version overview from site setup page is as follows:Version Overview
- Plone 4.3b1 (4302)
- CMF 2.2.7
- Zope 2.13.19
- Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3]
- PIL 1.7.7 (Pillow)
I'm going to say cross browser compatibility issue. It looks like this in Firefox and works as expected: