Bug 26431 - Use split button to offer choice of WYSIWYG or code editor for news
Summary: Use split button to offer choice of WYSIWYG or code editor for news
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 22660
Blocks:
  Show dependency treegraph
 
Reported: 2020-09-10 19:05 UTC by Owen Leonard
Modified: 2021-06-14 21:31 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.05


Attachments
Bug 26431: Use split button to offer choice of WYSIWYG or code editor for news (5.74 KB, patch)
2020-09-10 19:20 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26431: Use split button to offer choice of WYSIWYG or code editor for news (5.79 KB, patch)
2020-09-11 14:58 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 26431: Update NewsToolEditor system preference description (1.25 KB, patch)
2020-09-12 17:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26431: Use split button to offer choice of WYSIWYG or code editor for news (5.85 KB, patch)
2020-09-12 17:26 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 26431: Update NewsToolEditor system preference description (1.25 KB, patch)
2020-09-12 17:26 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-09-10 19:05:49 UTC
Now that the news editor can use either TinyMCE or CodeMirror it should be possible to offer the option for the user to make that choice if they want to. I propose to change the news "Edit" button so that it defaults to the editor defined in the NewsToolEditor preference but has a menu with the choice of the other editor.
Comment 1 Owen Leonard 2020-09-10 19:20:53 UTC
Created attachment 109865 [details] [review]
Bug 26431: Use split button to offer choice of WYSIWYG or code editor for news

This patch modifies the news interface so that the user is offered a
choice of editing news items using the default editor as defined by the
NewsToolEditor system preference or the non-default one.

To test, apply the patch and go to Tools -> News.

- In the list of news items you should see an "Edit" split button in
  each row.
- Clicking the "Edit" part of the button should open the edit view with
  the correct editor as defined by the NewsToolEditor preference.
- Clicking the menu arrow on the button should offer the other editing
  method:
 - If NewsToolEditor is set to "WYSIWYG," the menu should offer "text
   editor."
 - If NewsToolEditor is set to "text editor," the menu should offer
   "WYSIWYG editor."
- Test the button with the NewsToolEditor preference set to both options
  and confirm that the button and menu work correctly.
Comment 2 David Cook 2020-09-11 00:39:05 UTC
Sounds like a great idea! Will try to come back to this one...
Comment 3 Lucas Gass 2020-09-11 14:58:03 UTC
Created attachment 109950 [details] [review]
Bug 26431: Use split button to offer choice of WYSIWYG or code editor for news

This patch modifies the news interface so that the user is offered a
choice of editing news items using the default editor as defined by the
NewsToolEditor system preference or the non-default one.

To test, apply the patch and go to Tools -> News.

- In the list of news items you should see an "Edit" split button in
  each row.
- Clicking the "Edit" part of the button should open the edit view with
  the correct editor as defined by the NewsToolEditor preference.
- Clicking the menu arrow on the button should offer the other editing
  method:
 - If NewsToolEditor is set to "WYSIWYG," the menu should offer "text
   editor."
 - If NewsToolEditor is set to "text editor," the menu should offer
   "WYSIWYG editor."
- Test the button with the NewsToolEditor preference set to both options
  and confirm that the button and menu work correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Katrin Fischer 2020-09-12 17:25:44 UTC
Created attachment 109980 [details] [review]
Bug 26431: Update NewsToolEditor system preference description

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2020-09-12 17:26:22 UTC
Created attachment 109981 [details] [review]
Bug 26431: Use split button to offer choice of WYSIWYG or code editor for news

This patch modifies the news interface so that the user is offered a
choice of editing news items using the default editor as defined by the
NewsToolEditor system preference or the non-default one.

To test, apply the patch and go to Tools -> News.

- In the list of news items you should see an "Edit" split button in
  each row.
- Clicking the "Edit" part of the button should open the edit view with
  the correct editor as defined by the NewsToolEditor preference.
- Clicking the menu arrow on the button should offer the other editing
  method:
 - If NewsToolEditor is set to "WYSIWYG," the menu should offer "text
   editor."
 - If NewsToolEditor is set to "text editor," the menu should offer
   "WYSIWYG editor."
- Test the button with the NewsToolEditor preference set to both options
  and confirm that the button and menu work correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2020-09-12 17:26:27 UTC
Created attachment 109982 [details] [review]
Bug 26431: Update NewsToolEditor system preference description

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2020-09-12 17:27:24 UTC
Love this! 

Only one thing: I wondered if WYSIWYG is a term that is well known. Maybe we should make the choice HTML editor vs. Visual editor or similar?
Comment 8 David Cook 2020-09-13 23:23:28 UTC
(In reply to Katrin Fischer from comment #7)
> Love this! 
> 
> Only one thing: I wondered if WYSIWYG is a term that is well known. Maybe we
> should make the choice HTML editor vs. Visual editor or similar?

Mmm that's a really good point. While I know that I've used WYSIWYG in Koha in the past, I think it is an outdated term these days. I notice references to "rich-text editor" but I don't think people would get that either. So maybe "Visual editor"?
Comment 9 Jonathan Druart 2020-09-29 12:32:16 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 10 Lucas Gass 2020-10-20 17:17:26 UTC
If you work with the HTML system preferences, which have moved to the News, this is very very handy.

Choosing to backport to 20.05.x for 20.05.05
Comment 11 Aleisha Amohia 2020-10-27 04:29:09 UTC
enhancement, not backported to 19.11.x