DefTagsList with special characters?
-Shaman- - March 20, 2009 - 15:11
| Project: | BUEditor |
| Version: | 6.x-2.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I'm planning to make list with special characters (like it's now with h1, h2, h3, h4), but instead &something; I'm getting <&something;> I know that's though for the html tags not special characters, so how can I change this to get &something; without < > ?
Here's my code:
js: eDefTagChooser([
['Ω', 'Ω'],
['©', '©'],
['>', '>'],
['<', '<']
], true, 'li', 'ul', 'slideDown');//choose among tags
#1
that's not ver likely with eDefTagChooser. try this:
js:var chars = ['Ω', '©', '>', '<'];//extend if you like
var content = $('.cnt', BUE.quickPop).empty();
$.each(chars, function(i, char) {
$('<a href="#"></a>').click(function(){
BUE.active.replaceSelection(char);
BUE.active.focus();
return false;
}).html(char).css({margin: '10px', fontSize: '1.2em'}).appendTo(content);
});
BUE.quickPop.open(null, 'slideDown');
#2
Thank U very much, that's exactly what I needed! I think that this could be implemented into module, since it's really useful, it's wikipedia edit page-like list of special characters.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
It doesn't works with 2x version anymore…
The same is with smileys button: http://ufku.com/drupal/bueditor/contributions/smileys
#5
Popup structure changed in 2.x and it now allows to open popups using jquery objects as the content.
js:var chars = ['Ω', '©', '>', '<'];//extend if you like
var links = [];
$.each(chars, function(i, char) {
links[i] = $('<a href="#"></a>').click(function(){
E.replaceSelection(char).focus();
return false;
}).html(char).css({margin: '10px', fontSize:
'1.2em'})[0];
});
E.quickPop.open(links, 'slideDown');
For smileys
php:$L = drupal_to_js(_smileys_list());
$P = base_path();
drupal_add_js("(function($){
var click = function() {
BUE.dialog.close();
BUE.active.replaceSelection(this.firstChild.alt, 'end');
return false;
};
var map = function(s) {
return $('<a href=\"#\" title=\"'+ s.description +'\"><img src=\"$P'+ s.image +'\" alt=\" '+ s.acronyms.split(' ')[0] +' \" /></a>').css('margin', '0.5em').click(click)[0];
};
var links = $.map($L, map);
BUE.smlyWrap = function() {
return $('<div style=\"width:200px\"></div>').append(links);
};
})(jQuery);
", 'inline');
return 'js: E.dialog.open("Smileys", BUE.smlyWrap());';
#6
My list of special characters works as charm, but smileys not, I'm getting such a error when click on it: ReferenceError: smlyWrap is not defined
#7
Smiley code was updated.
I tested it with Smileys 6.x-1.0-alpha5 and it works.
#8
OK, I checked this again and it works, my fault.
Many thanks for help!
#9
Automatically closed -- issue fixed for 2 weeks with no activity.