TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
RAGHUNATH
1.7k
63
49.9k
how to edit custom template of widget plugin in CkEditor
Apr 23 2014 2:44 AM
I need to add a widget plugin to my editor. and in that template i have created table template,but the problem is i can able add a table but cells in that table cannot edited. i think there is problem on editable..
------------------------------------------------------------------------
can anybody help me
-------------------
CKEDITOR.plugins.add('simplebox', {
requires: 'widget',
icons: 'simplebox',
init: function (editor) {
editor.widgets.add('simplebox', {
button: 'Create a simple box',
template:
'<table class="simplebox" style="width:350px; float:left" cellspacing="0"
cellpadding="0" border="1">' +
'<tr class="simplebox-content" >' +
'<td class="simplebox-content" > </td>' +
'<td class="simplebox-content" > </td>' +
'<td class="simplebox-content" > </td>' +
'</tr>' +
'<tr class="simplebox-content" >' +
'<td class="simplebox-content" > </td>' +
'<td class="simplebox-content" > </td>' +
'<td class="simplebox-content" > </td>' +
'</tr>' +
'<tr class="simplebox-content">' +
'<td class="simplebox-content" > </td>' +
'<td class="simplebox-content" > </td>' +
'<td class="simplebox-content" > </td>' +
'</tr>' +
'</table>'+
'<br/>',
editables: {
title: {
selector: '.simplebox-title',
allowedContent: 'br strong em'
},
content: {
selector: 'td.simplebox-content',
allowedContent: 'p br ul ol li strong em'
}
},
allowedContent:
'table(!simplebox);tr(!simplebox-content);td(!simplebox-content)',
requiredContent: 'table(simplebox)',
upcast: function (element) {
return element.name == 'table' && element.hasClass('simplebox');
}
});
}
});
Reply
Answers (
0
)
validation through HTML or Javascript or PHP ?
Hide Address Bar in popup window