Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ 2014

[RICHTEXT] Prevent richtext to remove id attribute in a DIV

Issue: Id attribute of Div tag is stripped in Rich text component. How do we handled this. Any help regarding this appreciated? Solution 1 (before CQ5.6): Setting property idAttribMode (on htmlRules -> serializer -> config) to "keep" should prevent removing the id attributes Make: 1) Under /apps/<yourApplication>/<yourComponent>/dialog/items create htmlRules/serializer/config nodes of type nt:unstructured. So, will end up with /apps/<yourApplication>/<yourComponent>/dialog/items/htmlRules/serializer/config. 2) Under "config" node create idAttribMode property and set it to "keep". It will be like: <htmlRules jcr:primaryType="nt:unstructured"> . . . <serializer jcr:primaryType="nt:unstructured"> <config jcr:primaryType="nt:unstructured" idAttribMode="keep"/> </serializer> . . . </htmlRules> Solution 2 (from

[COMBO BOX/SELECTION/DROPDOWN LIST] CQ5 multiselect combobox

Issue: Create a multiselect combobox in CQ. Layout: Widget file (multiselectlist.js): if ('function' !== typeof RegExp.escape) {    RegExp.escape = function(s) {        if ('string' !== typeof s) {            return s;        }        return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');    }; } CQ.Ext.form.Multiselect = CQ.Ext.extend(CQ.Ext.form.ComboBox, {    checkField: 'checked',    separator: ',',    multiSelect: true,    mode: "remote",    isSelectAll: false,    constructor: function(config) {        config = config || {};        var nameTextField = config.name;        var that = this;        config.store = new CQ.Ext.data.Store({            //autoLoad: true,            proxy: new CQ.Ext.data.HttpProxy({                url: config.options,                method: 'GET'            }),            reader: new CQ.Ext.data.JsonReader({                root: 'root',