Ease of editing Content Blocks

7 views
Skip to first unread message

er...@intechnic.lv

unread,
Apr 25, 2012, 8:20:21 AM4/25/12
to In-Portal Development Team
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.

Alexander Obuhovich

unread,
Apr 25, 2012, 8:30:58 AM4/25/12
to in-por...@googlegroups.com
Sounds interesting Erik. Do you have any patch that does that?

Dmitry A.

unread,
Apr 25, 2012, 11:06:13 AM4/25/12
to in-por...@googlegroups.com
Great idea Erik!

We really need to try something like this - were you able to test this on some project/code?

DA

Alexander Obuhovich

unread,
Apr 26, 2012, 11:31:08 AM4/26/12
to in-por...@googlegroups.com

Ready for testing.


Added parameters to <inp2:st_ContentBlock .../> tag:
  • body_class
  • body_id
  • bgcolor

customize_ckeditor_for_every_contentblock.patch

Dmitry A.

unread,
Apr 28, 2012, 11:37:18 AM4/28/12
to in-por...@googlegroups.com
Patch works!

Very interesting and needed patch - great work!

DA
Reply all
Reply to author
Forward
0 new messages