Open jianjiandandan opened 6 years ago
@jianjiandandan did you fix this issue?
@yjb94 function setBold(){ if (document.queryCommandState('bold')) { document.execCommand('bold', false, null); document.execCommand('insertHTML', false, ''); } else { document.execCommand('bold', false, null); } }
不要全复制,里面判断的内容一致就好了
you can fix it like this:
"react-native-zss-rich-text-editor": "^1.1.0"
path: /node_modules/react-native-zss-rich-text-editor/src/editor.html ... zss_editor.setBold = function() { if (zss_editor.isCommandEnabled('bold')) { document.execCommand('bold', false, null); document.execCommand('insertHTML', false, ''); } else { document.execCommand('bold', false, null); } zss_editor.enabledEditingItems(); } ...
IOS in Chinese input method, click bold can realize bold, but if cancel bold continue to input Chinese characters, bold state is selected, italics is also, but English state, no problem, please ask how to solve。