Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. (function() {
  2. CKEDITOR.plugins.add("mediaembed", {
  3. init: function(a) {
  4. CKEDITOR.dialog.add("MediaEmbedDialog", function(a) {
  5. return {
  6. title: "Embed Media",
  7. minWidth: 550,
  8. minHeight: 200,
  9. contents: [{
  10. id: "iframe",
  11. expand: !0,
  12. elements: [{
  13. id: "embedArea",
  14. type: "textarea",
  15. label: "Paste Embed Code Here",
  16. autofocus: "autofocus",
  17. setup: function() {},
  18. commit: function() {}
  19. }]
  20. }],
  21. onOk: function() {
  22. var b = a.document.createElement("div");
  23. b.setHtml(this.getContentElement("iframe", "embedArea").getValue());
  24. b.className = "video-container"; //My addition
  25. a.insertElement(b)
  26. }
  27. }
  28. });
  29. a.addCommand("MediaEmbed",
  30. new CKEDITOR.dialogCommand("MediaEmbedDialog", {
  31. allowedContent: "iframe[*]"
  32. }));
  33. a.ui.addButton("MediaEmbed", {
  34. label: "Embed Media",
  35. command: "MediaEmbed",
  36. toolbar: "mediaembed"
  37. })
  38. }
  39. })
  40. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement