From 6b6935b8f99853de31f7256c291d33c1a731464e Mon Sep 17 00:00:00 2001 From: connorhaugh <49422820+connorhaugh@users.noreply.github.com> Date: Wed, 10 Aug 2022 15:17:20 -0400 Subject: [PATCH] Revert "feat: add new template text for raw html editor" (#30843) This reverts commit 95a13bff5dabde4129ce57afb1913c91cd3b19ba. --- .../contentstore/views/component.py | 25 ++++++++----------- xmodule/templates/html/react_raw.yaml | 9 ------- 2 files changed, 10 insertions(+), 24 deletions(-) delete mode 100644 xmodule/templates/html/react_raw.yaml diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 1858318f3e..c8173c7228 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -20,7 +20,6 @@ from xblock.exceptions import NoSuchHandlerError from xblock.plugin import PluginMissingError from xblock.runtime import Mixologist -from cms.djangoapps.contentstore.toggles import use_new_text_editor from common.djangoapps.edxmako.shortcuts import render_to_response from common.djangoapps.student.auth import has_course_author_access from common.djangoapps.xblock_django.api import authorable_xblocks, disabled_xblocks @@ -182,6 +181,7 @@ def container_handler(request, usage_key_string): if child.location == unit.location: break index += 1 + return render_to_response('container.html', { 'language_code': request.LANGUAGE_CODE, 'context_course': course, # Needed only for display of menus at top of page. @@ -339,21 +339,16 @@ def get_component_templates(courselike, library=False): # lint-amnesty, pylint: tab = 'advanced' hinted = template.get('hinted', False) - if use_new_text_editor() and template_id == 'raw.yaml': - continue - elif not use_new_text_editor() and template_id == 'react-raw.yaml': - continue - else: - templates_for_category.append( - create_template_dict( - _(template['metadata'].get('display_name')), # lint-amnesty, pylint: disable=translation-of-non-string - category, - support_level_with_template, - template_id, - tab, - hinted, - ) + templates_for_category.append( + create_template_dict( + _(template['metadata'].get('display_name')), # lint-amnesty, pylint: disable=translation-of-non-string + category, + support_level_with_template, + template_id, + tab, + hinted, ) + ) # Add any advanced problem types. Note that these are different xblocks being stored as Advanced Problems, # currently not supported in libraries . diff --git a/xmodule/templates/html/react_raw.yaml b/xmodule/templates/html/react_raw.yaml deleted file mode 100644 index e651993a3c..0000000000 --- a/xmodule/templates/html/react_raw.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -metadata: - display_name: Raw HTML - editor: raw -data: | -
This is a Raw HTML editor that saves your HTML exactly as you enter it. - This means that even malformed HTML tags will be saved and rendered as-is. - There is no way to switch between Raw and Visual Text editor types, so be - sure this is the editor you should be using!