-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'libs/editor/' changes from abfcce5..17887d3
17887d3 Merge pull request #354 from wordpress-mobile/issue/230-first-char-zw-space c5c0593 Added 'grave accent' keyCode to list of keyCodes ignored by paragraph handler 4156c10 Merge pull request #356 from wordpress-mobile/issue/353-title-html-entities e6344a1 Return plaintext for the title field in getHTMLForCallback, to avoid encoding HTML entities 4e38e7d Fixed hardcoded ZSSField name in handleKeyDownEvent f63c4fa Corrected a comment 6b1fb19 Merge branch 'develop' into issue/230-first-char-zw-space d066fbe On API 19, don't wrap the first line in paragraph tags - wait until first newline ecf7e40 s/wrappedDomNode()/getWrappedDomNode()/ 56eff9b Added editor-utils.js with some utility tag builder functions for ZSSEditor 9ec61ed Refactor ZSSEditor.resetSelectionOnField to accept an offset value for the range f4c135b Don't handle paragraph wrapping for non-printable keyCodes (hardware keyboards) git-subtree-dir: libs/editor git-subtree-split: 17887d367d19e3f94f6f0be18db334a38fa60899
- Loading branch information
Showing
3 changed files
with
66 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function Util () {} | ||
|
||
Util.buildOpeningTag = function(tagName) { | ||
return '<' + tagName + '>'; | ||
}; | ||
|
||
Util.buildClosingTag = function(tagName) { | ||
return '</' + tagName + '>'; | ||
}; | ||
|
||
Util.wrapHTMLInTag = function(html, tagName) { | ||
return Util.buildOpeningTag(tagName) + html + Util.buildClosingTag(tagName); | ||
}; |