Hey I am looking to support bootstraps table styling during edit. The only task I need to be abble to achieve is attaching the class name "table" when one is created. Is thre any way to achieve this?
Wed, 07/23/2014 - 02:09
#1
I have been trying to use the
I have been trying to use the following to transform the data but no luck so far.
CKEDITOR.replace(myElement, {
...
on: {
loaded: function (e) {
var rules = {
elements: {
table: function (element) {
// Add bootstrap table class to ckeditor tables
$(element).addClass('table');
}
}
};
e.editor.dataProcessor.dataFilter.addRules(rules);
e.editor.dataProcessor.htmlFilter.addRules(rules);
}
}
});
I'm looking for exactly the
I'm looking for exactly the same thing (right down to <table class="table">). Are you working with WET4 templates? I'll give this a shot and post the solution here if I find it. Likewise please share your solution if you find it.
Hi, I'm not using WT4
Hi, I'm not using WT4 templates (not even certain what that is).
I ended up with a workaround, its not pretty but the following managed it. Hope it helps.
Thank you! I also working
Thank you! I also working with bootstrap table. This post really saves my time.
Thank you Fungus, that helped
Thank you Fungus, that helped. For some reason the CKEDITOR.replace() part (the part that adds class="table") did not work for me (maybe I'm running an older version of CKEditor), so I found a different way. Below is the complete alternative code:
The following helped me achieve this:
Thank you!
Thank you!
Buy Dog Food and Accessories Online in India