roosterjs-editor-api
Advanced tools
Comparing version 8.53.0 to 8.54.0
@@ -6,3 +6,3 @@ import { ElementBasedFormatState, FormatState, IEditor, PluginEvent } from 'roosterjs-editor-types'; | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -18,3 +18,3 @@ * @returns An ElementBasedFormatState object | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -21,0 +21,0 @@ * @returns The format state at cursor |
@@ -9,3 +9,3 @@ define(["require", "exports", "tslib", "roosterjs-editor-dom"], function (require, exports, tslib_1, roosterjs_editor_dom_1) { | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -24,8 +24,9 @@ * @returns An ElementBasedFormatState object | ||
} | ||
var headerTag = (0, roosterjs_editor_dom_1.getTagOfNode)(editor.getElementAtCursor('H1,H2,H3,H4,H5,H6', undefined /*startFrom*/, event)); | ||
var headingTag = (0, roosterjs_editor_dom_1.getTagOfNode)(editor.getElementAtCursor('H1,H2,H3,H4,H5,H6', undefined /*startFrom*/, event)); | ||
var table = editor.queryElements('table', 1 /* OnSelection */)[0]; | ||
var tableFormat = table ? (0, roosterjs_editor_dom_1.getTableFormatInfo)(table) : undefined; | ||
var hasHeader = (table === null || table === void 0 ? void 0 : table.rows[0]) | ||
var hasTableHeader = (table === null || table === void 0 ? void 0 : table.rows[0]) | ||
? (0, roosterjs_editor_dom_1.toArray)(table.rows[0].cells).every(function (cell) { return (0, roosterjs_editor_dom_1.getTagOfNode)(cell) == 'TH'; }) | ||
: undefined; | ||
var headingLevel = (headingTag && parseInt(headingTag[1])) || 0; | ||
return { | ||
@@ -35,3 +36,4 @@ isBullet: listTag == 'UL', | ||
isMultilineSelection: multiline, | ||
headerLevel: (headerTag && parseInt(headerTag[1])) || 0, | ||
headingLevel: headingLevel, | ||
headerLevel: headingLevel, | ||
canUnlink: !!editor.queryElements('a[href]', 1 /* OnSelection */)[0], | ||
@@ -44,3 +46,3 @@ canAddImageAltText: !!editor.queryElements('img', 1 /* OnSelection */)[0], | ||
tableFormat: tableFormat || {}, | ||
tableHasHeader: hasHeader, | ||
tableHasHeader: hasTableHeader, | ||
canMergeTableCell: canMergeTableCell(editor), | ||
@@ -56,3 +58,3 @@ }; | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -59,0 +61,0 @@ * @returns The format state at cursor |
@@ -34,3 +34,3 @@ export { default as changeFontSize, FONT_SIZES } from './format/changeFontSize'; | ||
export { default as toggleUnderline } from './format/toggleUnderline'; | ||
export { default as toggleHeader } from './format/toggleHeader'; | ||
export { default as setHeadingLevel, toggleHeader } from './format/setHeadingLevel'; | ||
export { default as applyCellShading } from './table/applyCellShading'; | ||
@@ -37,0 +37,0 @@ export { default as toggleListType } from './utils/toggleListType'; |
@@ -1,5 +0,5 @@ | ||
define(["require", "exports", "./format/changeFontSize", "./format/clearBlockFormat", "./format/clearFormat", "./format/createLink", "./format/getFormatState", "./format/insertEntity", "./format/insertImage", "./table/insertTable", "./table/editTable", "./table/formatTable", "./format/removeLink", "./format/replaceWithNode", "./format/rotateElement", "./format/setAlignment", "./format/setBackgroundColor", "./format/setTextColor", "./format/setDirection", "./format/setFontName", "./format/setFontSize", "./format/setImageAltText", "./format/setIndentation", "./format/changeCapitalization", "./format/toggleBold", "./format/toggleBullet", "./format/toggleItalic", "./format/toggleNumbering", "./format/setOrderedListNumbering", "./format/toggleBlockQuote", "./format/toggleCodeBlock", "./format/toggleStrikethrough", "./format/toggleSubscript", "./format/toggleSuperscript", "./format/toggleUnderline", "./format/toggleHeader", "./table/applyCellShading", "./utils/toggleListType", "./utils/blockFormat", "./utils/commitListChains"], function (require, exports, changeFontSize_1, clearBlockFormat_1, clearFormat_1, createLink_1, getFormatState_1, insertEntity_1, insertImage_1, insertTable_1, editTable_1, formatTable_1, removeLink_1, replaceWithNode_1, rotateElement_1, setAlignment_1, setBackgroundColor_1, setTextColor_1, setDirection_1, setFontName_1, setFontSize_1, setImageAltText_1, setIndentation_1, changeCapitalization_1, toggleBold_1, toggleBullet_1, toggleItalic_1, toggleNumbering_1, setOrderedListNumbering_1, toggleBlockQuote_1, toggleCodeBlock_1, toggleStrikethrough_1, toggleSubscript_1, toggleSuperscript_1, toggleUnderline_1, toggleHeader_1, applyCellShading_1, toggleListType_1, blockFormat_1, commitListChains_1) { | ||
define(["require", "exports", "./format/changeFontSize", "./format/clearBlockFormat", "./format/clearFormat", "./format/createLink", "./format/getFormatState", "./format/insertEntity", "./format/insertImage", "./table/insertTable", "./table/editTable", "./table/formatTable", "./format/removeLink", "./format/replaceWithNode", "./format/rotateElement", "./format/setAlignment", "./format/setBackgroundColor", "./format/setTextColor", "./format/setDirection", "./format/setFontName", "./format/setFontSize", "./format/setImageAltText", "./format/setIndentation", "./format/changeCapitalization", "./format/toggleBold", "./format/toggleBullet", "./format/toggleItalic", "./format/toggleNumbering", "./format/setOrderedListNumbering", "./format/toggleBlockQuote", "./format/toggleCodeBlock", "./format/toggleStrikethrough", "./format/toggleSubscript", "./format/toggleSuperscript", "./format/toggleUnderline", "./format/setHeadingLevel", "./table/applyCellShading", "./utils/toggleListType", "./utils/blockFormat", "./utils/commitListChains"], function (require, exports, changeFontSize_1, clearBlockFormat_1, clearFormat_1, createLink_1, getFormatState_1, insertEntity_1, insertImage_1, insertTable_1, editTable_1, formatTable_1, removeLink_1, replaceWithNode_1, rotateElement_1, setAlignment_1, setBackgroundColor_1, setTextColor_1, setDirection_1, setFontName_1, setFontSize_1, setImageAltText_1, setIndentation_1, changeCapitalization_1, toggleBold_1, toggleBullet_1, toggleItalic_1, toggleNumbering_1, setOrderedListNumbering_1, toggleBlockQuote_1, toggleCodeBlock_1, toggleStrikethrough_1, toggleSubscript_1, toggleSuperscript_1, toggleUnderline_1, setHeadingLevel_1, applyCellShading_1, toggleListType_1, blockFormat_1, commitListChains_1) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.experimentCommitListChains = exports.commitListChains = exports.blockFormat = exports.toggleListType = exports.applyCellShading = exports.toggleHeader = exports.toggleUnderline = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleCodeBlock = exports.toggleBlockQuote = exports.setOrderedListNumbering = exports.toggleNumbering = exports.toggleItalic = exports.toggleBullet = exports.toggleBold = exports.changeCapitalization = exports.setIndentation = exports.setImageAltText = exports.setFontSize = exports.setFontName = exports.setDirection = exports.setTextColor = exports.setBackgroundColor = exports.setAlignment = exports.rotateElement = exports.replaceWithNode = exports.removeLink = exports.formatTable = exports.editTable = exports.insertTable = exports.insertImage = exports.insertEntity = exports.getElementBasedFormatState = exports.getFormatState = exports.createLink = exports.clearFormat = exports.clearBlockFormat = exports.FONT_SIZES = exports.changeFontSize = void 0; | ||
exports.experimentCommitListChains = exports.commitListChains = exports.blockFormat = exports.toggleListType = exports.applyCellShading = exports.toggleHeader = exports.setHeadingLevel = exports.toggleUnderline = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleCodeBlock = exports.toggleBlockQuote = exports.setOrderedListNumbering = exports.toggleNumbering = exports.toggleItalic = exports.toggleBullet = exports.toggleBold = exports.changeCapitalization = exports.setIndentation = exports.setImageAltText = exports.setFontSize = exports.setFontName = exports.setDirection = exports.setTextColor = exports.setBackgroundColor = exports.setAlignment = exports.rotateElement = exports.replaceWithNode = exports.removeLink = exports.formatTable = exports.editTable = exports.insertTable = exports.insertImage = exports.insertEntity = exports.getElementBasedFormatState = exports.getFormatState = exports.createLink = exports.clearFormat = exports.clearBlockFormat = exports.FONT_SIZES = exports.changeFontSize = void 0; | ||
Object.defineProperty(exports, "changeFontSize", { enumerable: true, get: function () { return changeFontSize_1.default; } }); | ||
@@ -40,3 +40,4 @@ Object.defineProperty(exports, "FONT_SIZES", { enumerable: true, get: function () { return changeFontSize_1.FONT_SIZES; } }); | ||
Object.defineProperty(exports, "toggleUnderline", { enumerable: true, get: function () { return toggleUnderline_1.default; } }); | ||
Object.defineProperty(exports, "toggleHeader", { enumerable: true, get: function () { return toggleHeader_1.default; } }); | ||
Object.defineProperty(exports, "setHeadingLevel", { enumerable: true, get: function () { return setHeadingLevel_1.default; } }); | ||
Object.defineProperty(exports, "toggleHeader", { enumerable: true, get: function () { return setHeadingLevel_1.toggleHeader; } }); | ||
Object.defineProperty(exports, "applyCellShading", { enumerable: true, get: function () { return applyCellShading_1.default; } }); | ||
@@ -43,0 +44,0 @@ Object.defineProperty(exports, "toggleListType", { enumerable: true, get: function () { return toggleListType_1.default; } }); |
@@ -6,3 +6,3 @@ import { ElementBasedFormatState, FormatState, IEditor, PluginEvent } from 'roosterjs-editor-types'; | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -18,3 +18,3 @@ * @returns An ElementBasedFormatState object | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -21,0 +21,0 @@ * @returns The format state at cursor |
@@ -7,3 +7,3 @@ import { __assign } from "tslib"; | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -22,8 +22,9 @@ * @returns An ElementBasedFormatState object | ||
} | ||
var headerTag = getTagOfNode(editor.getElementAtCursor('H1,H2,H3,H4,H5,H6', undefined /*startFrom*/, event)); | ||
var headingTag = getTagOfNode(editor.getElementAtCursor('H1,H2,H3,H4,H5,H6', undefined /*startFrom*/, event)); | ||
var table = editor.queryElements('table', 1 /* OnSelection */)[0]; | ||
var tableFormat = table ? getTableFormatInfo(table) : undefined; | ||
var hasHeader = (table === null || table === void 0 ? void 0 : table.rows[0]) | ||
var hasTableHeader = (table === null || table === void 0 ? void 0 : table.rows[0]) | ||
? toArray(table.rows[0].cells).every(function (cell) { return getTagOfNode(cell) == 'TH'; }) | ||
: undefined; | ||
var headingLevel = (headingTag && parseInt(headingTag[1])) || 0; | ||
return { | ||
@@ -33,3 +34,4 @@ isBullet: listTag == 'UL', | ||
isMultilineSelection: multiline, | ||
headerLevel: (headerTag && parseInt(headerTag[1])) || 0, | ||
headingLevel: headingLevel, | ||
headerLevel: headingLevel, | ||
canUnlink: !!editor.queryElements('a[href]', 1 /* OnSelection */)[0], | ||
@@ -42,3 +44,3 @@ canAddImageAltText: !!editor.queryElements('img', 1 /* OnSelection */)[0], | ||
tableFormat: tableFormat || {}, | ||
tableHasHeader: hasHeader, | ||
tableHasHeader: hasTableHeader, | ||
canMergeTableCell: canMergeTableCell(editor), | ||
@@ -53,3 +55,3 @@ }; | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -56,0 +58,0 @@ * @returns The format state at cursor |
@@ -34,3 +34,3 @@ export { default as changeFontSize, FONT_SIZES } from './format/changeFontSize'; | ||
export { default as toggleUnderline } from './format/toggleUnderline'; | ||
export { default as toggleHeader } from './format/toggleHeader'; | ||
export { default as setHeadingLevel, toggleHeader } from './format/setHeadingLevel'; | ||
export { default as applyCellShading } from './table/applyCellShading'; | ||
@@ -37,0 +37,0 @@ export { default as toggleListType } from './utils/toggleListType'; |
@@ -34,3 +34,3 @@ export { default as changeFontSize, FONT_SIZES } from './format/changeFontSize'; | ||
export { default as toggleUnderline } from './format/toggleUnderline'; | ||
export { default as toggleHeader } from './format/toggleHeader'; | ||
export { default as setHeadingLevel, toggleHeader } from './format/setHeadingLevel'; | ||
export { default as applyCellShading } from './table/applyCellShading'; | ||
@@ -37,0 +37,0 @@ export { default as toggleListType } from './utils/toggleListType'; |
@@ -6,3 +6,3 @@ import { ElementBasedFormatState, FormatState, IEditor, PluginEvent } from 'roosterjs-editor-types'; | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -18,3 +18,3 @@ * @returns An ElementBasedFormatState object | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -21,0 +21,0 @@ * @returns The format state at cursor |
@@ -10,3 +10,3 @@ "use strict"; | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -25,8 +25,9 @@ * @returns An ElementBasedFormatState object | ||
} | ||
var headerTag = (0, roosterjs_editor_dom_1.getTagOfNode)(editor.getElementAtCursor('H1,H2,H3,H4,H5,H6', undefined /*startFrom*/, event)); | ||
var headingTag = (0, roosterjs_editor_dom_1.getTagOfNode)(editor.getElementAtCursor('H1,H2,H3,H4,H5,H6', undefined /*startFrom*/, event)); | ||
var table = editor.queryElements('table', 1 /* OnSelection */)[0]; | ||
var tableFormat = table ? (0, roosterjs_editor_dom_1.getTableFormatInfo)(table) : undefined; | ||
var hasHeader = (table === null || table === void 0 ? void 0 : table.rows[0]) | ||
var hasTableHeader = (table === null || table === void 0 ? void 0 : table.rows[0]) | ||
? (0, roosterjs_editor_dom_1.toArray)(table.rows[0].cells).every(function (cell) { return (0, roosterjs_editor_dom_1.getTagOfNode)(cell) == 'TH'; }) | ||
: undefined; | ||
var headingLevel = (headingTag && parseInt(headingTag[1])) || 0; | ||
return { | ||
@@ -36,3 +37,4 @@ isBullet: listTag == 'UL', | ||
isMultilineSelection: multiline, | ||
headerLevel: (headerTag && parseInt(headerTag[1])) || 0, | ||
headingLevel: headingLevel, | ||
headerLevel: headingLevel, | ||
canUnlink: !!editor.queryElements('a[href]', 1 /* OnSelection */)[0], | ||
@@ -45,3 +47,3 @@ canAddImageAltText: !!editor.queryElements('img', 1 /* OnSelection */)[0], | ||
tableFormat: tableFormat || {}, | ||
tableHasHeader: hasHeader, | ||
tableHasHeader: hasTableHeader, | ||
canMergeTableCell: canMergeTableCell(editor), | ||
@@ -57,3 +59,3 @@ }; | ||
* @param event (Optional) The plugin event, it stores the event cached data for looking up. | ||
* In this function the event cache is used to get list state and header level. If not passed, | ||
* In this function the event cache is used to get list state and heading level. If not passed, | ||
* it will query the node within selection to get the info | ||
@@ -60,0 +62,0 @@ * @returns The format state at cursor |
@@ -34,3 +34,3 @@ export { default as changeFontSize, FONT_SIZES } from './format/changeFontSize'; | ||
export { default as toggleUnderline } from './format/toggleUnderline'; | ||
export { default as toggleHeader } from './format/toggleHeader'; | ||
export { default as setHeadingLevel, toggleHeader } from './format/setHeadingLevel'; | ||
export { default as applyCellShading } from './table/applyCellShading'; | ||
@@ -37,0 +37,0 @@ export { default as toggleListType } from './utils/toggleListType'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.experimentCommitListChains = exports.commitListChains = exports.blockFormat = exports.toggleListType = exports.applyCellShading = exports.toggleHeader = exports.toggleUnderline = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleCodeBlock = exports.toggleBlockQuote = exports.setOrderedListNumbering = exports.toggleNumbering = exports.toggleItalic = exports.toggleBullet = exports.toggleBold = exports.changeCapitalization = exports.setIndentation = exports.setImageAltText = exports.setFontSize = exports.setFontName = exports.setDirection = exports.setTextColor = exports.setBackgroundColor = exports.setAlignment = exports.rotateElement = exports.replaceWithNode = exports.removeLink = exports.formatTable = exports.editTable = exports.insertTable = exports.insertImage = exports.insertEntity = exports.getElementBasedFormatState = exports.getFormatState = exports.createLink = exports.clearFormat = exports.clearBlockFormat = exports.FONT_SIZES = exports.changeFontSize = void 0; | ||
exports.experimentCommitListChains = exports.commitListChains = exports.blockFormat = exports.toggleListType = exports.applyCellShading = exports.toggleHeader = exports.setHeadingLevel = exports.toggleUnderline = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleCodeBlock = exports.toggleBlockQuote = exports.setOrderedListNumbering = exports.toggleNumbering = exports.toggleItalic = exports.toggleBullet = exports.toggleBold = exports.changeCapitalization = exports.setIndentation = exports.setImageAltText = exports.setFontSize = exports.setFontName = exports.setDirection = exports.setTextColor = exports.setBackgroundColor = exports.setAlignment = exports.rotateElement = exports.replaceWithNode = exports.removeLink = exports.formatTable = exports.editTable = exports.insertTable = exports.insertImage = exports.insertEntity = exports.getElementBasedFormatState = exports.getFormatState = exports.createLink = exports.clearFormat = exports.clearBlockFormat = exports.FONT_SIZES = exports.changeFontSize = void 0; | ||
var changeFontSize_1 = require("./format/changeFontSize"); | ||
@@ -72,4 +72,5 @@ Object.defineProperty(exports, "changeFontSize", { enumerable: true, get: function () { return changeFontSize_1.default; } }); | ||
Object.defineProperty(exports, "toggleUnderline", { enumerable: true, get: function () { return toggleUnderline_1.default; } }); | ||
var toggleHeader_1 = require("./format/toggleHeader"); | ||
Object.defineProperty(exports, "toggleHeader", { enumerable: true, get: function () { return toggleHeader_1.default; } }); | ||
var setHeadingLevel_1 = require("./format/setHeadingLevel"); | ||
Object.defineProperty(exports, "setHeadingLevel", { enumerable: true, get: function () { return setHeadingLevel_1.default; } }); | ||
Object.defineProperty(exports, "toggleHeader", { enumerable: true, get: function () { return setHeadingLevel_1.toggleHeader; } }); | ||
var applyCellShading_1 = require("./table/applyCellShading"); | ||
@@ -76,0 +77,0 @@ Object.defineProperty(exports, "applyCellShading", { enumerable: true, get: function () { return applyCellShading_1.default; } }); |
@@ -6,6 +6,6 @@ { | ||
"tslib": "^2.3.1", | ||
"roosterjs-editor-types": "^8.53.0", | ||
"roosterjs-editor-dom": "^8.53.0" | ||
"roosterjs-editor-types": "^8.54.0", | ||
"roosterjs-editor-dom": "^8.54.0" | ||
}, | ||
"version": "8.53.0", | ||
"version": "8.54.0", | ||
"main": "./lib/index.js", | ||
@@ -12,0 +12,0 @@ "typings": "./lib/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
910486
7680