-
Notifications
You must be signed in to change notification settings - Fork 470
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
UVE: Enable Inline editing in text fields for Angular SDK #28973
Comments
Blocked by #29311 |
Passed IQATested in Screen.Recording.2024-07-24.at.2.19.20.PM.mov |
This is breaking the regular editing, new case opened here #29426 This one, needs to be retest after fix the related problem... |
IOA PassedNow inline editing is working as expected on Angular Example ScreenshotScreen.Recording.2024-08-13.at.6.mp4 |
Note to QABe sure that you are in the |
@zJaaal We need to make sure we are doing the internal using the docker image with the latest version of trunk, to avoid inconsistencies with libraries, versions etc... |
Approved: Tested on trunk_b8fe837, Docker, macOS 14.5, FF v126.0.1 |
Related to
#28944
Task Description
As an author, I want to enable inline editing in text fields for pages in the Universal Visual Editor, so that users can easily edit text content directly on the page.
Acceptance Criteria
Proposed Objective
Core Features
Proposed Priority
Priority 3 - Average
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.:
In the traditional approach, developers need to "mark" sections of the contentlet being rendered that can be inline edited.
Example Markup
This markup shows a blue border around the text to indicate to the user that this is editable, and when the user clicks, it will start TinyMCE floating on top of the element.
Warning
If the contentlet lives in more than one page, it will pop up the corresponding dialog.
Developers need to pass four data attributes to their HTML in the container:
language
: the language of the content.mode
: sets up the TinyMCE toolbar, either big or small. See image here.inode
: the unique identifier for the contentlet.field-name
: the variable name of the contentlet field that the user can edit.With this information, we can trigger a workflow action (REST) to save/update the corresponding contentlet field:
This will edit the contentlet and save the new text.
Headless
Since we should not inject anything into our customer's headless implementations, we need to write a component in our SDK that allows developers to "mark" the text they want to be editable.
We need to provide a component. It should work the same way, but we have a new mode: plain, which uses the contenteditable attribute instead of TinyMCE. plain should be the default mode, meaning if no mode is passed, it defaults to plain. So now we have three modes:
full
: TinyMCE with a big toolbarminimal
: TinyMCE with a small toolbarplain
: NO TinyMCE, just contenteditable (default mode)Example Usage in Angular Application
And the HTML:
EditableText
ComponentOnClick
, it will initialize TinyMCE if the mode is full or minimal, or use the contenteditable attribute for plain.OnBlur
, it will save the content by posting a message with the required information to the UVE.Loading TinyMCE
Assumptions & Initiation Needs
Quality Assurance Notes & Workarounds
N/A
The text was updated successfully, but these errors were encountered: