Details
-
Suggestion
-
Resolution: Won't Do
-
None
-
None
-
1
-
Description
NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.
From the highlight-panel.js file:
// Usable area for the plugin. #main-content was another candidate, but does not appear on all pages // We only support on main content var $wikiContent = $('.wiki-content').first();
Using an id like the developer mentioned would be a much more solid solution. We had a similar issue with the new inline comment functionality: https://jira.atlassian.com/browse/CONF-35750
They changed it to use $('#content .wiki-content').first() instead. Which is working for us. They also mentioned that they would talk to the core team about adding IDs to the main wiki-content area so every one can select on ids instead.
To make our theme(RefinedWiki) compatible with the highlight function we've added the following code:
// FIX: .wiki-content:first is hardcoded in the confluence-highlight-actions projects // We need to change $root to the correct wiki-content area. var originalComputeSearchTextObject = Confluence.HighlightAction.RangeHelper.computeSearchTextObject; Confluence.HighlightAction.RangeHelper.computeSearchTextObject = function ($root, selected) { // Check if the $root container is one of out custom sections // If yes, get the correct $mainContent object if ($root.hasClass('rw_custom_section') || $root.parent().hasClass('rw_custom_section')) return originalComputeSearchTextObject($mainContent, selected); else return originalComputeSearchTextObject($root, selected); }
Cheers,
Emil
Attachments
Issue Links
- relates to
-
CONFCLOUD-36611 Highlight actions uses $('.wiki-content').first() which makes it incompatible with custom themes
- Closed
-
CONFSERVER-35750 Inline comments compability issue with RefinedWiki OriginalTheme
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...