You are here

bbcode.bueditor.txt in BUEditor 7

Same filename and directory in other branches
  1. 6.2 import/bbcode.bueditor.txt
array (
  'name' => 'BBCode',
  'pages' => 'node/*
comment/*',
  'excludes' => 'edit-log
edit-menu-description',
  'iconpath' => '%BUEDITOR/icons',
  'spriteon' => '1',
  'buttons' => 
  array (
    0 => 
    array (
      'title' => 'Insert/edit image',
      'content' => 'js:
var S = E.getSelection();
var M = S.match(new RegExp(\'^\\\\[img(?:=(\\\\d+)x(\\\\d+))?](.+)\\\\[/img]$\')) || [\'\', \'\', \'\', \'\'];
var form = [
 {name: \'src\', title: \'Image URL\', value: M[3], suffix: E.imce.button(\'attr_src\'), required: true},
 {name: \'width\', title: \'Width x Height\', value: M[1], suffix: \' x \', attributes: {size: 3}, getnext: true},
 {name: \'height\', value: M[2], attributes: {size: 3}}
];
var opt = {title: \'Insert/edit image\'};
opt.submit = function(tag, form) {
  var el = form.elements;
  var src = el[\'attr_src\'].value;
  var w = el[\'attr_width\'].value;
  var h = el[\'attr_height\'].value;
  E.replaceSelection(\'[img\'+ (w*1 ? (\'=\'+ w +\'x\'+ h) : \'\') +\']\'+ src +\'[/img]\');
};
E.tagDialog(\'img\', form, opt);',
      'icon' => 'image.png',
      'accesskey' => 'M',
      'weight' => '0',
    ),
    1 => 
    array (
      'title' => 'Insert/edit link',
      'content' => 'js:
var S = E.getSelection();
var M = S.match(new RegExp(\'^\\\\[url(?:=([^\\\\]]*))?]((?:.|[\\r\\n])*)\\\\[/url]$\')) || [\'\', \'\', \'\'];
var form = [
 {name: \'href\', title: \'URL\', value: M[1] || M[2], suffix: E.imce.button(\'attr_href\'), required: true},
 {name: \'text\', value: M[1] ? M[2] : (M[0] ? \'\' : S)}
];
var opt = {title: \'Insert/edit link\'};
opt.submit = function(tag, form) {
  var el = form.elements;
  var url = el[\'attr_href\'].value;
  var txt = el[\'attr_text\'].value;
  E.replaceSelection(\'[url\'+ (txt ? (\'=\'+ url) : \'\') +\']\'+ (txt || url) +\'[/url]\');
};
E.tagDialog(\'a\', form, opt);',
      'icon' => 'link.png',
      'accesskey' => 'L',
      'weight' => '1',
    ),
    2 => 
    array (
      'title' => 'tpl:dot',
      'content' => '',
      'icon' => 'dot.png',
      'accesskey' => '',
      'weight' => '2',
    ),
    3 => 
    array (
      'title' => 'Bold',
      'content' => '[b]%TEXT%[/b]',
      'icon' => 'bold.png',
      'accesskey' => 'B',
      'weight' => '3',
    ),
    4 => 
    array (
      'title' => 'Italic',
      'content' => '[i]%TEXT%[/i]',
      'icon' => 'italic.png',
      'accesskey' => 'I',
      'weight' => '4',
    ),
    5 => 
    array (
      'title' => 'Underline',
      'content' => '[u]%TEXT%[/u]',
      'icon' => 'underline.png',
      'accesskey' => 'U',
      'weight' => '5',
    ),
    6 => 
    array (
      'title' => 'Strikethrough',
      'content' => '[s]%TEXT%[/s]',
      'icon' => 'strike.png',
      'accesskey' => 'S',
      'weight' => '6',
    ),
    7 => 
    array (
      'title' => 'tpl:dot',
      'content' => '',
      'icon' => 'dot.png',
      'accesskey' => '',
      'weight' => '7',
    ),
    8 => 
    array (
      'title' => 'Ordered list. Converts selected lines to a numbered list.',
      'content' => 'js: E.wrapLines(\'[list=1]\\n\', \'  [*]\', \'\', \'\\n[/list]\');',
      'icon' => 'ol.png',
      'accesskey' => 'O',
      'weight' => '8',
    ),
    9 => 
    array (
      'title' => 'Unordered list. Converts selected lines to a bulleted list.',
      'content' => 'js: E.wrapLines(\'[list]\\n\', \'  [*]\', \'\', \'\\n[/list]\');',
      'icon' => 'ul.png',
      'accesskey' => 'N',
      'weight' => '9',
    ),
    10 => 
    array (
      'title' => 'tpl:dot',
      'content' => '',
      'icon' => 'dot.png',
      'accesskey' => '',
      'weight' => '10',
    ),
    11 => 
    array (
      'title' => 'Headings',
      'content' => 'js:
var tags = [[\'h1\', \'Heading1\'], [\'h2\', \'Heading2\'], [\'h3\', \'Heading3\'], [\'h4\', \'Heading4\'], [\'h5\', \'Heading5\'], [\'h6\', \'Heading6\']];
E.tagChooser(tags);
$(\'a.choice-link\', E.quickPop).unbind(\'click\').each(function(i, a) {
  $(a).click(function() {
    E.tagSelection(\'[\'+ tags[i][0] +\']\', \'[/\'+ tags[i][0] +\']\').focus();
    return false;
  });
});',
      'icon' => 'headers.png',
      'accesskey' => 'H',
      'weight' => '11',
    ),
    12 => 
    array (
      'title' => 'Quote',
      'content' => '[quote]%TEXT%[/quote]',
      'icon' => 'quote.png',
      'accesskey' => 'Q',
      'weight' => '12',
    ),
    13 => 
    array (
      'title' => 'Code',
      'content' => '[code]%TEXT%[/code]',
      'icon' => 'code.png',
      'accesskey' => 'D',
      'weight' => '13',
    ),
    14 => 
    array (
      'title' => 'tpl:dot',
      'content' => '',
      'icon' => 'dot.png',
      'accesskey' => '',
      'weight' => '14',
    ),
    15 => 
    array (
      'title' => 'Teaser break',
      'content' => '<!--break-->',
      'icon' => 'teaserbr.png',
      'accesskey' => 'T',
      'weight' => '15',
    ),
    16 => 
    array (
      'title' => 'Preview',
      'content' => 'js: E.prvAjax();',
      'icon' => 'preview.png',
      'accesskey' => 'P',
      'weight' => '16',
    ),
    17 => 
    array (
      'title' => 'Help',
      'content' => 'js: E.help(\'fadeIn\');',
      'icon' => 'help.png',
      'accesskey' => '1',
      'weight' => '17',
    ),
  ),
  'icons' => 
  array (
  ),
  'library' => 
  array (
    '%BUEDITOR/library/bue.min.default.js' => '',
  ),
)

File

import/bbcode.bueditor.txt
View source
  1. array (
  2. 'name' => 'BBCode',
  3. 'pages' => 'node/*
  4. comment/*',
  5. 'excludes' => 'edit-log
  6. edit-menu-description',
  7. 'iconpath' => '%BUEDITOR/icons',
  8. 'spriteon' => '1',
  9. 'buttons' =>
  10. array (
  11. 0 =>
  12. array (
  13. 'title' => 'Insert/edit image',
  14. 'content' => 'js:
  15. var S = E.getSelection();
  16. var M = S.match(new RegExp(\'^\\\\[img(?:=(\\\\d+)x(\\\\d+))?](.+)\\\\[/img]$\')) || [\'\', \'\', \'\', \'\'];
  17. var form = [
  18. {name: \'src\', title: \'Image URL\', value: M[3], suffix: E.imce.button(\'attr_src\'), required: true},
  19. {name: \'width\', title: \'Width x Height\', value: M[1], suffix: \' x \', attributes: {size: 3}, getnext: true},
  20. {name: \'height\', value: M[2], attributes: {size: 3}}
  21. ];
  22. var opt = {title: \'Insert/edit image\'};
  23. opt.submit = function(tag, form) {
  24. var el = form.elements;
  25. var src = el[\'attr_src\'].value;
  26. var w = el[\'attr_width\'].value;
  27. var h = el[\'attr_height\'].value;
  28. E.replaceSelection(\'[img\'+ (w*1 ? (\'=\'+ w +\'x\'+ h) : \'\') +\']\'+ src +\'[/img]\');
  29. };
  30. E.tagDialog(\'img\', form, opt);',
  31. 'icon' => 'image.png',
  32. 'accesskey' => 'M',
  33. 'weight' => '0',
  34. ),
  35. 1 =>
  36. array (
  37. 'title' => 'Insert/edit link',
  38. 'content' => 'js:
  39. var S = E.getSelection();
  40. var M = S.match(new RegExp(\'^\\\\[url(?:=([^\\\\]]*))?]((?:.|[\\r\\n])*)\\\\[/url]$\')) || [\'\', \'\', \'\'];
  41. var form = [
  42. {name: \'href\', title: \'URL\', value: M[1] || M[2], suffix: E.imce.button(\'attr_href\'), required: true},
  43. {name: \'text\', value: M[1] ? M[2] : (M[0] ? \'\' : S)}
  44. ];
  45. var opt = {title: \'Insert/edit link\'};
  46. opt.submit = function(tag, form) {
  47. var el = form.elements;
  48. var url = el[\'attr_href\'].value;
  49. var txt = el[\'attr_text\'].value;
  50. E.replaceSelection(\'[url\'+ (txt ? (\'=\'+ url) : \'\') +\']\'+ (txt || url) +\'[/url]\');
  51. };
  52. E.tagDialog(\'a\', form, opt);',
  53. 'icon' => 'link.png',
  54. 'accesskey' => 'L',
  55. 'weight' => '1',
  56. ),
  57. 2 =>
  58. array (
  59. 'title' => 'tpl:dot',
  60. 'content' => '',
  61. 'icon' => 'dot.png',
  62. 'accesskey' => '',
  63. 'weight' => '2',
  64. ),
  65. 3 =>
  66. array (
  67. 'title' => 'Bold',
  68. 'content' => '[b]%TEXT%[/b]',
  69. 'icon' => 'bold.png',
  70. 'accesskey' => 'B',
  71. 'weight' => '3',
  72. ),
  73. 4 =>
  74. array (
  75. 'title' => 'Italic',
  76. 'content' => '[i]%TEXT%[/i]',
  77. 'icon' => 'italic.png',
  78. 'accesskey' => 'I',
  79. 'weight' => '4',
  80. ),
  81. 5 =>
  82. array (
  83. 'title' => 'Underline',
  84. 'content' => '[u]%TEXT%[/u]',
  85. 'icon' => 'underline.png',
  86. 'accesskey' => 'U',
  87. 'weight' => '5',
  88. ),
  89. 6 =>
  90. array (
  91. 'title' => 'Strikethrough',
  92. 'content' => '[s]%TEXT%[/s]',
  93. 'icon' => 'strike.png',
  94. 'accesskey' => 'S',
  95. 'weight' => '6',
  96. ),
  97. 7 =>
  98. array (
  99. 'title' => 'tpl:dot',
  100. 'content' => '',
  101. 'icon' => 'dot.png',
  102. 'accesskey' => '',
  103. 'weight' => '7',
  104. ),
  105. 8 =>
  106. array (
  107. 'title' => 'Ordered list. Converts selected lines to a numbered list.',
  108. 'content' => 'js: E.wrapLines(\'[list=1]\\n\', \' [*]\', \'\', \'\\n[/list]\');',
  109. 'icon' => 'ol.png',
  110. 'accesskey' => 'O',
  111. 'weight' => '8',
  112. ),
  113. 9 =>
  114. array (
  115. 'title' => 'Unordered list. Converts selected lines to a bulleted list.',
  116. 'content' => 'js: E.wrapLines(\'[list]\\n\', \' [*]\', \'\', \'\\n[/list]\');',
  117. 'icon' => 'ul.png',
  118. 'accesskey' => 'N',
  119. 'weight' => '9',
  120. ),
  121. 10 =>
  122. array (
  123. 'title' => 'tpl:dot',
  124. 'content' => '',
  125. 'icon' => 'dot.png',
  126. 'accesskey' => '',
  127. 'weight' => '10',
  128. ),
  129. 11 =>
  130. array (
  131. 'title' => 'Headings',
  132. 'content' => 'js:
  133. var tags = [[\'h1\', \'Heading1\'], [\'h2\', \'Heading2\'], [\'h3\', \'Heading3\'], [\'h4\', \'Heading4\'], [\'h5\', \'Heading5\'], [\'h6\', \'Heading6\']];
  134. E.tagChooser(tags);
  135. $(\'a.choice-link\', E.quickPop).unbind(\'click\').each(function(i, a) {
  136. $(a).click(function() {
  137. E.tagSelection(\'[\'+ tags[i][0] +\']\', \'[/\'+ tags[i][0] +\']\').focus();
  138. return false;
  139. });
  140. });',
  141. 'icon' => 'headers.png',
  142. 'accesskey' => 'H',
  143. 'weight' => '11',
  144. ),
  145. 12 =>
  146. array (
  147. 'title' => 'Quote',
  148. 'content' => '[quote]%TEXT%[/quote]',
  149. 'icon' => 'quote.png',
  150. 'accesskey' => 'Q',
  151. 'weight' => '12',
  152. ),
  153. 13 =>
  154. array (
  155. 'title' => 'Code',
  156. 'content' => '[code]%TEXT%[/code]',
  157. 'icon' => 'code.png',
  158. 'accesskey' => 'D',
  159. 'weight' => '13',
  160. ),
  161. 14 =>
  162. array (
  163. 'title' => 'tpl:dot',
  164. 'content' => '',
  165. 'icon' => 'dot.png',
  166. 'accesskey' => '',
  167. 'weight' => '14',
  168. ),
  169. 15 =>
  170. array (
  171. 'title' => 'Teaser break',
  172. 'content' => '',
  173. 'icon' => 'teaserbr.png',
  174. 'accesskey' => 'T',
  175. 'weight' => '15',
  176. ),
  177. 16 =>
  178. array (
  179. 'title' => 'Preview',
  180. 'content' => 'js: E.prvAjax();',
  181. 'icon' => 'preview.png',
  182. 'accesskey' => 'P',
  183. 'weight' => '16',
  184. ),
  185. 17 =>
  186. array (
  187. 'title' => 'Help',
  188. 'content' => 'js: E.help(\'fadeIn\');',
  189. 'icon' => 'help.png',
  190. 'accesskey' => '1',
  191. 'weight' => '17',
  192. ),
  193. ),
  194. 'icons' =>
  195. array (
  196. ),
  197. 'library' =>
  198. array (
  199. '%BUEDITOR/library/bue.min.default.js' => '',
  200. ),
  201. )