MDL-78613 TinyMCE: Add source code formatting and styling

Add code formatting (indenting) as well as code style (tag color)
via a TinyMC plugin. To make it easier to make code edits when
viewing the editor content in source code view.
This commit is contained in:
Matt Porritt
2023-08-03 13:43:40 +10:00
parent a1d5d1b2f7
commit 07e2b61128
33 changed files with 36828 additions and 3 deletions
@@ -0,0 +1,24 @@
@editor @editor_tiny @tiny_html @javascript
Feature: Edit HTML in TinyMCE
To write rich text - I need to be able to easily edit the HTML.
Scenario: View HTML in TinyMCE source code view
Given I log in as "admin"
When I open my profile in edit mode
And I set the field "Description" to "This is my draft"
And I click on the "View > Source code" menu item for the "Description" TinyMCE editor
And I should see "Source code"
Then I should see "<p>This is my draft</p>" source code for the "Description" TinyMCE editor
Scenario: View multiline HTML with indenting in TinyMCE source code view
Given I log in as "admin"
When I open my profile in edit mode
And I set the field "Description" to "<div><p>This is my draft</p></div>"
And I click on the "View > Source code" menu item for the "Description" TinyMCE editor
And I should see "Source code"
Then I should see this multiline source code for the "Description" TinyMCE editor:
"""
<div>
<p>This is my draft</p>
</div>
"""