Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix ckeditor wrapper

Oliver Günthera54b1d797347
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 341888e7390..2c3e21e4d6e 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -202,7 +202,7 @@ module ApplicationHelper
else
datetime = time.acts_like?(:time) ? time.xmlschema : time.iso8601
content_tag(:time, text, datetime:,
- title: format_time(time), class: "timestamp")
+ title: format_time(time), class: "timestamp")
end
end
@@ -260,11 +260,12 @@ module ApplicationHelper
end
def lang_options_for_select(blank = true)
- auto = if blank && (valid_languages - all_languages) == (all_languages - valid_languages)
- [["(auto)", ""]]
- else
- []
- end
+ auto =
+ if blank && (valid_languages - all_languages) == (all_languages - valid_languages)
+ [["(auto)", ""]]
+ else
+ []
+ end
mapped_languages = valid_languages.map { |lang| translate_language(lang) }
diff --git a/frontend/src/app/core/setup/globals/global-listeners/settings.ts b/frontend/src/app/core/setup/globals/global-listeners/settings.ts
index 9392ea046b9..181d4f3a321 100644
--- a/frontend/src/app/core/setup/globals/global-listeners/settings.ts
+++ b/frontend/src/app/core/setup/globals/global-listeners/settings.ts
@@ -33,7 +33,7 @@ export function listenToSettingChanges() {
const settingName = id.replace('lang-for-', '');
const newLang = self.val();
const textArea = jQuery(`#settings-${settingName}`);
- const editor = textArea.siblings('ckeditor-augmented-textarea').data('editor');
+ const editor = textArea.siblings('opce-ckeditor-augmented-textarea').data('editor');
return {
id, settingName, newLang, textArea, editor,
diff --git a/frontend/src/global_styles/content/editor/_ckeditor.sass b/frontend/src/global_styles/content/editor/_ckeditor.sass
index 71cde283a87..4994efe9752 100644
--- a/frontend/src/global_styles/content/editor/_ckeditor.sass
+++ b/frontend/src/global_styles/content/editor/_ckeditor.sass
@@ -10,7 +10,7 @@
@include op-uc-table-header-styles
// Wrapper for full text element
-ckeditor-augmented-textarea .op-ckeditor--wrapper
+opce-ckeditor-augmented-textarea .op-ckeditor--wrapper
margin-bottom: 2rem
// Ensure same border and min-height for preview
@@ -128,5 +128,3 @@ ckeditor-augmented-textarea .op-ckeditor--wrapper
.ck-icon_inherit-color
path
fill: var(--body-font-color) !important
-
-
diff --git a/lib/open_project/text_formatting/formats/markdown/helper.rb b/lib/open_project/text_formatting/formats/markdown/helper.rb
index efceaa5134a..90cee1c84ad 100644
--- a/lib/open_project/text_formatting/formats/markdown/helper.rb
+++ b/lib/open_project/text_formatting/formats/markdown/helper.rb
@@ -49,7 +49,7 @@ module OpenProject::TextFormatting::Formats
# Pass an optional resource to the CKEditor instance
resource = context.fetch(:resource, {})
- helpers.angular_component_tag "ckeditor-augmented-textarea",
+ helpers.angular_component_tag "opce-ckeditor-augmented-textarea",
inputs: {
textareaSelector: "##{field_id}",
editorType: context[:editor_type] || "full",
diff --git a/spec/lib/tabular_form_builder_spec.rb b/spec/lib/tabular_form_builder_spec.rb
index 4f2eb6931f2..f976d24705b 100644
--- a/spec/lib/tabular_form_builder_spec.rb
+++ b/spec/lib/tabular_form_builder_spec.rb
@@ -210,7 +210,7 @@ JJ Abrams</textarea>
context "an id is missing" do
it "outputs the wysiwyg wrapper" do
expect(output).to have_css "textarea"
- expect(output).to have_css "ckeditor-augmented-textarea"
+ expect(output).to have_css "opce-ckeditor-augmented-textarea"
end
end
@@ -219,7 +219,7 @@ JJ Abrams</textarea>
it "outputs the wysiwyg wrapper" do
expect(output).to have_css "textarea"
- expect(output).to have_css "ckeditor-augmented-textarea"
+ expect(output).to have_css "opce-ckeditor-augmented-textarea"
end
end
end
diff --git a/spec/support/components/wysiwyg/wysiwyg_editor.rb b/spec/support/components/wysiwyg/wysiwyg_editor.rb
index 1000027e86f..7b20b51da4b 100644
--- a/spec/support/components/wysiwyg/wysiwyg_editor.rb
+++ b/spec/support/components/wysiwyg/wysiwyg_editor.rb
@@ -6,7 +6,7 @@ module Components
attr_reader :context_selector, :attachments, :attachments_list
- def initialize(context = "#content", attachment_list_selector = "ckeditor-augmented-textarea")
+ def initialize(context = "#content", attachment_list_selector = "opce-ckeditor-augmented-textarea")
@context_selector = context
@attachments = ::Components::Attachments.new
@attachments_list = ::Components::AttachmentsList.new("#{context} #{attachment_list_selector}")
diff --git a/spec/support/pages/admin/system_settings/general.rb b/spec/support/pages/admin/system_settings/general.rb
index 9e647e062e0..011f047ae9c 100644
--- a/spec/support/pages/admin/system_settings/general.rb
+++ b/spec/support/pages/admin/system_settings/general.rb
@@ -39,7 +39,7 @@ module Pages::Admin::SystemSettings
end
def welcome_text_selector
- 'ckeditor-augmented-textarea[data-textarea-selector="\"#settings_welcome_text\""]'
+ 'opce-ckeditor-augmented-textarea[data-textarea-selector="\"#settings_welcome_text\""]'
end
end
end