Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wangeditor-team/wangEditor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: sunzsh/wangEditor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Jun 19, 2024

  1. Add getSelectionTextWithIndex method

    Adds a new method `getSelectionTextWithIndex()` to the `DomEditor` class, updates documentation, and includes unit tests for the new functionality.
    - Implements `getSelectionTextWithIndex()` in `packages/core/src/editor/dom-editor.ts` to return the selected text along with its index position within the full content of the editor.
    - Updates `docs/dev.md` to document the usage and purpose of the new `getSelectionTextWithIndex()` method.
    - Adds unit tests in `packages/core/__tests__/editor/dom-editor.test.ts` to verify the correct behavior of `getSelectionTextWithIndex()`, ensuring it returns the expected text and index position for both cases with a selection and without a selection.
    
    
    ---
    
    For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/sunzsh/wangEditor?shareId=1f3646c1-ff22-4f06-a550-3dae54c7200a).
    sunzsh committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    10c7847 View commit details
    Browse the repository at this point in the history
Loading