Giter Site home page Giter Site logo

wooodhead / ng-sms-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhuowenli/ng-sms-editor

0.0 1.0 0.0 1.59 MB

SMS editor for Angular.js

Home Page: https://zhuowenli.github.io/ng-sms-editor/

License: MIT License

JavaScript 49.03% CSS 29.28% HTML 21.69%

ng-sms-editor's Introduction

ng-sms-editor

基于 Angular.js 的短信编辑器!

快速开始

<ng-sms-editor sms-options="smsOptions">
    <slot-header class="custom-header">自定义头部</slot-header>
    <slot-footer class="custom-footer">自定义底部</slot-footer>
</ng-sms-editor>
var app = angular.module('module', ['ng-sms-editor']);

app.controller("defaultCtrl", ["$scope", function($scope) {
    $scope.smsOptions = {
        content: '#买家昵称#你好,#店铺名称#周年庆,全场宝贝3折起,更有精美礼品1000套免费送,先到先得。抢购链接:',
        sign_content: '淘宝',
        showPreview: true,
        labels: [
            {
                name: '#店铺名称#',
                type: 'placeholder',
                placeholder: '无敌美店'
            },
            {
                name: '#买家姓名#',
                type: 'placeholder',
                placeholder: '张三三'
            },
            {
                name: '#买家昵称#',
                type: 'placeholder',
                placeholder: 'tb88888_2017'
            },
        ],
    };
}]);

Options

content

短信文本

  • Type: String
  • Required: true
  • Default: ''

contentLength

短信文本长度

  • Type: Number
  • Required: false
  • Default: 0

labels

短信变量,用于服务端动态替换短信内容

  • Type: Array/Object
  • Required: false
  • Default: []
[
    {
        name: '#店铺名称#',
        type: 'placeholder',
        placeholder: '无敌美店',
        insertText: '#店铺名称#'
    },
    {
        name: '#买家姓名#',
        type: 'placeholder',
        placeholder: '张三三'
    },
]

showPreview

显示手机预览效果

  • Type: Boolean
  • Required: false
  • Default: false

ng-sms-editor's People

Contributors

dependabot[bot] avatar zhuowenli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.