MIR-1417 replace ckeditor with tinymce#1100
Conversation
|
please port back to 2023.06.x |
8d78cbc to
b1fef03
Compare
sebhofmann
left a comment
There was a problem hiding this comment.
Looks good. But the Tests are broken:
Expected condition failed: waiting for presence of any elements located by By.xpath: .//div[contains(@id,'mods:abstract[1]') and contains(@class, 'cke')]//iframe (tried for 30
|
Any idea how to effectively replace Example with CKEditor and a character count limit of 2000: |
I'm not really familiar on how the xeditor validates this. But there is a plugin for tinymce: https://www.tiny.cloud/docs/tinymce/latest/wordcount/ which is also activated by default. So maybe you can use that? |
|
The only thing xeditor validates against is the given pattern, and it is done server-side after form submission. See xeditor documentation: A possible solution to force validation to be same on client and server side is to use a custom java class that implements it in the server. That class could read the properties and test the input. |
|
Yes, the idea is to have the same validation on client side and on server side, such that users have a visual feedback while entering (or after pasting) some text; but the actual validation needs to be done on the server side. Users should be able to temporarily enter (or paste) a text, that exceeds the limits. The configuration given above achieves this effectively with the current editor. I've already looked at the plugin you mentioned, but it appears to be simply informative. It has no concept of a limit. Displaying the character count might be possible (https://www.tiny.cloud/blog/set-character-count-limit/#h_72792831019251667464431803). A custom plugin might be able to change the text color of the character count to red, if a given limit is exceeded. Creating a custom validator implementation in Java might actually be an easier approach than trying to force a enforce a limit otherwise. Good idea. |
0a610f5 to
fe89d63
Compare
|
Can we merge this PR? |
I'll have to look into how I can coordinate client-side and server-side validation, but that shouldn't impede merging this PR. Since this is a drastic change, it should be done in |
|
I was asked to do this for 2023, so I guess not.
|
* 2023.06.x: MIR-1362 fix bug for secondary search form if Solr RequestHandler is not /find (#1133) MIR-1437 Display language next to tab title (#1139) MIR-1441 Display proper message to user when history is currently not avilable (#1138) MIR-1417 replace ckeditor with tinymce (#1100) MIR-1429 enhance podcast RSS feed (#1112) MIR-1429 bugfix: do not require thumbnail for item remove old code after conflict resolution and merge MIR-1362 revert to test of the dropdown element MIR-1362 revert to modified bootstrap dropdown element instead of select box in secondary search MIR-1362 add wrapper with css classes to the select box MIR-1362 fix initialCondQuery hidden input field value MIR-1362 change for the hidden parameter initialCondQuery MIR-1362 clean up unused code fix form for the case with solr/select MIR-1362 fix the query with the servlets/solr/select path MIR-1362 fix empty request in the the main search MIR-1362 fix empty fq and queries with more than one word MIR-1362 fix empty value in the input query field, fix unit test MIR-1362 change and fix the second search with filter query etc MIR-1362 fix SOLR-request for all fields MIR-1362 fix SOLR query filter
* 2024.06.x: MIR-1362 fix bug for secondary search form if Solr RequestHandler is not /find (#1133) MIR-1437 Display language next to tab title (#1139) MIR-1441 Display proper message to user when history is currently not avilable (#1138) MIR-1417 replace ckeditor with tinymce (#1100) MIR-1429 enhance podcast RSS feed (#1112) MIR-1429 bugfix: do not require thumbnail for item remove old code after conflict resolution and merge MIR-1362 revert to test of the dropdown element MIR-1362 revert to modified bootstrap dropdown element instead of select box in secondary search MIR-1362 add wrapper with css classes to the select box MIR-1362 fix initialCondQuery hidden input field value MIR-1362 change for the hidden parameter initialCondQuery MIR-1362 clean up unused code fix form for the case with solr/select MIR-1362 fix the query with the servlets/solr/select path MIR-1362 fix empty request in the the main search MIR-1362 fix empty fq and queries with more than one word MIR-1362 fix empty value in the input query field, fix unit test MIR-1362 change and fix the second search with filter query etc MIR-1362 fix SOLR-request for all fields MIR-1362 fix SOLR query filter
Link to jira.