Revert "feat: add new template text for raw html editor" (#30843)

This reverts commit 95a13bff5d.
This commit is contained in:
connorhaugh
2022-08-10 15:17:20 -04:00
committed by GitHub
parent 58199ee670
commit 6b6935b8f9
2 changed files with 10 additions and 24 deletions

View File

@@ -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 .

View File

@@ -1,9 +0,0 @@
---
metadata:
display_name: Raw HTML
editor: raw
data: |
<p>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!</p>