richeditor-android
richeditor-android copied to clipboard
Is there a proper way to edit img and video?/有更合適的方法編輯圖片影片嗎?
I hope a intuition behavior when using editor, which means every time I insert img or video, they should change to a new line, more importantly be able to remove by backspace and Actually I done this function by
class MRich @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null)
: RichEditor(context, attrs){
override fun insertImage(url: String?, alt: String?) {
exec("javascript:RE.prepareInsert();")
exec("javascript:RE.insertHTML('<img src=\"$url\" alt=\"$alt\" width=\"100%\"><br><br>');")
}
override fun insertVideo(url: String?) {
exec("javascript:RE.prepareInsert();")
exec("javascript:RE.insertHTML('</p><video src=\"$url\" width=\"100%\" controls=\"\"></video><br><br>')")
}
}
although it fit the purpose, but I think it will be more user friendly when click the img or video, the Cursor should show after img/video, therefore user can easily delete it. Currently I had to delete it from the line under it.
p.s. far as I know,