f6696f53663b0165c5642e8608a400f942d0188b7e9b811a35c6816d545dff3ee922039912fc9baea30d2020cf183f6f664a7ff24cacdf438f803cfd2d7700 218 B

123456789101112
  1. /**
  2. * Executes a given operation type.
  3. * @param {String} type
  4. * @return {Boolean}
  5. */
  6. export default function command(type) {
  7. try {
  8. return document.execCommand(type);
  9. } catch (err) {
  10. return false;
  11. }
  12. }