We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to give id for body tag

How can i give id for body tag inside the RTE like

<body contenteditable="true" autocorrect="off" style="color:#5C5C5C" id="customeRTE">

Thank you.

6 Replies

NI Nitheesh April 15, 2016 06:56 AM UTC

I have added
iframeAttributes:{ id :"customId" }

Now it's working fine, thanks.


NI Nitheesh April 15, 2016 07:25 AM UTC

I have added one jQuery script for IntelliSense in side my RTE, but it's not working

$j('#customId').textcomplete([{             match: /#(\w*)$/,             search: function (term, callback) {                 callback($.map(elements, function (element) {                     return element.indexOf(term) === 0 ? element : null;                 }));             },             index: 1,             replace: function (element) {                 return [element + ' '' '];             }         }]);

And testing purpose added one div like this

<div id="customId" contenteditable="true" autocorrect="off" style="colorrgb(92, 92, 92);">     <br> </div>

and in here that
IntelliSense was working fine


DR Dhinesh Ravi Syncfusion Team April 18, 2016 07:12 AM UTC

Hi Nitheesh,

Thank you for contacting Syncfusion Support.

We can provide customized IntelliSense for the RTE control using prototype of the control. We need to define the function within the prototype using the following code example.

[html]

<script>

        ej.RTE.prototype.custom = function () { console.log("Custom Function"); return true }
    </script>


Note: The above mentioned script needs to be referred after ej.web.all.min.js is referred.

And this function can be called, whenever it is necessary. IntelliSense will be available, with the instance of the control.

We have also created simple sample for the requirement. Refer to the sample in the following attachment.

http://jsplayground.syncfusion.com/tcurnmx0

If this is not the requirement as expected, please share us more details or sample regarding the requirement. So that we can analyze and help you with the prompt solution.


Regards,
Dhinesh R


NI Nitheesh April 18, 2016 07:42 AM UTC

Hi Dhinesh,

Thanks for your replay

I have already done one IntelliSense and that was working fine with text box, I also need that IntelliSense in my RTE. That RTE was not supporting any outside jQuery function.



For example in
ejGrid we can call outside script functions through

actionComplete: "complete"

function complete(args) {
.....
}

How can i call that jQuery function in side the RTE?

Thanks



NI Nitheesh April 19, 2016 05:01 AM UTC

Hi Dhinesh,

Any solution?


PO Prince Oliver Syncfusion Team April 19, 2016 10:59 AM UTC

Hi Nitheesh,

We can call external functions on triggering events.

Have a look at the list of events available for the RTE:
http://help.syncfusion.com/js/api/ejrte#events

Call that jQuery function inside the RTE with help of any events which suits your application.

Please let us know if you require any further assistance on this.

Regards,
Prince

Loader.
Live Chat Icon For mobile
Up arrow icon