I’m building a Lightning component to edit html and need a robust WYSIWYG rich text editor (RTE) with “add link” feature and embed features. I really need the “add link” feature. When I search for RTE and Lightning I found and considered the following:
Trailblazer gives UI guidelines if you want to layout your own markup for a RTE but why reinvent the wheel when there are good plugins out there. http://lightningdesignsystem.com/components/rich-text-editor/
The old ui:inputRichText is not supported when LockerService is activated:
So this leaves <lightning:inputRichText />
. But this RTE lacks is deficient in both add link and image features.
<lightning:inputRichText value="{!v.body}" aura:id="iBody">
</lightning:inputRichText>
I’ve seen code that suggests you can add a button to let uses insert an image.
<lightning:inputRichText value="{!v.body}">
<lightning:insertImageButton/>
</lightning:inputRichText>
But this image uploader has a 1MB limit and has a terrible way of dealing with files that are too big. The user is told a serious error happened and they are asked to send a report into SF.
Is there some inner component that can be added to provide a Add Hyperlink feature?
Or, can we get the RTE that is used in Salesforce Lightning? Its the CKE editor and it’d be good enough. Is there a way to use this in our Lightning apps? I’ll guess that it might be imported as a static resource etc. Has anyone tried this and had success?