- 快速入门
- Explore advanced topics
- Accessibility
- Editor control identifiers
- Annotations
- Editor events
- tinymce-AddOnManager
- Boilerplate content CSS
- Handle asynchronous image uploads
- tinymce-Annotator
- tinymce-FocusEvent
- Configuring callbacks for Comments 2-0
- Keyboard shortcuts
- tinymce-CommandEvent
- tinymce-FocusManager
- tinymce-WindowManager
- Toolbar buttons
- PHP image upload handler
- tinymce-ContentEvent
- tinymce-Formatter
- tinymce-dom-DomQuery
- Create a plugin for TinyMCE
- Security
- tinymce-Editor
- tinymce-NotificationManager
- tinymce-dom-DOMUtils
- Create a skin for TinyMCE
- Usage with module loaders
- tinymce-EditorCommands
- tinymce-Plugin
- tinymce-dom-ScriptLoader
- Create custom notifications
- TinyMCE plugin Yeoman generator
- tinymce-EditorManager
- tinymce-ProgressStateEvent
- tinymce-dom-BookmarkManager
- Editor command identifiers
- tinymce-Formatter
- tinymce-EditorObservable
- tinymce-ResizeEvent
- tinymce-dom-ControlSelection
- tinymce
- tinymce-Env
- tinymce-Shortcuts
- tinymce-dom-DomQuery
- tinymce-Event
- tinymce-Theme
- tinymce-dom-DOMUtils
- tinymce-UndoManager
- tinymce-dom-EventUtils
- tinymce-dom-RangeUtils
- tinymce-dom-ScriptLoader
- tinymce-dom-Selection
- tinymce-html-Schema
- tinymce-dom-Serializer
- tinymce-html-Serializer
- tinymce-util-I18n
- tinymce-dom-TreeWalker
- tinymce-html-Styles
- tinymce-util-JSON
- Cloud deployment of plugins Only
- tinymce-editor-ui-registry
- tinymce-html-Writer
- tinymce-util-JSONRequest
- Version compatibility reference
- Image & file upload options
- tinymce-geom-Rect
- tinymce-util-LocalStorage
- Configuration options reference
- Integration and setup options
- tinymce-html-DomParser
- tinymce-util-Observable
- tinymce-util-Observable
- Advanced editing behaviors
- JWT authentication setup
- tinymce-html-Entities
- tinymce-util-URI
- tinymce-util-Tools
- Content appearance options
- Localization options
- tinymce-html-Node
- tinymce-util-Color
- tinymce-util-XHR
- Content filtering options
- Spelling options
- tinymce-html-SaxParser
- tinymce-util-Delay
- Cloud deployment guide
- Content formatting options
- URL handling options
- tinymce-util-EventDispatcher
- Cloud deployment of editor & plugins
- Contribute to documentation
- Examples & demos
- Specify editor & plugin versions
- Contribute to TinyMCE development
- Basic example
- User interface options
- Case Change
- Checklist plugin
- Classic editor example
- Comments 2-0 Demo
- Custom formats example
- Custom menu item
- HTML5 formats example
- Valid elements example
- Custom toolbar button
- Format Painter
- Live example
- Embed rich media
- Full featured example
- Premium features
- Configure Enhanced Media Embed Server
- Server-side component installation
- Custom toolbar menu button
- Image tools example
- Accessibility checking
- Integrate Enhanced Media Embed Server
- Configure server-side components
- Custom toolbar split button
- Inline editor example
- Advanced source code editing
- Format Painter
- Troubleshoot server-side components
- Tiny Drive
- Local upload
- Case Change
- Get TinyMCE bugs fixed
- Professional support
- Distraction-free editor example
- Page Embed plugin
- Checking links as-you-type
- Mentions
- System requirements
- Basic local file picker
- Permanent Pen plugin
- Check Spelling As-You-Type
- Self-hosted file management
- Commenting & collaboration
- URL conversion example
- Adding custom dictionaries
- Page Embed plugin
- Cloud-based file management
- Checklist plugin
- Paste from Word
- Introduction & getting started
- Permanent Pen Plugin
- Advanced installation choices
- Logo & attribution requirements
- Basic setup
- Customizing the editor UI
- TinyMCE distraction-free editing mode
- Filtering TinyMCE content
- Setup inline editing mode
- Rails integration
- Get Support & FAQ
- Work with plugins to extend TinyMCE
- React integration
- Advanced Code Editor plugin
- Localize TinyMCE
- Integrate with other projects
- TinyMCE for Swing integration
- Advanced List plugin
- Code plugin
- Use multiple TinyMCE instances in a single page
- Angular 2+ integration
- Vue integration
- Anchor plugin
- Code Sample plugin
- Check spelling in TinyMCE
- Angular 1 integration
- WordPress integration
- Autolink plugin
- Color Picker plugin
- System requirements
- Bootstrap integration
- Migrating from TinyMCE 4-x to TinyMCE 5-0-
- Autoresize plugin
- Comments 2-0
- Uploading images and files
- Dojo integration
- TinyMCE Mobile
- Autosave plugin
- TinyMCE classic editing mode
- jQuery integration
- BBCode plugin
- Context Menu plugin
- KnockoutJS integration
- Add plugins to TinyMCE
- Case Change
- Directionality plugin
- Accessibility Checker plugin
- Character Map plugin
- Drive plugin
- Checklist plugin
- Emoticons plugin
- Format Painter
- Full Page plugin
- Full Screen plugin
- Link Checker plugin
- Help plugin
- Lists plugin
- Paste plugin
- Horizontal Rule plugin
- Media plugin
- Permanent Pen Plugin
- Table plugin
- Image plugin
- Enhanced Media Embed plugin
- PowerPaste plugin
- Template plugin
- User interface components
- Image Tools plugin
- Mentions plugin
- Preview plugin
- Text Color plugin
- Autocompleter
- Import CSS plugin
- MoxieManager plugin
- Print plugin
- Text Pattern plugin
- Context forms
- Insert Date/Time plugin
- Nonbreaking Space plugin
- Quick Toolbar plugin
- Spell Checker Pro plugin
- Context menu
- Legacy Output plugin
- Noneditable plugin
- Save plugin
- Table of Contents plugin
- Context toolbar
- Link plugin
- Page Break plugin
- Search and Replace plugin
- Visual Blocks plugin
- Custom sidebar
- Page Embed plugin
- Spell Checker plugin
- Visual Characters plugin
- Dialog
- Tab Focus plugin
- Word Count plugin
- Dialog components
- Quick start
- Custom menu items
- Toolbar buttons
- Types of toolbar buttons
tinymce-dom-DomQuery
Examples
var $ = tinymce.dom.DomQuery;
$('p').attr('attr', 'value').addClass('class');
Properties
name | type | summary | defined by |
---|---|---|---|
context | Element | Context used to create the set. | tinymce.dom.DomQuery |
length | Number | Number of items in the current set. | tinymce.dom.DomQuery |
selector | String | Selector for the current set. | tinymce.dom.DomQuery |
Constructors
name | summary | defined by |
---|---|---|
DomQuery() | Constructs a new DomQuery instance with the specified selector or context. | tinymce.dom.DomQuery |
Methods
name | summary | defined by |
---|---|---|
add() | Adds new nodes to the set. | tinymce.dom.DomQuery |
addClass() | Adds the specified class name to the current set elements. | tinymce.dom.DomQuery |
after() | Adds the specified elements after current set nodes. | tinymce.dom.DomQuery |
append() | Appends the specified node/html or node set to the current set nodes. | tinymce.dom.DomQuery |
appendTo() | Appends the specified set nodes to the specified selector/instance. | tinymce.dom.DomQuery |
attr() | Sets/gets properties on the elements in the current set. | tinymce.dom.DomQuery |
before() | Adds the specified elements before current set nodes. | tinymce.dom.DomQuery |
children() | Returns all child elements matching the optional selector. | tinymce.dom.DomQuery |
clone() | Clones all nodes in set. | tinymce.dom.DomQuery |
closest() | Gets the current node or any parent matching the specified selector. | tinymce.dom.DomQuery |
contents() | Returns all child nodes matching the optional selector. | tinymce.dom.DomQuery |
css() | Sets/gets styles on the elements in the current set. | tinymce.dom.DomQuery |
each() | Executes the callback function for each item DomQuery collection. If you return false in the callback it will break the loop. | tinymce.dom.DomQuery |
each() | Executes the callback function for each item in array/object. If you return false in the callback it will break the loop. | tinymce.dom.DomQuery |
empty() | Empties all elements in set. | tinymce.dom.DomQuery |
eq() | Makes the set equal to the specified index. | tinymce.dom.DomQuery |
extend() | Extends the specified object with one or more objects. | tinymce.dom.DomQuery |
filter() | Filters the current set with the specified selector. | tinymce.dom.DomQuery |
find() | Finds elements by the specified selector for each element in set. | tinymce.dom.DomQuery |
first() | Makes the set equal to first element in set. | tinymce.dom.DomQuery |
grep() | Filters out items from the input array by calling the specified function for each item. If the function returns false the item will be excluded if it returns true it will be included. | tinymce.dom.DomQuery |
hasClass() | Returns true/false if the first item in set has the specified class. | tinymce.dom.DomQuery |
hide() | Hides all elements in set. | tinymce.dom.DomQuery |
html() | Sets or gets the HTML of the current set or first set node. | tinymce.dom.DomQuery |
inArray() | Returns the index of the specified item inside the array. | tinymce.dom.DomQuery |
is() | Returns true/false if the current set items matches the selector. | tinymce.dom.DomQuery |
isArray() | Returns true/false if the specified object is an array or not. | tinymce.dom.DomQuery |
last() | Makes the set equal to last element in set. | tinymce.dom.DomQuery |
makeArray() | Creates an array out of an array like object. | tinymce.dom.DomQuery |
next() | Returns a new collection with next sibling of each item in current collection matching the optional selector. | tinymce.dom.DomQuery |
nextUntil() | Returns a new collection with all next siblings of each item in current collection matching the optional selector. | tinymce.dom.DomQuery |
off() | Unbinds an event with callback function to the elements in set. | tinymce.dom.DomQuery |
offset() | Returns the offset of the first element in set or sets the top/left css properties of all elements in set. | tinymce.dom.DomQuery |
on() | Binds an event with callback function to the elements in set. | tinymce.dom.DomQuery |
parent() | Returns a new collection with the parent of each item in current collection matching the optional selector. | tinymce.dom.DomQuery |
parents() | Returns a new collection with the all the parents of each item in current collection matching the optional selector. | tinymce.dom.DomQuery |
parentsUntil() | Returns a new collection with the all the parents until the matching selector/element of each item in current collection matching the optional selector. | tinymce.dom.DomQuery |
prepend() | Prepends the specified node/html or node set to the current set nodes. | tinymce.dom.DomQuery |
prependTo() | Prepends the specified set nodes to the specified selector/instance. | tinymce.dom.DomQuery |
prev() | Returns a new collection with previous sibling of each item in current collection matching the optional selector. | tinymce.dom.DomQuery |
prevUntil() | Returns a new collection with all previous siblings of each item in current collection matching the optional selector. | tinymce.dom.DomQuery |
remove() | Removes all nodes in set from the document. | tinymce.dom.DomQuery |
removeAttr() | Removes attributse on the elements in the current set. | tinymce.dom.DomQuery |
removeClass() | Removes the specified class name to the current set elements. | tinymce.dom.DomQuery |
replaceWith() | Replaces the nodes in set with the specified content. | tinymce.dom.DomQuery |
show() | Shows all elements in set. | tinymce.dom.DomQuery |
slice() | Slices the current set. | tinymce.dom.DomQuery |
text() | Sets or gets the text of the current set or first set node. | tinymce.dom.DomQuery |
toArray() | Converts the current set to an array. | tinymce.dom.DomQuery |
toggleClass() | Toggles the specified class name on the current set elements. | tinymce.dom.DomQuery |
trigger() | Triggers the specified event by name or event object. | tinymce.dom.DomQuery |
trim() | Removes whitespace from the beginning and end of a string. | tinymce.dom.DomQuery |
unwrap() | Unwraps all elements by removing the parent element of each item in set. | tinymce.dom.DomQuery |
wrap() | Wraps all elements in set with the specified wrapper. | tinymce.dom.DomQuery |
wrapAll() | Wraps all nodes in set with the specified wrapper. If the nodes are siblings all of them will be wrapped in the same wrapper. | tinymce.dom.DomQuery |
wrapInner() | Wraps all elements inner contents in set with the specified wrapper. | tinymce.dom.DomQuery |
Constructors
DomQuery
public constructor function DomQuery(selector:String, context:Document)Constructs a new DomQuery instance with the specified selector or context.
Parameters
- selector (String) - Optional CSS selector/Array or array like object or HTML string.
- context (Document) - Optional context to search in.
Methods
add
add(items:Array, sort:Boolean):tinymce.dom.DomQueryAdds new nodes to the set.
Parameters
- items (Array) - Array of all nodes to add to set.
- sort (Boolean) - Optional sort flag that enables sorting of elements.
Return value
- tinymce.dom.DomQuery - New instance with nodes added.
addClass
addClass(className:String):tinymce.dom.DomQueryAdds the specified class name to the current set elements.
Parameters
- className (String) - Class name to add.
Return value
- tinymce.dom.DomQuery - Current set.
after
after(content:String):tinymce.dom.DomQueryAdds the specified elements after current set nodes.
Parameters
- content (String) - Content to add after to each element in set.
Return value
- tinymce.dom.DomQuery - Current set.
append
append(content:String):tinymce.dom.DomQueryAppends the specified node/html or node set to the current set nodes.
Parameters
- content (String) - Content to append to each element in set.
Return value
- tinymce.dom.DomQuery - Current set.
appendTo
appendTo(val:String):tinymce.dom.DomQueryAppends the specified set nodes to the specified selector/instance.
Parameters
- val (String) - Item to append the current set to.
Return value
- tinymce.dom.DomQuery - Current set with the appended nodes.
attr
attr(name:String, value:String):tinymce.dom.DomQuery, StringSets/gets properties on the elements in the current set.
Parameters
- name (String) - Name of property to get or an object with properties to set.
- value (String) - Optional value to set.
Return value
- tinymce.dom.DomQuery - Current set or the specified property when only the name is specified.
- String - Current set or the specified property when only the name is specified.
before
before(content:String):tinymce.dom.DomQueryAdds the specified elements before current set nodes.
Parameters
- content (String) - Content to add before to each element in set.
Return value
- tinymce.dom.DomQuery - Current set.
children
children(node:Element):tinymce.dom.DomQueryReturns all child elements matching the optional selector.
Parameters
- node (Element) - Node to match the elements against.
Return value
- tinymce.dom.DomQuery - New DomQuery instance with all matching elements.
clone
clone():tinymce.dom.DomQueryClones all nodes in set.
Return value
- tinymce.dom.DomQuery - Set with cloned nodes.
closest
closest(selector:String):tinymce.dom.DomQueryGets the current node or any parent matching the specified selector.
Parameters
- selector (String) - Selector or element to find.
Return value
- tinymce.dom.DomQuery - Set with closest elements.
contents
contents(node:Element):tinymce.dom.DomQueryReturns all child nodes matching the optional selector.
Parameters
- node (Element) - Node to get the contents of.
Return value
- tinymce.dom.DomQuery - New DomQuery instance with all matching elements.
css
css(name:String, value:String):tinymce.dom.DomQuery, StringSets/gets styles on the elements in the current set.
Parameters
- name (String) - Name of style to get or an object with styles to set.
- value (String) - Optional value to set.
Return value
- tinymce.dom.DomQuery - Current set or the specified style when only the name is specified.
- String - Current set or the specified style when only the name is specified.
each
each(callback:function):tinymce.dom.DomQueryExecutes the callback function for each item DomQuery collection. If you return false in the callback it will break the loop.
Parameters
- callback (function) - Callback function to execute for each item.
Return value
- tinymce.dom.DomQuery - Current set.
each
each(obj:Object, callback:function)Executes the callback function for each item in array/object. If you return false in the callback it will break the loop.
Parameters
- obj (Object) - Object to iterate.
- callback (function) - Callback function to execute for each item.
empty
empty():tinymce.dom.DomQueryEmpties all elements in set.
Return value
- tinymce.dom.DomQuery - Current set with the empty nodes.
eq
eq(index:Number):tinymce.dom.DomQueryMakes the set equal to the specified index.
Parameters
- index (Number) - Index to set it equal to.
Return value
- tinymce.dom.DomQuery - Single item set.
extend
extend(target:Object, object:Object..):ObjectExtends the specified object with one or more objects.
Parameters
- target (Object) - Target object to extend with new items.
- object (Object..) - Object to extend the target with.
Return value
- Object - Extended input object.
filter
filter(selector:String):tinymce.dom.DomQueryFilters the current set with the specified selector.
Parameters
- selector (String) - Selector to filter elements by.
Return value
- tinymce.dom.DomQuery - Set with filtered elements.
find
find(selector:String):tinymce.dom.DomQueryFinds elements by the specified selector for each element in set.
Parameters
- selector (String) - Selector to find elements by.
Return value
- tinymce.dom.DomQuery - Set with matches elements.
first
first():tinymce.dom.DomQueryMakes the set equal to first element in set.
Return value
- tinymce.dom.DomQuery - Single item set.
grep
grep(array:Array, callback:function):ArrayFilters out items from the input array by calling the specified function for each item. If the function returns false the item will be excluded if it returns true it will be included.
Examples
// Filter out some items, this will return an array with 4 and 5
var items = DomQuery.grep([1, 2, 3, 4, 5], function(v) {return v > 3;});
Parameters
- array (Array) - Array of items to loop though.
- callback (function) - Function to call for each item. Include/exclude depends on it's return value.
Return value
- Array - New array with values imported and filtered based in input.
hasClass
hasClass(className:String):BooleanReturns true/false if the first item in set has the specified class.
Parameters
- className (String) - Class name to check for.
Return value
- Boolean - True/false if the set has the specified class.
hide
hide():tinymce.dom.DomQueryHides all elements in set.
Return value
- tinymce.dom.DomQuery - Current set.
html
html(value:String):tinymce.dom.DomQuery, StringSets or gets the HTML of the current set or first set node.
Parameters
- value (String) - Optional innerHTML value to set on each element.
Return value
- tinymce.dom.DomQuery - Current set or the innerHTML of the first element.
- String - Current set or the innerHTML of the first element.
inArray
inArray(item:Object, array:Array):NumberReturns the index of the specified item inside the array.
Parameters
- item (Object) - Item to look for.
- array (Array) - Array to look for item in.
Return value
- Number - Index of the item or -1.
is
is(selector:String):BooleanReturns true/false if the current set items matches the selector.
Parameters
- selector (String) - Selector to match the elements against.
Return value
- Boolean - True/false if the current set matches the selector.
isArray
isArray(array:Object):BooleanReturns true/false if the specified object is an array or not.
Parameters
- array (Object) - Object to check if it's an array or not.
Return value
- Boolean - True/false if the object is an array.
last
last():tinymce.dom.DomQueryMakes the set equal to last element in set.
Return value
- tinymce.dom.DomQuery - Single item set.
makeArray
makeArray(object:Object):ArrayCreates an array out of an array like object.
Parameters
- object (Object) - Object to convert to array.
Return value
- Array - Array produced from object.
next
next(node:Element):tinymce.dom.DomQueryReturns a new collection with next sibling of each item in current collection matching the optional selector.
Parameters
- node (Element) - Node to match the next element against.
Return value
- tinymce.dom.DomQuery - New DomQuery instance with all matching elements.
nextUntil
nextUntil(node:Element, until:String):tinymce.dom.DomQueryReturns a new collection with all next siblings of each item in current collection matching the optional selector.
Parameters
- node (Element) - Node to find next siblings on.
- until (String) - Until the matching selector or element.
Return value
- tinymce.dom.DomQuery - New DomQuery instance with all matching elements.
off
off(name:String, callback:function):tinymce.dom.DomQueryUnbinds an event with callback function to the elements in set.
Parameters
- name (String) - Optional name of the event to bind.
- callback (function) - Optional callback function to execute when the event occurs.
Return value
- tinymce.dom.DomQuery - Current set.
offset
offset(offset:Object):Object, tinymce.dom.DomQueryReturns the offset of the first element in set or sets the top/left css properties of all elements in set.
Parameters
- offset (Object) - Optional offset object to set on each item.
Return value
- Object - Returns the first element offset or the current set if you specified an offset.
- tinymce.dom.DomQuery - Returns the first element offset or the current set if you specified an offset.
on
on(name:String, callback:function):tinymce.dom.DomQueryBinds an event with callback function to the elements in set.
Parameters
- name (String) - Name of the event to bind.
- callback (function) - Callback function to execute when the event occurs.
Return value
- tinymce.dom.DomQuery - Current set.
parent
parent(node:Element):tinymce.dom.DomQueryReturns a new collection with the parent of each item in current collection matching the optional selector.
Parameters
- node (Element) - Node to match parents against.
Return value
- tinymce.dom.DomQuery - New DomQuery instance with all matching parents.
parents
parents(node:Element):tinymce.dom.DomQueryReturns a new collection with the all the parents of each item in current collection matching the optional selector.
Parameters
- node (Element) - Node to match parents against.
Return value
- tinymce.dom.DomQuery - New DomQuery instance with all matching parents.
parentsUntil
parentsUntil(node:Element, until:String):tinymce.dom.DomQueryReturns a new collection with the all the parents until the matching selector/element of each item in current collection matching the optional selector.
Parameters
- node (Element) - Node to find parent of.
- until (String) - Until the matching selector or element.
Return value
- tinymce.dom.DomQuery - New DomQuery instance with all matching parents.
prepend
prepend(content:String):tinymce.dom.DomQueryPrepends the specified node/html or node set to the current set nodes.
Parameters
- content (String) - Content to prepend to each element in set.
Return value
- tinymce.dom.DomQuery - Current set.
prependTo
prependTo(val:String):tinymce.dom.DomQueryPrepends the specified set nodes to the specified selector/instance.
Parameters
- val (String) - Item to prepend the current set to.
Return value
- tinymce.dom.DomQuery - Current set with the prepended nodes.
prev
prev(node:Element):tinymce.dom.DomQueryReturns a new collection with previous sibling of each item in current collection matching the optional selector.
Parameters
- node (Element) - Node to match the previous element against.
Return value
- tinymce.dom.DomQuery - New DomQuery instance with all matching elements.
prevUntil
prevUntil(node:Element, until:String):tinymce.dom.DomQueryReturns a new collection with all previous siblings of each item in current collection matching the optional selector.
Parameters
- node (Element) - Node to find previous siblings on.
- until (String) - Until the matching selector or element.
Return value
- tinymce.dom.DomQuery - New DomQuery instance with all matching elements.
remove
remove():tinymce.dom.DomQueryRemoves all nodes in set from the document.
Return value
- tinymce.dom.DomQuery - Current set with the removed nodes.
removeAttr
removeAttr(name:String):tinymce.dom.DomQuery, StringRemoves attributse on the elements in the current set.
Parameters
- name (String) - Name of attribute to remove.
Return value
- tinymce.dom.DomQuery - Current set.
- String - Current set.
removeClass
removeClass(className:String):tinymce.dom.DomQueryRemoves the specified class name to the current set elements.
Parameters
- className (String) - Class name to remove.
Return value
- tinymce.dom.DomQuery - Current set.
replaceWith
replaceWith(content:String):tinymce.dom.DomQueryReplaces the nodes in set with the specified content.
Parameters
- content (String) - Content to replace nodes with.
Return value
- tinymce.dom.DomQuery - Set with replaced nodes.
show
show():tinymce.dom.DomQueryShows all elements in set.
Return value
- tinymce.dom.DomQuery - Current set.
slice
slice(start:Number, end:Number):tinymce.dom.DomQuerySlices the current set.
Parameters
- start (Number) - Start index to slice at.
- end (Number) - Optional end index to end slice at.
Return value
- tinymce.dom.DomQuery - Sliced set.
text
text(value:String):tinymce.dom.DomQuery, StringSets or gets the text of the current set or first set node.
Parameters
- value (String) - Optional innerText value to set on each element.
Return value
- tinymce.dom.DomQuery - Current set or the innerText of the first element.
- String - Current set or the innerText of the first element.
toArray
toArray():ArrayConverts the current set to an array.
Return value
- Array - Array of all nodes in set.
toggleClass
toggleClass(className:String, state:Boolean):tinymce.dom.DomQueryToggles the specified class name on the current set elements.
Parameters
- className (String) - Class name to add/remove.
- state (Boolean) - Optional state to toggle on/off.
Return value
- tinymce.dom.DomQuery - Current set.
trigger
trigger(name:String):tinymce.dom.DomQueryTriggers the specified event by name or event object.
Parameters
- name (String) - Name of the event to trigger or event object.
Return value
- tinymce.dom.DomQuery - Current set.
trim
trim(str:String):StringRemoves whitespace from the beginning and end of a string.
Parameters
- str (String) - String to remove whitespace from.
Return value
- String - New string with removed whitespace.
unwrap
unwrap():tinymce.dom.DomQueryUnwraps all elements by removing the parent element of each item in set.
Return value
- tinymce.dom.DomQuery - Set with unwrapped nodes.
wrap
wrap(content:String):tinymce.dom.DomQueryWraps all elements in set with the specified wrapper.
Parameters
- content (String) - Content to wrap nodes with.
Return value
- tinymce.dom.DomQuery - Set with wrapped nodes.
wrapAll
wrapAll(content:String):tinymce.dom.DomQueryWraps all nodes in set with the specified wrapper. If the nodes are siblings all of them will be wrapped in the same wrapper.
Parameters
- content (String) - Content to wrap nodes with.
Return value
- tinymce.dom.DomQuery - Set with wrapped nodes.
wrapInner
wrapInner(content:String):tinymce.dom.DomQueryWraps all elements inner contents in set with the specified wrapper.
Parameters
- content (String) - Content to wrap nodes with.
Return value
- tinymce.dom.DomQuery - Set with wrapped nodes.
Can't find what you're looking for? Let us know.
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论