Revert "fix(HTML Editor): extraction of images" (#32129)

This commit is contained in:
Ankush Menat 2025-04-15 22:21:40 +05:30 committed by GitHub
parent dafc73836f
commit 56e2a9ad2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -1371,11 +1371,11 @@ class BaseDocument:
def cast(self, value, df):
return cast_fieldtype(df.fieldtype, value, show_warning=False)
def _extract_images_from_editor(self):
def _extract_images_from_text_editor(self):
from frappe.core.doctype.file.utils import extract_images_from_doc
if self.doctype != "DocType":
for df in self.meta.get("fields", {"fieldtype": ("in", ("Text Editor", "HTML Editor"))}):
for df in self.meta.get("fields", {"fieldtype": ("=", "Text Editor")}):
extract_images_from_doc(self, df.fieldname)

View file

@ -740,7 +740,7 @@ class Document(BaseDocument, DocRef):
self._fix_rating_value()
self._validate_code_fields()
self._sync_autoname_field()
self._extract_images_from_editor()
self._extract_images_from_text_editor()
self._sanitize_content()
self._save_passwords()
self.validate_workflow()
@ -753,7 +753,7 @@ class Document(BaseDocument, DocRef):
d._fix_rating_value()
d._validate_code_fields()
d._sync_autoname_field()
d._extract_images_from_editor()
d._extract_images_from_text_editor()
d._sanitize_content()
d._save_passwords()
if self.is_new():