Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1038

Support custom id/class on BODY tag of CKEditor used for Content Blocks

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2.0-B3
    • Fix Version/s: 5.2.0-RC1
    • Component/s: CMS
    • Labels:
      None
    • Additional information:
      Hide

      As a result tag <inp2:st_ContentBlock will have these additional parameters:
      1. body_class - class of BODY tag in CKEditor
      2. body_id - id of BODY tag in CKEditor

      Additionally there will be ability to specify "extraCss" parameter in CKEditor configuration file (thanks to Drupal modifications of CKEditor at [url]http://drupal.org/project/ckeditor[/url]), that allows any custom CKEditor-wide CSS to be applied along with theme-specific external CSS file.

      Show
      As a result tag <inp2:st_ContentBlock will have these additional parameters: 1. body_class - class of BODY tag in CKEditor 2. body_id - id of BODY tag in CKEditor Additionally there will be ability to specify "extraCss" parameter in CKEditor configuration file (thanks to Drupal modifications of CKEditor at [url] http://drupal.org/project/ckeditor[/url]), that allows any custom CKEditor-wide CSS to be applied along with theme-specific external CSS file.
    • Change Log Message:
      Adds ability to specify CKEditor BODY tag extra css class and id
    • Story Points:
      2
    • External issue ID:
      1268
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      On the one hand, it is convenient when the HTML-code, is included in the Content Block as simple as possible (do not have a lot of styles, formatting) - then the user is easier to avoid mistakes in the elements styling. On the other hand, it is desirable that when editing a Content Block looks like on the page, that is, that its elements have the same style as on the page.

      In order to satisfy both above requirements, I suggest add to ContentBlock tag optional "class" parameter. If this option is specified, then in the CMS-editor window, the value of this parameter is added to the "class" attribute of <body> tag. For example, if class is not specified, <body> tag is the way it is now - <body contenteditable="true" spellcheck="false" class="cke_show_borders">.
      If in the template is written <inp2:st_ContentBlock num="1" class="big-font"/>, then the "body"-tag will be the - <body contenteditable="true" spellcheck="false" class="cke_show_borders big-font">

      That is, we should not include in the CMS-content unit covering element to apply all related styles in the CMS editor window. And the content of CMS block may contain no "class" attributes, but have adequate and powerful styling applied.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                erik Erik Snarski [Intechnic]
                Developer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: