Skip to content

Add a "SetContent" function#16

Open
jokogarcia wants to merge 3 commits intomarcellov7:mainfrom
jokogarcia:set-content
Open

Add a "SetContent" function#16
jokogarcia wants to merge 3 commits intomarcellov7:mainfrom
jokogarcia:set-content

Conversation

@jokogarcia
Copy link
Copy Markdown

This pull request introduces a new setContent method to the tex library, allowing users to programmatically set the content of the editor. It updates the core library, documentation, and examples to reflect this new functionality.

Core Library Changes:

  • Added a setContent method to the tex object, allowing users to set the content of the editor via JavaScript. This method updates both the visible editor content and the underlying HTML content. (src/tex.js, [1] [2]

Documentation Updates:

  • Updated the README.md to include setContent in the list of exported methods and added an example usage of setContent under a new "Set Content" section. (README.md, [1] [2]

Example Updates:

  • Modified examples/index.html by adding a new editor instance (editor4) and demonstrating the use of the setContent method to populate it with programmatically defined content. (examples/index.html, [1] [2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants