Lines Matching defs:EditorSelection

3      * @class EditorSelection
18 Y.EditorSelection = function(domEvent) {
65 this.anchorNode = this.focusNode = Y.EditorSelection.resolve(ieNode);
100 this.anchorNode = Y.EditorSelection.resolve(sel.anchorNode);
101 this.focusNode = Y.EditorSelection.resolve(sel.focusNode);
124 Y.EditorSelection.removeFontFamily = function(n) {
130 if (s.match(Y.EditorSelection.REG_FONTFAMILY)) {
131 s = s.replace(Y.EditorSelection.REG_FONTFAMILY, '');
143 Y.EditorSelection.filter = function(blocks) {
147 var nodes = Y.all(Y.EditorSelection.ALL),
160 Y.EditorSelection.removeFontFamily(raw);
222 Y.EditorSelection.prototype._swap(baseNodes.item(k), newTag);
235 Y.EditorSelection.filterBlocks();
246 Y.EditorSelection.filterBlocks = function() {
255 if (!node.test(Y.EditorSelection.BLOCKS)) {
258 c = childs[i][textContent].match(Y.EditorSelection.REG_CHAR);
259 s = childs[i][textContent].match(Y.EditorSelection.REG_NON);
272 wrapped = Y.EditorSelection._wrapBlock(wrapped);
275 wrapped = Y.EditorSelection._wrapBlock(wrapped);
278 single = Y.all(Y.EditorSelection.DEFAULT_BLOCK_TAG);
280 Y.log('Only One default block tag (' + Y.EditorSelection.DEFAULT_BLOCK_TAG + '), focus it..', 'info', 'editor-selection');
289 single.set('innerHTML', Y.EditorSelection.CURSOR);
290 sel = new Y.EditorSelection();
349 Y.EditorSelection.REG_FONTFAMILY = /font-family: ;/;
356 Y.EditorSelection.REG_CHAR = /[a-zA-Z-0-9_!@#\$%\^&*\(\)-=_+\[\]\\{}|;':",.\/<>\?]/gi;
363 Y.EditorSelection.REG_NON = /[\s|\n|\t]/gi;
370 Y.EditorSelection.REG_NOHTML = /<\S[^><]*>/g;
379 Y.EditorSelection._wrapBlock = function(wrapped) {
381 var newChild = Y.Node.create('<' + Y.EditorSelection.DEFAULT_BLOCK_TAG + '></' + Y.EditorSelection.DEFAULT_BLOCK_TAG + '>'),
399 Y.EditorSelection.unfilter = function() {
459 Y.EditorSelection.resolve = function(n) {
480 Y.EditorSelection.getText = function(node) {
481 var txt = node.get('innerHTML').replace(Y.EditorSelection.REG_NOHTML, '');
487 //Y.EditorSelection.DEFAULT_BLOCK_TAG = 'div';
488 Y.EditorSelection.DEFAULT_BLOCK_TAG = 'p';
495 Y.EditorSelection.ALL = '[style],font[face]';
502 Y.EditorSelection.BLOCKS = 'p,div,ul,ol,table,style';
508 Y.EditorSelection.TMP = 'yui-tmp';
514 Y.EditorSelection.DEFAULT_TAG = 'span';
521 Y.EditorSelection.CURID = 'yui-cursor';
528 Y.EditorSelection.CUR_WRAPID = 'yui-cursor-wrapper';
535 Y.EditorSelection.CURSOR = '<span><br class="yui-cursor"></span>';
537 Y.EditorSelection.hasCursor = function() {
538 var cur = Y.all('#' + Y.EditorSelection.CUR_WRAPID);
548 Y.EditorSelection.cleanCursor = function() {
558 html = Y.EditorSelection.getText(c.item(0));
566 var cur = Y.all('#' + Y.EditorSelection.CUR_WRAPID);
580 Y.EditorSelection.prototype = {
672 Y.EditorSelection.filter();
673 Y.config.doc.execCommand('fontname', null, Y.EditorSelection.TMP);
674 var nodes = Y.all(Y.EditorSelection.ALL),
678 if (n.getStyle(FONT_FAMILY) == Y.EditorSelection.TMP) {
680 Y.EditorSelection.removeFontFamily(n);
707 var cur = Y.Node.create('<' + Y.EditorSelection.DEFAULT_TAG + ' class="yui-non"></' + Y.EditorSelection.DEFAULT_TAG + '>'),
813 tag = (tag) ? tag : Y.EditorSelection.DEFAULT_TAG;
890 * @return {EditorSelection}
916 * @return {EditorSelection}
958 return this.insertContent(Y.EditorSelection.CURSOR);
966 return Y.all('#' + Y.EditorSelection.CURID);
1011 return 'EditorSelection Object';
1016 Y.Selection = Y.EditorSelection;