-
Notifications
You must be signed in to change notification settings - Fork 8
TINY-11911: Added new disabled
option and increased minor version.
#64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2f23731
TINY-11911: Added new option and increased minor version.
abhinavgandham 01ef601
TINY-11911: Handle updates of the disabled attribute
tiny-ben-tran 63a3f12
TINY-11911: Added version checking for disabled option in the disable…
abhinavgandham 0fe72cd
TINY-11911: Implemented the version check functionality in Editor.ts …
abhinavgandham 9f16c7c
TINY-11911: Modified the behavior so that the 'disabled' option does …
abhinavgandham d2ed417
TINY-11911: Add tinymce/miniature as dependency
tiny-ben-tran 9e5be9b
TINY-11911: Add logic to sync with the disabled option
tiny-ben-tran 7964d5b
TINY-11911: Update yarn lock file
tiny-ben-tran e4062a4
INT-3346: Update CI config
tiny-ben-tran 0450bff
Merge branch 'main' into feature/TINY-11911
tiny-ben-tran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,56 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<title>TinyMCE WebComponent Demo: Disabled and Readonly </title> | ||
<link rel="icon" href="data:;base64,iVBORw0KGgo="> | ||
</head> | ||
|
||
<body> | ||
<script> | ||
|
||
|
||
function toggleDisabled() { | ||
var editor = document.getElementById('mody'); | ||
const editorInstance = editor.get | ||
var version = tinymce.majorVersion + '.' + tinymce.minorVersion | ||
var isoldVersion = parseFloat(version) < 7.6 | ||
if (isoldVersion) { | ||
if (!editor.hasAttribute('readonly')) { | ||
editor.setAttribute('readonly', ''); | ||
} else { | ||
editor.removeAttribute('readonly'); | ||
} | ||
} else { | ||
if (!editor.hasAttribute('disabled')) { | ||
editor.setAttribute('disabled', '') | ||
} | ||
else { | ||
editor.removeAttribute('disabled'); | ||
} | ||
} | ||
} | ||
|
||
function toggleReadonly() { | ||
var editor = document.getElementById('mody'); | ||
|
||
editor.removeAttribute('disabled'); | ||
if (!editor.hasAttribute('readonly')) { | ||
editor.setAttribute('readonly', ''); | ||
} else { | ||
editor.removeAttribute('readonly'); | ||
} | ||
} | ||
</script> | ||
<h2>TinyMCE WebComponent Demo: Disabled and Readonly</h2> | ||
<div id="ephox-ui"> | ||
<button onclick="toggleDisabled()">Toggle disabled</button> | ||
<button onclick="toggleReadonly()">Toggle readonly</button> | ||
<tinymce-editor id="mody"></tinymce-editor> | ||
</div> | ||
<script src="../../../node_modules/tinymce/tinymce.js"></script> | ||
<script src="../../../dist/tinymce-webcomponent.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.